OppositeFaceCellWave< Type, TrackingData > Class Template Reference

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

Inheritance diagram for OppositeFaceCellWave< Type, TrackingData >:
Collaboration diagram for OppositeFaceCellWave< Type, TrackingData >:

Public Member Functions

 OppositeFaceCellWave (const polyMesh &, const labelList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWaveBase::dummyTrackData_)
 Construct from mesh and list of changed faces with the Type for these faces. More...
 
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=FaceCellWaveBase::dummyTrackData_)
 Construct from mesh. Use setFaceInfo and iterate() to do actual calculation. More...
 
 FaceCellWave (const polyMesh &mesh, const labelUList &initialChangedFaces, const List< Type > &changedFacesInfo, UList< Type > &allFaceInfo, UList< Type > &allCellInfo, const label maxIter, TrackingData &td=FaceCellWaveBase::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=FaceCellWaveBase::dummyTrackData_)
 Construct from mesh and explicitly connected boundary faces. More...
 
virtual ~FaceCellWave ()=default
 Destructor. More...
 
UList< Type > & allFaceInfo () noexcept
 Access allFaceInfo. More...
 
UList< Type > & allCellInfo () noexcept
 Access allCellInfo. More...
 
const TrackingData & data () const noexcept
 Additional data to be passed into container. 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 iterate (const label maxIter)
 Iterate until no changes or maxIter reached. More...
 
- Public Member Functions inherited from FaceCellWaveBase
 ClassName ("FaceCellWave")
 Runtime type information. More...
 
 FaceCellWaveBase (const polyMesh &mesh)
 Construct with mesh reference and set initial sizes. More...
 
const polyMeshmesh () const noexcept
 Return access to the mesh. More...
 
label nChangedCells () const noexcept
 Current number of changed cells. More...
 
label nChangedFaces () const noexcept
 Current number of changed faces. More...
 
label nUnvisitedCells () const noexcept
 Get number of unvisited cells, i.e. cells that were not (yet) reached from walking across mesh. More...
 
label nUnvisitedFaces () const noexcept
 Get number of unvisited faces. More...
 
- Public Member Functions inherited from OppositeFaceCellWaveBase
 ClassName ("OppositeFaceCellWave")
 Runtime type information. More...
 
 OppositeFaceCellWaveBase (const polyMesh &mesh)
 Construct with mesh reference (for sizing) 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from FaceCellWaveBase
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 FaceCellWaveBase
static int dummyTrackData_ = 12345
 Default trackData value (for default template argument) 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...
 
- Protected Attributes inherited from FaceCellWave< Type, TrackingData >
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...
 
DynamicList< taggedInfoTypechangedBaffles_
 
const bool hasCyclicPatches_
 Contains cyclics. More...
 
const bool hasCyclicAMIPatches_
 Contains cyclicAMI. More...
 
label nEvals_
 Number of evaluations. More...
 
- Protected Attributes inherited from FaceCellWaveBase
const polyMeshmesh_
 Reference to mesh. More...
 
PstreamBuffers pBufs_
 Buffers when updating processor patches. More...
 
bitSet changedFace_
 Track if face has changed. More...
 
bitSet changedCell_
 Track if cell has changed. More...
 
DynamicList< label > changedFaces_
 List of changed faces. More...
 
DynamicList< label > changedCells_
 List of changed cells. More...
 
label nUnvisitedFaces_
 Current count of unvisited faces. More...
 
label nUnvisitedCells_
 Current count of unvisited cells. More...
 
- Protected Attributes inherited from OppositeFaceCellWaveBase
DynamicList< label > changedOppositeFaces_
 For every entry in changedCells (i.e. the cell front) gives. More...
 
- Static Protected Attributes inherited from FaceCellWaveBase
static const scalar geomTol_ = 1e-6
 
static scalar propagationTol_ = 0.01
 

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 92 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 = FaceCellWaveBase::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 72 of file OppositeFaceCellWave.C.

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

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 29 of file OppositeFaceCellWave.C.

References DynamicList< T, SizeMin >::clear(), f(), and DynamicList< T, SizeMin >::push_back().

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 113 of file OppositeFaceCellWave.C.

References Foam::abort(), Foam::ensightOutput::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, UList< T >::front(), Foam::Pout, Foam::returnReduce(), 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 223 of file OppositeFaceCellWave.C.

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

Here is the call graph for this function:

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