Wave propagation of information through grid. Every iteration information goes through one layer of edges. More...
Public Member Functions | |
PointEdgeWave (const polyMesh &mesh, const labelList &initialPoints, const List< Type > &initialPointsInfo, UList< Type > &allPointInfo, UList< Type > &allEdgeInfo, const label maxIter, TrackingData &td=dummyTrackData_) | |
Construct from mesh, list of changed points with the Type. More... | |
PointEdgeWave (const polyMesh &mesh, UList< Type > &allPointInfo, UList< Type > &allEdgeInfo, TrackingData &td=dummyTrackData_) | |
Construct from mesh. Use setPointInfo and iterate() to do. More... | |
~PointEdgeWave ()=default | |
Destructor. More... | |
UList< Type > & | allPointInfo () const noexcept |
Access allPointInfo. More... | |
UList< Type > & | allEdgeInfo () const noexcept |
Access allEdgeInfo. More... | |
const TrackingData & | data () const noexcept |
Additional data to be passed into container. More... | |
void | setPointInfo (const labelList &changedPoints, const List< Type > &changedPointsInfo) |
Copy initial data into allPointInfo_. More... | |
label | pointToEdge () |
Propagate from point to edge. Returns total number of edges. More... | |
label | edgeToPoint () |
Propagate from edge to point. Returns total number of points. More... | |
label | iterate (const label maxIter) |
Iterate until no changes or maxIter reached. Returns actual. More... | |
template<class PatchType > | |
Foam::label | countPatchType () const |
Public Member Functions inherited from PointEdgeWaveBase | |
ClassName ("PointEdgeWave") | |
Runtime type information. More... | |
PointEdgeWaveBase (const polyMesh &mesh) | |
Construct with mesh reference and set initial sizes. More... | |
const polyMesh & | mesh () const noexcept |
Return access to the mesh. More... | |
label | nChangedPoints () const noexcept |
Current number of changed points. More... | |
label | nChangedEdges () const noexcept |
Current number of changed edges. More... | |
label | nUnvisitedEdges () const noexcept |
Number of unvisited edges, i.e. edges that were not (yet) reached from walking across mesh. More... | |
label | nUnvisitedPoints () const noexcept |
Get number of unvisited points. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from PointEdgeWaveBase | |
static scalar | propagationTol () noexcept |
Access to propagation tolerance. More... | |
static scalar | setPropagationTol (const scalar tol) noexcept |
Change propagation tolerance, return previous value. More... | |
Static Public Attributes inherited from PointEdgeWaveBase | |
static int | dummyTrackData_ = 12345 |
Default trackData value (for default template argument) More... | |
Protected Attributes inherited from PointEdgeWaveBase | |
const polyMesh & | mesh_ |
Reference to mesh. More... | |
PstreamBuffers | pBufs_ |
Buffers when updating processor patches. More... | |
bitSet | changedPoint_ |
Track if point has changed. More... | |
bitSet | changedEdge_ |
Track if edge has changed. More... | |
DynamicList< label > | changedPoints_ |
List of changed points. More... | |
DynamicList< label > | changedEdges_ |
List of changed edges. More... | |
label | nUnvisitedPoints_ |
Number of unvisited points. More... | |
label | nUnvisitedEdges_ |
Number of unvisited edges. More... | |
Static Protected Attributes inherited from PointEdgeWaveBase | |
static scalar | propagationTol_ = 0.01 |
Relative tolerance. More... | |
Wave propagation of information through grid. Every iteration information goes through one layer of edges.
Templated on information that is transferred.
Handles parallel and cyclics. Only parallel reasonably tested. Cyclics hardly tested.
Note: whether to propagate depends on the return value of Type::update which returns true (i.e. propagate) if the value changes by more than a certain tolerance.
Note: parallel is done in two steps:
Note: cyclics is with offset in patchface as well. Patch is divided into two sub patches and the point-point addressing is never explicitly calculated but instead use is made of the face-face correspondence. (it probably is more efficient to calculate a point-point correspondence at the start and then reuse this; task to be done)
Definition at line 218 of file PointEdgeWave.H.
PointEdgeWave | ( | const polyMesh & | mesh, |
const labelList & | initialPoints, | ||
const List< Type > & | initialPointsInfo, | ||
UList< Type > & | allPointInfo, | ||
UList< Type > & | allEdgeInfo, | ||
const label | maxIter, | ||
TrackingData & | td = dummyTrackData_ |
||
) |
Construct from mesh, list of changed points with the Type.
for these points. Gets work arrays to operate on, one of size number of mesh points, the other number of mesh edges. Iterates until nothing changes or maxIter reached. (maxIter can be 0)
Definition at line 626 of file PointEdgeWave.C.
References Foam::ensightOutput::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, iterate(), Foam::nl, and returnReduce().
PointEdgeWave | ( | const polyMesh & | mesh, |
UList< Type > & | allPointInfo, | ||
UList< Type > & | allEdgeInfo, | ||
TrackingData & | td = dummyTrackData_ |
||
) |
Construct from mesh. Use setPointInfo and iterate() to do.
actual calculation
Definition at line 692 of file PointEdgeWave.C.
|
default |
Destructor.
|
inlinenoexcept |
Access allPointInfo.
Definition at line 404 of file PointEdgeWave.H.
|
inlinenoexcept |
Access allEdgeInfo.
Definition at line 412 of file PointEdgeWave.H.
|
inlinenoexcept |
Additional data to be passed into container.
Definition at line 420 of file PointEdgeWave.H.
Copy initial data into allPointInfo_.
Definition at line 714 of file PointEdgeWave.C.
References forAll, and List< T >::push_back().
Foam::label pointToEdge | ( | ) |
Propagate from point to edge. Returns total number of edges.
(over all processors) changed.
Definition at line 814 of file PointEdgeWave.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and returnReduce().
Foam::label edgeToPoint | ( | ) |
Propagate from edge to point. Returns total number of points.
(over all processors) changed.
Definition at line 749 of file PointEdgeWave.C.
References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, and returnReduce().
Foam::label iterate | ( | const label | maxIter | ) |
Iterate until no changes or maxIter reached. Returns actual.
number of iterations.
Definition at line 869 of file PointEdgeWave.C.
References Foam::ensightOutput::debug, Foam::endl(), Foam::Info, Foam::nl, nPoints, and returnReduce().
Foam::label countPatchType | ( | ) | const |
Definition at line 282 of file PointEdgeWave.C.