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 (const PointEdgeWave &)=delete | |
Disallow default bitwise copy construction. More... | |
~PointEdgeWave () | |
Destructor. More... | |
UList< Type > & | allPointInfo () const |
Access allPointInfo. More... | |
UList< Type > & | allEdgeInfo () const |
Access allEdgeInfo. More... | |
const TrackingData & | data () const |
Additional data to be passed into container. More... | |
label | getUnsetEdges () const |
Get number of unvisited edges, i.e. edges that were not (yet) More... | |
label | getUnsetPoints () const |
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... | |
void | operator= (const PointEdgeWave &)=delete |
Disallow default bitwise assignment. More... | |
template<class PatchType > | |
Foam::label | countPatchType () const |
Static Public Member Functions | |
static scalar | propagationTol () |
Access to tolerance. More... | |
static void | setPropagationTol (const scalar tol) |
Change 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 85 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 609 of file PointEdgeWave.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, and Foam::returnReduce().
Referenced by PointEdgeWave< Type, TrackingData >::countPatchType(), and PointEdgeWave< Type, TrackingData >::setPropagationTol().
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 682 of file PointEdgeWave.C.
|
delete |
Disallow default bitwise copy construction.
~PointEdgeWave | ( | ) |
Destructor.
Definition at line 709 of file PointEdgeWave.C.
Referenced by PointEdgeWave< Type, TrackingData >::setPropagationTol().
|
inlinestatic |
Access to tolerance.
Definition at line 216 of file PointEdgeWave.H.
|
inlinestatic |
Change tolerance.
Definition at line 222 of file PointEdgeWave.H.
References PointEdgeWave< Type, TrackingData >::allEdgeInfo(), PointEdgeWave< Type, TrackingData >::allPointInfo(), mesh, PointEdgeWave< Type, TrackingData >::PointEdgeWave(), and PointEdgeWave< Type, TrackingData >::~PointEdgeWave().
|
inline |
Access allPointInfo.
Definition at line 267 of file PointEdgeWave.H.
Referenced by PointEdgeWave< Type, TrackingData >::setPropagationTol().
|
inline |
Access allEdgeInfo.
Definition at line 273 of file PointEdgeWave.H.
Referenced by PointEdgeWave< Type, TrackingData >::setPropagationTol().
|
inline |
Additional data to be passed into container.
Definition at line 279 of file PointEdgeWave.H.
References PointEdgeWave< Type, TrackingData >::edgeToPoint(), PointEdgeWave< Type, TrackingData >::getUnsetEdges(), PointEdgeWave< Type, TrackingData >::getUnsetPoints(), PointEdgeWave< Type, TrackingData >::iterate(), PointEdgeWave< Type, TrackingData >::operator=(), PointEdgeWave< Type, TrackingData >::pointToEdge(), and PointEdgeWave< Type, TrackingData >::setPointInfo().
Foam::label getUnsetEdges | ( | ) | const |
Get number of unvisited edges, i.e. edges that were not (yet)
reached from walking across mesh. This can happen from
Definition at line 724 of file PointEdgeWave.C.
References PointEdgeWave< Type, TrackingData >::setPointInfo().
Referenced by PointEdgeWave< Type, TrackingData >::data().
Foam::label getUnsetPoints | ( | ) | const |
Definition at line 717 of file PointEdgeWave.C.
Referenced by PointEdgeWave< Type, TrackingData >::data().
Copy initial data into allPointInfo_.
Definition at line 733 of file PointEdgeWave.C.
References forAll.
Referenced by PointEdgeWave< Type, TrackingData >::data(), and PointEdgeWave< Type, TrackingData >::getUnsetEdges().
Foam::label pointToEdge | ( | ) |
Propagate from point to edge. Returns total number of edges.
(over all processors) changed.
Definition at line 845 of file PointEdgeWave.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, PointEdgeWave< Type, TrackingData >::iterate(), Foam::nl, and Foam::reduce().
Referenced by PointEdgeWave< Type, TrackingData >::data().
Foam::label edgeToPoint | ( | ) |
Propagate from edge to point. Returns total number of points.
(over all processors) changed.
Definition at line 769 of file PointEdgeWave.C.
References Foam::abort(), Foam::e, Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, UPstream::parRun(), and Foam::reduce().
Referenced by PointEdgeWave< Type, TrackingData >::data().
Foam::label iterate | ( | const label | maxIter | ) |
Iterate until no changes or maxIter reached. Returns actual.
number of iterations.
Definition at line 914 of file PointEdgeWave.C.
References Foam::endl(), Foam::Info, Foam::nl, nPoints, UPstream::parRun(), and Foam::returnReduce().
Referenced by PointEdgeWave< Type, TrackingData >::data(), PointEdgeWave< Type, TrackingData >::pointToEdge(), and medialAxisMeshMover::~medialAxisMeshMover().
|
delete |
Disallow default bitwise assignment.
Referenced by PointEdgeWave< Type, TrackingData >::data().
Foam::label countPatchType | ( | ) | const |
Definition at line 293 of file PointEdgeWave.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), polyPatch::boundaryMesh(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), mapDistributeBase::constructSize(), globalMeshData::coupledPatch(), cyclicPolyPatch::coupledPoints(), mapDistribute::distribute(), Foam::equal(), PstreamBuffers::finishedSends(), forAll, coupledPolyPatch::forwardT(), globalMeshData::globalPointSlaves(), globalMeshData::globalPointSlavesMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), cyclicPolyPatch::neighbPatch(), processorPolyPatch::neighbPoints(), processorPolyPatch::neighbProcNo(), UPstream::nonBlocking, nPatches, PrimitivePatch< FaceList, PointField >::nPoints(), coupledPolyPatch::parallel(), patchi, PointEdgeWave< Type, TrackingData >::PointEdgeWave(), Foam::reduce(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::reserve(), mapDistribute::reverseDistribute(), and Foam::transform().