OppositeFaceCellWave< Type, TrackingData > Class Template Reference

Version of FaceCellWave that walks through prismatic cells only. More...

Inheritance diagram for OppositeFaceCellWave< Type, TrackingData >:
[legend]
Collaboration diagram for OppositeFaceCellWave< Type, TrackingData >:
[legend]

Public Member Functions

 OppositeFaceCellWave (const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWave< Type, TrackingData >::dummyTrackData_)
 
virtual ~OppositeFaceCellWave ()=default
 Destructor. More...
 
virtual label faceToCell ()
 Propagate from face to cell. Returns total number of cells. More...
 
virtual label cellToFace ()
 Propagate from cell to face. Returns total number of faces. More...
 
- Public Member Functions inherited from FaceCellWave< Type, TrackingData >
 FaceCellWave (const polyMesh &mesh, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, TrackingData &td=dummyTrackData_)
 
 FaceCellWave (const polyMesh &mesh, const labelUList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 Construct from mesh and list of changed faces with the Type. More...
 
 FaceCellWave (const polyMesh &mesh, const labelPairList &explicitConnections, const bool handleCyclicAMI, const labelUList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=dummyTrackData_)
 Construct from mesh and explicitly connected boundary faces. More...
 
virtual ~FaceCellWave ()=default
 Destructor. More...
 
UList< Type > & allFaceInfo ()
 Access allFaceInfo. More...
 
UList< Type > & allCellInfo ()
 Access allCellInfo. More...
 
const TrackingData & data () const
 Additional data to be passed into container. More...
 
const polyMeshmesh () const
 Access mesh. More...
 
label nUnvisitedCells () const
 
label nUnvisitedFaces () const
 Get number of unvisited faces. More...
 
void setFaceInfo (const label facei, const Type &faceInfo)
 Set single initial changed face. More...
 
void setFaceInfo (const labelUList &changedFaces, const List< Type > &changedFacesInfo)
 Set initial changed faces. More...
 
virtual label faceToCell ()
 Propagate from face to cell. More...
 
virtual label cellToFace ()
 Propagate from cell to face. More...
 
virtual label iterate (const label maxIter)
 Iterate until no changes or maxIter reached. More...
 

Protected Member Functions

void opposingFaceLabels (const label celli, const label facei, DynamicList< label > &) const
 Determine 'opposite' faces (= faces not sharing a vertex) on cell. More...
 
- Protected Member Functions inherited from FaceCellWave< Type, TrackingData >
bool updateCell (const label celli, const label neighbourFacei, const Type &neighbourInfo, const scalar tol, Type &cellInfo)
 Updates cellInfo with information from neighbour. More...
 
bool updateFace (const label facei, const label neighbourCelli, const Type &neighbourInfo, const scalar tol, Type &faceInfo)
 Updates faceInfo with information from neighbour. More...
 
bool updateFace (const label facei, const Type &neighbourInfo, const scalar tol, Type &faceInfo)
 Updates faceInfo with information from same face. More...
 
void checkCyclic (const polyPatch &pPatch) const
 Debugging: check info on both sides of cyclic. More...
 
template<class PatchType >
bool hasPatch () const
 Has cyclic patch? More...
 
void mergeFaceInfo (const polyPatch &patch, const label nFaces, const labelUList &changedFaces, const List< Type > &changedFacesInfo)
 Merge received patch data into global data. More...
 
label getChangedPatchFaces (const polyPatch &patch, const label startFacei, const label nFaces, labelList &changedPatchFaces, List< Type > &changedPatchFacesInfo) const
 Extract info for single patch only. More...
 
void leaveDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, List< Type > &faceInfo) const
 Handle leaving domain. Implementation referred to Type. More...
 
void enterDomain (const polyPatch &patch, const label nFaces, const labelUList &faceLabels, List< Type > &faceInfo) const
 Handle leaving domain. Implementation referred to Type. More...
 
void transform (const tensorField &rotTensor, const label nFaces, List< Type > &faceInfo)
 Apply transformation to Type. More...
 
void handleProcPatches ()
 Merge data from across processor boundaries. More...
 
void handleCyclicPatches ()
 Merge data from across cyclics. More...
 
void handleAMICyclicPatches ()
 Merge data from across AMI cyclics. More...
 
void handleExplicitConnections ()
 Merge data across explicitly provided local connections. More...
 
 FaceCellWave (const FaceCellWave &)=delete
 No copy construct. More...
 
void operator= (const FaceCellWave &)=delete
 No copy assignment. More...
 

Protected Attributes

DynamicList< label > changedOppositeFaces_
 For every entry in changedCells (i.e. the cell front) gives. More...
 
- Protected Attributes inherited from FaceCellWave< Type, TrackingData >
const polyMeshmesh_
 Reference to mesh. More...
 
