Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
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 >:
Inheritance graph
[legend]
Collaboration diagram for PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >:
Collaboration graph
[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_)
 Construct from patch, list of changed edges with the Type. More...
 
 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. 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 getUnsetFaces () const
 Get number of unvisited faces, i.e. faces that were not (yet) More...
 
label getUnsetEdges () const
 
void setEdgeInfo (const labelList &changedEdges, const List< Type > &changedEdgesInfo)
 Copy initial data into allEdgeInfo_. More...
 
label edgeToFace ()
 Propagate from edge to face. Returns total number of faces. More...
 
label faceToEdge ()
 Propagate from face to edge. Returns total number of edges. More...
 
label iterate (const label maxIter)
 Iterate until no changes or maxIter reached. Returns actual. More...
 

Static Public Member Functions

static scalar propagationTol ()
 Access to tolerance. More...
 
static void setPropagationTol (const scalar tol)
 Change tolerance. More...
 

Private Member Functions

bool updateEdge (const label edgeI, const label neighbourFaceI, const Type &neighbourInfo, Type &edgeInfo)
 Updates edgeInfo with information from neighbour. Updates all. More...
 
bool updateFace (const label faceI, const label neighbourEdgeI, const Type &neighbourInfo, Type &faceInfo)
 Updates faceInfo with information from neighbour. Updates all. More...
 
void syncEdges ()
 Update coupled edges. More...
 
 PatchEdgeFaceWave (const PatchEdgeFaceWave &)
 Disallow default bitwise copy construct. More...
 
