50#ifndef Foam_FaceCellWave_H
51#define Foam_FaceCellWave_H
173template<
class Type,
class TrackingData =
int>
220 const label neighbourFacei,
221 const Type& neighbourInfo,
231 const label neighbourCelli,
232 const Type& neighbourInfo,
242 const Type& neighbourInfo,
254 template<
class PatchType>
270 const label startFacei,
370 const bool handleCyclicAMI,
411 void setFaceInfo(
const label facei,
const Type& faceInfo);
431 virtual label
iterate(
const label maxIter);
labelList faceLabels(nFaceLabels)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
label nChangedFaces() const noexcept
Current number of changed faces.
DynamicList< label > changedCells_
List of changed cells.
static int dummyTrackData_
Default trackData value (for default template argument).
DynamicList< label > changedFaces_
List of changed faces.
ClassName("FaceCellWave")
Runtime type information.
bitSet changedFace_
Track if face has changed.
PstreamBuffers pBufs_
Buffers when updating processor patches.
static scalar propagationTol_
FaceCellWaveBase(const polyMesh &mesh)
Construct with mesh reference and set initial sizes.
static const scalar geomTol_
label nUnvisitedFaces_
Current count of unvisited faces.
label nChangedCells() const noexcept
Current number of changed cells.
static scalar setPropagationTol(const scalar tol) noexcept
Change propagation tolerance, return previous value.
label nUnvisitedFaces() const noexcept
Get number of unvisited faces.
label nUnvisitedCells_
Current count of unvisited cells.
bitSet changedCell_
Track if cell has changed.
const polyMesh & mesh() const noexcept
Return access to the mesh.
label nUnvisitedCells() const noexcept
Get number of unvisited cells, i.e. cells that were not (yet) reached from walking across mesh.
const polyMesh & mesh_
Reference to mesh.
static scalar propagationTol() noexcept
Access to propagation tolerance.
Wave propagation of information through grid. Every iteration information goes through one layer of c...
virtual ~FaceCellWave()=default
Destructor.
void handleExplicitConnections()
Merge data across explicitly provided local connections.
UList< Type > & allCellInfo_
Information for all cells.
UList< Type > & allFaceInfo_
Information for all faces.
void mergeFaceInfo(const polyPatch &patch, const label nFaces, const labelUList &changedFaces, const UList< Type > &changedFacesInfo)
Merge received patch data into global data.
void handleProcPatches()
Merge data from across processor boundaries.
label nEvals_
Number of evaluations.
DynamicList< taggedInfoType > changedBaffles_
FaceCellWave(const FaceCellWave &)=delete
No copy construct.
void operator=(const FaceCellWave &)=delete
No copy assignment.
bool hasPatch() const
Has cyclic patch?
void leaveDomain(const polyPatch &patch, const label nFaces, const labelUList &faceLabels, UList< Type > &faceInfo) const
Handle leaving domain. Implementation referred to Type.
TrackingData & td_
Additional data to be passed into container.
const TrackingData & data() const noexcept
Additional data to be passed into container.
static void offset(const polyPatch &patch, const label off, const label nFaces, labelUList &faces)
Offset face labels by constant value.
void handleAMICyclicPatches()
Merge data from across AMI cyclics.
void checkCyclic(const polyPatch &pPatch) const
Debugging: check info on both sides of cyclic.
virtual label iterate(const label maxIter)
Iterate until no changes or maxIter reached.
void handleCyclicPatches()
Merge data from across cyclics.
void setFaceInfo(const label facei, const Type &faceInfo)
Set single initial changed face.
label getChangedPatchFaces(const polyPatch &patch, const label startFacei, const label nFaces, labelUList &changedPatchFaces, UList< Type > &changedPatchFacesInfo) const
Extract info for single patch only.
void enterDomain(const polyPatch &patch, const label nFaces, const labelUList &faceLabels, UList< Type > &faceInfo) const
Handle leaving domain. Implementation referred to Type.
bool updateCell(const label celli, const label neighbourFacei, const Type &neighbourInfo, const scalar tol, Type &cellInfo)
Updates cellInfo with information from neighbour.
const labelPairList explicitConnections_
Optional boundary faces that information should travel through.
void transform(const tensorField &rotTensor, const label nFaces, UList< Type > &faceInfo)
Apply transformation to Type.
const bool hasCyclicAMIPatches_
Contains cyclicAMI.
virtual label faceToCell()
Propagate from face to cell.
UList< Type > & allFaceInfo() noexcept
Access allFaceInfo.
bool updateFace(const label facei, const label neighbourCelli, const Type &neighbourInfo, const scalar tol, Type &faceInfo)
Updates faceInfo with information from neighbour.
std::pair< label, Type > taggedInfoType
Information tagged with a source or destination id.
virtual label cellToFace()
Propagate from cell to face.
UList< Type > & allCellInfo() noexcept
Access allCellInfo.
const bool hasCyclicPatches_
Contains cyclics.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Holds information regarding type of cell. Used in inside/outside determination in cellClassification.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
List< labelPair > labelPairList
List of labelPair.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
UList< label > labelUList
A UList of labels.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.