const labelPairList explicitConnections_
 Optional boundary faces that information should travel through. More...
 
UList< Type > & allFaceInfo_
 Information for all faces. More...
 
UList< Type > & allCellInfo_
 Information for all cells. More...
 
TrackingData & td_
 Additional data to be passed into container. More...
 
bitSet changedFace_
 Has face changed. More...
 
bitSet changedCell_
 Has cell changed. More...
 
DynamicList< label > changedFaces_
 List of changed faces. More...
 
DynamicList< label > changedCells_
 
DynamicList< taggedInfoTypechangedBaffles_
 
const bool hasCyclicPatches_
 Contains cyclics. More...
 
const bool hasCyclicAMIPatches_
 Contains cyclicAMI. More...
 
label nEvals_
 Number of evaluations. More...
 
label nUnvisitedCells_
 Number of unvisited cells/faces. More...
 
label nUnvisitedFaces_
 

Additional Inherited Members

- Static Public Member Functions inherited from FaceCellWave< Type, TrackingData >
static scalar propagationTol ()
 Access to tolerance. More...
 
static void setPropagationTol (const scalar tol)
 Change tolerance. More...
 
- Protected Types inherited from FaceCellWave< Type, TrackingData >
typedef std::pair< label, Type > taggedInfoType
 Information tagged with a source or destination id. More...
 
- Static Protected Member Functions inherited from FaceCellWave< Type, TrackingData >
static void offset (const polyPatch &patch, const label off, const label nFaces, labelList &faces)
 Offset face labels by constant value. More...
 
- Static Protected Attributes inherited from FaceCellWave< Type, TrackingData >
static const scalar geomTol_ = 1e-6
 
static scalar propagationTol_ = 0.01
 
static int dummyTrackData_ = 12345
 Default trackdata value to satisfy default template argument. More...
 

Detailed Description

template<class Type, class TrackingData = int>
class Foam::OppositeFaceCellWave< Type, TrackingData >

Version of FaceCellWave that walks through prismatic cells only.

Used to determine mesh structure. In the front walking routines (faceToCell and faceToCell) it

  • walks across prismatic cells only
  • and only to a single opposite face

Notes: A cell with a split faces will be marked but not walked through (since there is no single opposite face.

Source files

Definition at line 68 of file OppositeFaceCellWave.H.

Constructor & Destructor Documentation

◆ OppositeFaceCellWave()

OppositeFaceCellWave ( const polyMesh mesh,
const labelList initialChangedFaces,
const List< Type > &  changedFacesInfo,
UList< Type > &  allFaceInfo,
UList< Type > &  allCellInfo,
const label  maxIter,
TrackingData &  td = FaceCellWave<Type, TrackingData>::dummyTrackData_ 
)

Construct from mesh and list of changed faces with the Type for these faces.

Iterates until nothing changes or maxIter reached. (maxIter can be 0)

Definition at line 99 of file OppositeFaceCellWave.C.

References FaceCellWave< Type, TrackingData >::changedCells_, FaceCellWave< Type, TrackingData >::changedFaces_, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, FaceCellWave< Type, TrackingData >::iterate(), and UList< T >::size().

Here is the call graph for this function:

◆ ~OppositeFaceCellWave()

virtual ~OppositeFaceCellWave ( )
virtualdefault

Destructor.

Member Function Documentation

◆ opposingFaceLabels()

void opposingFaceLabels ( const label  celli,
const label  facei,
DynamicList< label > &  oppositeFaceLabels 
) const
protected

Determine 'opposite' faces (= faces not sharing a vertex) on cell.

Definition at line 34 of file OppositeFaceCellWave.C.

References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), and forAll.

Here is the call graph for this function:

◆ faceToCell()

Foam::label faceToCell
virtual

Propagate from face to cell. Returns total number of cells.

(over all processors) changed.

Reimplemented from FaceCellWave< Type, TrackingData >.

Definition at line 141 of file OppositeFaceCellWave.C.

References Foam::abort(), DynamicList< T, SizeMin >::append(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Pout, Foam::reduce(), and UList< T >::size().

Here is the call graph for this function:

◆ cellToFace()

Foam::label cellToFace
virtual

Propagate from cell to face. Returns total number of faces.

(over all processors) changed. (Faces on processorpatches are counted double)

Reimplemented from FaceCellWave< Type, TrackingData >.

Definition at line 258 of file OppositeFaceCellWave.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, UPstream::parRun(), Foam::Pout, and Foam::reduce().

Here is the call graph for this function:

Member Data Documentation

◆ changedOppositeFaces_

DynamicList<label> changedOppositeFaces_
protected

For every entry in changedCells (i.e. the cell front) gives.

the face that it needs to transfer to

Definition at line 79 of file OppositeFaceCellWave.H.


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