void operator= (const PatchEdgeFaceWave &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const polyMeshmesh_
 Reference to mesh. More...
 
const PrimitivePatchType & patch_
 Reference to patch. More...
 
UList< Type > & allEdgeInfo_
 Wall information for all edges. More...
 
UList< Type > & allFaceInfo_
 Information on all patch faces. More...
 
TrackingData & td_
 Additional data to be passed into container. More...
 
PackedBoolList changedEdge_
 Has edge changed. More...
 
DynamicList< labelchangedEdges_
 List of changed edges. More...
 
PackedBoolList changedFace_
 Has face changed. More...
 
DynamicList< labelchangedFaces_
 List of changed faces. More...
 
label nEvals_
 Number of evaluations. More...
 
label nUnvisitedEdges_
 Number of unvisited faces/edges. More...
 
label nUnvisitedFaces_
 
labelList patchEdges_
 
labelList coupledEdges_
 
PackedBoolList sameEdgeOrientation_
 

Static Private Attributes

static scalar propagationTol_ = 0.01
 Relative tolerance. Stop propagation if relative changes. More...
 
static label dummyTrackData_ = 12345
 Used as default trackdata value to satisfy default template. 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 69 of file PatchEdgeFaceWave.H.

Constructor & Destructor Documentation

◆ PatchEdgeFaceWave() [1/3]

PatchEdgeFaceWave ( const PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData > &  )
private

Disallow default bitwise copy construct.

◆ PatchEdgeFaceWave() [2/3]

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

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

Here is the call graph for this function:

◆ PatchEdgeFaceWave() [3/3]

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

Member Function Documentation

◆ updateEdge()

bool updateEdge ( const label  edgeI,
const label  neighbourFaceI,
const Type &  neighbourInfo,
Type &  edgeInfo 
)
private

Updates edgeInfo with information from neighbour. Updates all.

statistics.

Definition at line 68 of file PatchEdgeFaceWave.C.

◆ updateFace()

bool updateFace ( const label  faceI,
const label  neighbourEdgeI,
const Type &  neighbourInfo,
Type &  faceInfo 
)
private

Updates faceInfo with information from neighbour. Updates all.

statistics.

Definition at line 122 of file PatchEdgeFaceWave.C.

◆ syncEdges()

void syncEdges
private

◆ operator=()

void operator= ( const PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData > &  )
private

Disallow default bitwise assignment.

◆ propagationTol()

static scalar propagationTol ( )
inlinestatic

◆ setPropagationTol()

static void setPropagationTol ( const scalar  tol)
inlinestatic

◆ allEdgeInfo()

UList<Type>& allEdgeInfo ( ) const
inline

Access allEdgeInfo.

Definition at line 211 of file PatchEdgeFaceWave.H.

References PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::allEdgeInfo_.

◆ allFaceInfo()

UList<Type>& allFaceInfo ( ) const
inline

Access allFaceInfo.

Definition at line 217 of file PatchEdgeFaceWave.H.

References PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::allFaceInfo_.

◆ data()

const TrackingData& data ( ) const
inline

Additional data to be passed into container.

Definition at line 223 of file PatchEdgeFaceWave.H.

References PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::td_.

◆ getUnsetFaces()

Foam::label getUnsetFaces

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

◆ getUnsetEdges()

Foam::label getUnsetEdges

Definition at line 424 of file PatchEdgeFaceWave.C.

◆ setEdgeInfo()

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

Copy initial data into allEdgeInfo_.

Definition at line 452 of file PatchEdgeFaceWave.C.

References List::append(), and forAll.

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

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

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

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

Here is the call graph for this function:

Field Documentation

◆ propagationTol_

Foam::scalar propagationTol_ = 0.01
staticprivate

Relative tolerance. Stop propagation if relative changes.

less than this tolerance (responsability for checking this is up to Type implementation)

Definition at line 78 of file PatchEdgeFaceWave.H.

Referenced by PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::propagationTol(), and PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::setPropagationTol().

◆ dummyTrackData_

Foam::label dummyTrackData_ = 12345
staticprivate

Used as default trackdata value to satisfy default template.

argument.

Definition at line 82 of file PatchEdgeFaceWave.H.

◆ mesh_

const polyMesh& mesh_
private

Reference to mesh.

Definition at line 88 of file PatchEdgeFaceWave.H.

◆ patch_

const PrimitivePatchType& patch_
private

Reference to patch.

Definition at line 91 of file PatchEdgeFaceWave.H.

◆ allEdgeInfo_

UList<Type>& allEdgeInfo_
private

Wall information for all edges.

Definition at line 94 of file PatchEdgeFaceWave.H.

Referenced by PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::allEdgeInfo().

◆ allFaceInfo_

UList<Type>& allFaceInfo_
private

Information on all patch faces.

Definition at line 97 of file PatchEdgeFaceWave.H.

Referenced by PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::allFaceInfo().

◆ td_

TrackingData& td_
private

Additional data to be passed into container.

Definition at line 100 of file PatchEdgeFaceWave.H.

Referenced by PatchEdgeFaceWave< PrimitivePatchType, Type, TrackingData >::data().

◆ changedEdge_

PackedBoolList changedEdge_
private

Has edge changed.

Definition at line 103 of file PatchEdgeFaceWave.H.

◆ changedEdges_

DynamicList<label> changedEdges_
private

List of changed edges.

Definition at line 106 of file PatchEdgeFaceWave.H.

◆ changedFace_

PackedBoolList changedFace_
private

Has face changed.

Definition at line 109 of file PatchEdgeFaceWave.H.

◆ changedFaces_

DynamicList<label> changedFaces_
private

List of changed faces.

Definition at line 112 of file PatchEdgeFaceWave.H.

◆ nEvals_

label nEvals_
private

Number of evaluations.

Definition at line 115 of file PatchEdgeFaceWave.H.

◆ nUnvisitedEdges_

label nUnvisitedEdges_
private

Number of unvisited faces/edges.

Definition at line 118 of file PatchEdgeFaceWave.H.

◆ nUnvisitedFaces_

label nUnvisitedFaces_
private

Definition at line 119 of file PatchEdgeFaceWave.H.

◆ patchEdges_

labelList patchEdges_
private

Definition at line 123 of file PatchEdgeFaceWave.H.

◆ coupledEdges_

labelList coupledEdges_
private

Definition at line 124 of file PatchEdgeFaceWave.H.

◆ sameEdgeOrientation_

PackedBoolList sameEdgeOrientation_
private

Definition at line 125 of file PatchEdgeFaceWave.H.


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