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 >:
[legend]
Collaboration diagram for PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >:
[legend]

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=dummyTrackData_)
 
 PatchEdgeFaceWave (const polyMesh &mesh, const PrimitivePatchType &patch, UList< Type > &allEdgeInfo, UList< Type > &allFaceInfo, TrackingData &td=dummyTrackData_)
 Construct from patch. More...
 
UList< Type > & allEdgeInfo () const
 Access allEdgeInfo. More...
 
UList< Type > & allFaceInfo () const
 Access allFaceInfo. More...
 
const TrackingData & data () const
 Additional data to be passed into container. More...
 
label nUnvisitedFaces () const
 
label nUnvisitedEdges () const
 
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...
 

Static Public Member Functions

static scalar propagationTol ()
 Access to tolerance. More...
 
static void setPropagationTol (const scalar tol)
 Change 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 72 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 = 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 291 of file PatchEdgeFaceWave.C.

References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, 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 = dummyTrackData_ 
)

Construct from patch.

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

Definition at line 381 of file PatchEdgeFaceWave.C.

Member Function Documentation

◆ propagationTol()

static scalar propagationTol ( )
inlinestatic

Access to tolerance.

Definition at line 167 of file PatchEdgeFaceWave.H.

◆ setPropagationTol()

static void setPropagationTol ( const scalar  tol)
inlinestatic

Change tolerance.

Definition at line 173 of file PatchEdgeFaceWave.H.

◆ allEdgeInfo()

UList<Type>& allEdgeInfo ( ) const
inline

Access allEdgeInfo.

Definition at line 214 of file PatchEdgeFaceWave.H.

◆ allFaceInfo()

UList<Type>& allFaceInfo ( ) const
inline

Access allFaceInfo.

Definition at line 220 of file PatchEdgeFaceWave.H.

◆ data()

const TrackingData& data ( ) const
inline

Additional data to be passed into container.

Definition at line 226 of file PatchEdgeFaceWave.H.

◆ nUnvisitedFaces()

label nUnvisitedFaces ( ) const
inline

Number of unvisited faces, i.e. faces that were not (yet) reached from walking across patch.

This can happen from

  • not enough iterations done
  • a disconnected patch
  • a patch without walls in it

Definition at line 238 of file PatchEdgeFaceWave.H.

◆ nUnvisitedEdges()

label nUnvisitedEdges ( ) const
inline

Definition at line 243 of file PatchEdgeFaceWave.H.

◆ setEdgeInfo()

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

Copy initial data into allEdgeInfo_.

Definition at line 427 of file PatchEdgeFaceWave.C.

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

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 529 of file PatchEdgeFaceWave.C.

References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, 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 466 of file PatchEdgeFaceWave.C.

References Foam::abort(), Foam::expressions::patchExpr::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 591 of file PatchEdgeFaceWave.C.

References Foam::expressions::patchExpr::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: