Loading...
Searching...
No Matches
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...

#include <PatchEdgeFaceWave.H>

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

Additional Inherited Members

Static Public Member Functions inherited from PatchEdgeFaceWaveBase
static scalar propagationTol () noexcept
 Access to propagation tolerance.
static scalar setPropagationTol (const scalar tol) noexcept
 Change propagation tolerance, return previous value.
Static Public Attributes inherited from PatchEdgeFaceWaveBase
static label dummyTrackData_ = 12345
 Default trackData value (for default template argument).
Protected Attributes inherited from PatchEdgeFaceWaveBase
const polyMeshmesh_
 Reference to mesh.
bitSet changedEdge_
 Track if edge has changed.
bitSet changedFace_
 Track if face has changed.
DynamicList< label > changedEdges_
 List of changed edges.
DynamicList< label > changedFaces_
 List of changed faces.
label nUnvisitedEdges_
 Number of unvisited edges.
label nUnvisitedFaces_
 Number of unvisited faces.
Static Protected Attributes inherited from PatchEdgeFaceWaveBase
static scalar propagationTol_ = 0.01
 Relative tolerance.

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]

template<class PrimitivePatchType, class Type, class TrackingData>
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 261 of file PatchEdgeFaceWave.C.

References allEdgeInfo(), allFaceInfo(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, iterate(), PatchTools::matchEdges(), PatchEdgeFaceWaveBase::mesh(), PatchEdgeFaceWaveBase::mesh_, PatchEdgeFaceWaveBase::nChangedEdges(), PatchEdgeFaceWaveBase::nChangedFaces(), Foam::nl, PatchEdgeFaceWaveBase::PatchEdgeFaceWaveBase(), Foam::Pout, setEdgeInfo(), and td().

Here is the call graph for this function:

◆ PatchEdgeFaceWave() [2/2]

template<class PrimitivePatchType, class Type, class TrackingData>
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 345 of file PatchEdgeFaceWave.C.

References allEdgeInfo(), allFaceInfo(), PatchTools::matchEdges(), PatchEdgeFaceWaveBase::mesh(), PatchEdgeFaceWaveBase::mesh_, PatchEdgeFaceWaveBase::PatchEdgeFaceWaveBase(), and td().

Here is the call graph for this function:

Member Function Documentation

◆ allEdgeInfo()

template<class PrimitivePatchType, class Type, class TrackingData = label>
UList< Type > & allEdgeInfo ( ) const
inlinenoexcept

Access allEdgeInfo.

Definition at line 325 of file PatchEdgeFaceWave.H.

References Foam::noexcept.

Referenced by PatchEdgeFaceWave(), and PatchEdgeFaceWave().

Here is the caller graph for this function:

◆ allFaceInfo()

template<class PrimitivePatchType, class Type, class TrackingData = label>
UList< Type > & allFaceInfo ( ) const
inlinenoexcept

Access allFaceInfo.

Definition at line 333 of file PatchEdgeFaceWave.H.

References Foam::noexcept.

Referenced by PatchEdgeFaceWave(), and PatchEdgeFaceWave().

Here is the caller graph for this function:

◆ data()

template<class PrimitivePatchType, class Type, class TrackingData = label>
const TrackingData & data ( ) const
inlinenoexcept

Additional data to be passed into container.

Definition at line 341 of file PatchEdgeFaceWave.H.

References Foam::noexcept.

◆ setEdgeInfo()

template<class PrimitivePatchType, class Type, class TrackingData>
void setEdgeInfo ( const labelUList & changedEdges,
const UList< Type > & changedEdgesInfo )

Copy initial data into allEdgeInfo_.

Definition at line 385 of file PatchEdgeFaceWave.C.

References PatchEdgeFaceWaveBase::changedEdge_, PatchEdgeFaceWaveBase::changedEdges_, forAll, and PatchEdgeFaceWaveBase::nUnvisitedEdges_.

Referenced by PatchEdgeFaceWave().

Here is the caller graph for this function:

◆ edgeToFace()

template<class PrimitivePatchType, class Type, class TrackingData>
Foam::label edgeToFace ( )

Propagate from edge to face.

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

Definition at line 485 of file PatchEdgeFaceWave.C.

References Foam::abort(), PatchEdgeFaceWaveBase::changedEdge_, PatchEdgeFaceWaveBase::changedEdges_, PatchEdgeFaceWaveBase::changedFace_, PatchEdgeFaceWaveBase::changedFaces_, Foam::endl(), Foam::FatalError, FatalErrorInFunction, PatchEdgeFaceWaveBase::nChangedFaces(), Foam::nl, Foam::Pout, and Foam::returnReduce().

Referenced by iterate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceToEdge()

template<class PrimitivePatchType, class Type, class TrackingData>
Foam::label faceToEdge ( )

Propagate from face to edge.

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

Definition at line 424 of file PatchEdgeFaceWave.C.

References Foam::abort(), PatchEdgeFaceWaveBase::changedEdge_, PatchEdgeFaceWaveBase::changedEdges_, PatchEdgeFaceWaveBase::changedFace_, PatchEdgeFaceWaveBase::changedFaces_, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, PatchEdgeFaceWaveBase::nChangedEdges(), Foam::nl, Foam::Pout, and Foam::returnReduce().

Referenced by iterate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterate()

template<class PrimitivePatchType, class Type, class TrackingData>
Foam::label iterate ( const label maxIter)

Iterate until no changes or maxIter reached.

Returns
actual number of iterations.

Definition at line 541 of file PatchEdgeFaceWave.C.

References edgeToFace(), Foam::endl(), faceToEdge(), Foam::nl, PatchEdgeFaceWaveBase::nUnvisitedEdges_, PatchEdgeFaceWaveBase::nUnvisitedFaces_, and Foam::Pout.

Referenced by PatchEdgeFaceWave().

Here is the call graph for this function:
Here is the caller graph for this function:

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