PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData > Class Template Reference

Wave propagation of information along patch. Every iteration information goes through one layer of faces. Templated on information that is transferred. More...

Inheritance diagram for PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >:
Collaboration diagram for PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >:

Public Member Functions

 PatchEdgeFaceWave (const polyMesh &mesh, const PrimitivePatchType &patch, const labelList &initialEdges, const List< Type > &initialEdgesInfo, UList< Type > &allEdgeInfo, UList< Type > &allFaceInfo, const label maxIter, TrackingData &td=PatchEdgeFaceWaveBase::dummyTrackData_)
 Construct from patch, list of changed edges with the Type for these edges. More...
 
 PatchEdgeFaceWave (const polyMesh &mesh, const PrimitivePatchType &patch, UList< Type > &allEdgeInfo, UList< Type > &allFaceInfo, TrackingData &td=PatchEdgeFaceWaveBase::dummyTrackData_)
 Construct from patch. More...
 
UList< Type > & allEdgeInfo () const noexcept
 Access allEdgeInfo. More...
 
UList< Type > & allFaceInfo () const noexcept
 Access allFaceInfo. More...
 
const TrackingData & data () const noexcept
 Additional data to be passed into container. More...
 
void setEdgeInfo (const labelList &changedEdges, const List< Type > &changedEdgesInfo)
 Copy initial data into allEdgeInfo_. More...
 
label edgeToFace ()
 Propagate from edge to face. More...
 
label faceToEdge ()
 Propagate from face to edge. More...
 
label iterate (const label maxIter)
 Iterate until no changes or maxIter reached. More...
 
- Public Member Functions inherited from PatchEdgeFaceWaveBase
 ClassName ("PatchEdgeFaceWave")
 Runtime type information. More...
 
 PatchEdgeFaceWaveBase (const polyMesh &mesh, const label nEdges, const label nFaces)
 Construct with mesh reference and set initial sizes. More...
 
const polyMeshmesh () const noexcept
 Return access to the mesh. More...
 
label nChangedEdges () const noexcept
 Current number of changed edges. More...
 
label nChangedFaces () const noexcept
 Current number of changed faces. More...
 
label nUnvisitedFaces () const noexcept
 Number of unvisited faces, i.e. faces that were not (yet) reached from walking across patch. More...
 
label nUnvisitedEdges () const noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from PatchEdgeFaceWaveBase
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 PatchEdgeFaceWaveBase
static label dummyTrackData_ = 12345
 Default trackData value (for default template argument) More...
 
- Protected Attributes inherited from PatchEdgeFaceWaveBase
const polyMeshmesh_
 Reference to mesh. More...
 
bitSet changedEdge_
 Track if edge has changed. More...
 
bitSet changedFace_
 Track if face has changed. More...
 
DynamicList< label > changedEdges_
 List of changed edges. More...
 
DynamicList< label > changedFaces_
 List of changed faces. More...
 
label nUnvisitedEdges_
 Number of unvisited edges. More...
 
label nUnvisitedFaces_
 Number of unvisited faces. More...
 
- Static Protected Attributes inherited from PatchEdgeFaceWaveBase
static scalar propagationTol_ = 0.01
 Relative tolerance. More...
 

Detailed Description

template<class PrimitivePatchType, class Type, class TrackingData = label>
class Foam::PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >

Wave propagation of information along patch. Every iteration information goes through one layer of faces. Templated on information that is transferred.

Source files

Definition at line 199 of file PatchEdgeFaceWave.H.

Constructor & Destructor Documentation

◆ PatchEdgeFaceWave() [1/2]

PatchEdgeFaceWave ( const polyMesh mesh,
const PrimitivePatchType &  patch,
const labelList initialEdges,
const List< Type > &  initialEdgesInfo,
UList< Type > &  allEdgeInfo,
UList< Type > &  allFaceInfo,
const label  maxIter,
TrackingData &  td = PatchEdgeFaceWaveBase::dummyTrackData_ 
)

Construct from patch, list of changed edges with the Type for these edges.

Obtains work arrays to operate on, one of size number of patch edges, the other number of patch faces. Iterates until nothing changes or maxIter reached. (maxIter can be 0)

Definition at line 263 of file PatchEdgeFaceWave.C.

References Foam::ensightOutput::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::Pout.

Here is the call graph for this function:

◆ PatchEdgeFaceWave() [2/2]

PatchEdgeFaceWave ( const polyMesh mesh,
const PrimitivePatchType &  patch,
UList< Type > &  allEdgeInfo,
UList< Type > &  allFaceInfo,
TrackingData &  td = PatchEdgeFaceWaveBase::dummyTrackData_ 
)

Construct from patch.

Use setEdgeInfo() and iterate() to do actual calculation

Definition at line 347 of file PatchEdgeFaceWave.C.

Member Function Documentation

◆ allEdgeInfo()

UList<Type>& allEdgeInfo ( ) const
inlinenoexcept

Access allEdgeInfo.

Definition at line 325 of file PatchEdgeFaceWave.H.

◆ allFaceInfo()

UList<Type>& allFaceInfo ( ) const
inlinenoexcept

Access allFaceInfo.

Definition at line 333 of file PatchEdgeFaceWave.H.

◆ data()

const TrackingData& data ( ) const
inlinenoexcept

Additional data to be passed into container.

Definition at line 341 of file PatchEdgeFaceWave.H.

◆ setEdgeInfo()

void setEdgeInfo ( const labelList changedEdges,
const List< Type > &  changedEdgesInfo 
)

Copy initial data into allEdgeInfo_.

Definition at line 387 of file PatchEdgeFaceWave.C.

References forAll, and List< T >::push_back().

Here is the call graph for this function:

◆ edgeToFace()

Foam::label edgeToFace ( )

Propagate from edge to face.

Returns
total number of faces (over all processors) changed.

Definition at line 486 of file PatchEdgeFaceWave.C.

References Foam::abort(), Foam::ensightOutput::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::nl, Foam::Pout, and Foam::returnReduce().

Here is the call graph for this function:

◆ faceToEdge()

Foam::label faceToEdge ( )

Propagate from face to edge.

Returns
total number of edges (over all processors) changed.

Definition at line 425 of file PatchEdgeFaceWave.C.

References Foam::abort(), Foam::ensightOutput::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, Foam::Pout, and Foam::returnReduce().

Here is the call graph for this function:

◆ iterate()

Foam::label iterate ( const label  maxIter)

Iterate until no changes or maxIter reached.

Returns
actual number of iterations.

Definition at line 543 of file PatchEdgeFaceWave.C.

References Foam::ensightOutput::debug, Foam::endl(), Foam::nl, and Foam::Pout.

Here is the call graph for this function:

The documentation for this class was generated from the following files: