Go to the documentation of this file.
50 namespace meshConnectionsHelper
71 neighbourCells.
clear();
83 nei = neighbour[
c[fI]];
86 neighbourCells.
append(nei);
90 template<
class labelListType>
94 const labelListType& elementInGroup,
103 forAll(procBoundaries, patchI)
105 const label start = procBoundaries[patchI].patchStart();
106 const label size = procBoundaries[patchI].patchSize();
108 labelList groupOwner(procBoundaries[patchI].patchSize());
111 const label groupI = elementInGroup[owner[start+faceI]];
115 groupOwner[faceI] = -1;
119 groupOwner[faceI] = localGroupLabel[groupI];
125 procBoundaries[patchI].neiProcNo(),
126 groupOwner.byteSize()
129 toOtherProc << groupOwner;
133 forAll(procBoundaries, patchI)
135 const label start = procBoundaries[patchI].patchStart();
142 procBoundaries[patchI].neiProcNo()
145 fromOtherProc >> receivedData;
147 forAll(receivedData, faceI)
149 if( receivedData[faceI] < 0 )
152 const label groupI = elementInGroup[owner[start+faceI]];
188 Info <<
"Checking cell connections" <<
endl;
199 Info <<
"Finished checking cell connections" <<
endl;
235 forAll(nCellsInGroup, groupI)
241 forAll(nCellsInGroup, groupI)
242 if( nCellsInGroup[groupI] > maxGroup )
244 maxGroup = nCellsInGroup[groupI];
252 removeCell[cellI] =
true;
const labelList & neighbour() const
const labelList & owner() const
owner and neighbour cells for faces
polyMeshGen & mesh_
Reference to polyMeshGen.
#define forAll(list, i)
Loop across all elements in list.
Output inter-processor communications stream.
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
meshConnectionsSelectorOperator()
meshConnectionsNeighbourOperator(const polyMeshGen &mesh)
checkCellConnectionsOverFaces(const checkCellConnectionsOverFaces &)
Disallow default bitwise copy construct.
void operator()(const label cellI, DynList< label > &neighbourCells) const
label nGroups_
number of groups
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label groupMarking(labelListType &elementInGroup, const neiOp &neighbourCalculator, const filterOp &selector)
const cellListPMG & cells() const
access to cells
void appendIfNotIn(const T &e)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const polyMeshGen & mesh_
const PtrList< processorBoundaryPatch > & procBoundaries() const
inter-processor boundaries
void collectGroups(std::map< label, DynList< label > > &neiGroups, const labelListType &elementInGroup, const DynList< label > &localGroupLabel) const
const dimensionedScalar c
Speed of light in a vacuum.
Input inter-processor communications stream.
bool operator()(const label) const
A cell is defined as a list of faces with extra functionality.
~checkCellConnectionsOverFaces()
void clear()
Clear the list, i.e. set next free to zero.
label size() const
return the number of used elements
void removeCells(const boolList &removeCell, const bool removeProcFaces=true)
remove cells
void findCellGroups()
decompose marked cells
void append(const T &e)
Append an element at the end of the list.