Go to the documentation of this file.
69 DynamicList<label> frontFaces(startFaces);
72 label faceI = frontFaces[i];
73 blockedFace[faceI] =
true;
76 while (
returnReduce(frontFaces.size(), sumOp<label>()) > 0)
79 boolList isFrontBndFace(nBnd,
false);
82 label faceI = frontFaces[i];
84 if (!
mesh.isInternalFace(faceI))
86 isFrontBndFace[faceI-
mesh.nInternalFaces()] =
true;
95 if (isFrontBndFace[i] && !blockedFace[faceI])
97 blockedFace[faceI] =
true;
98 frontFaces.append(faceI);
103 DynamicList<label> newFrontFaces(frontFaces.size());
107 label faceI = frontFaces[i];
110 const cell& ownCell =
cells[
mesh.faceOwner()[faceI]];
112 label oppositeFaceI = ownCell.opposingFaceLabel(faceI, faces);
114 if (oppositeFaceI == -1)
117 <<
"Face:" << faceI <<
" owner cell:" << ownCell
122 if (!blockedFace[oppositeFaceI])
124 blockedFace[oppositeFaceI] =
true;
125 newFrontFaces.append(oppositeFaceI);
130 if (
mesh.isInternalFace(faceI))
132 const cell& neiCell =
mesh.cells()[
mesh.faceNeighbour()[faceI]];
134 label oppositeFaceI = neiCell.opposingFaceLabel(faceI, faces);
136 if (oppositeFaceI == -1)
139 <<
"Face:" << faceI <<
" neighbour cell:" << neiCell
144 if (!blockedFace[oppositeFaceI])
146 blockedFace[oppositeFaceI] =
true;
147 newFrontFaces.append(oppositeFaceI);
153 frontFaces.transfer(newFrontFaces);
161 const polyMesh&
mesh,
178 forAll(blockedFace, faceI)
180 if (blockedFace[faceI])
190 str <<
' ' << vertI+fp+1;
200 cellRegion_.reset(
new regionSplit(
mesh, blockedFace));
202 Info<<
"Detected " << cellRegion_().nRegions() <<
" layers." <<
nl <<
endl;
214 SortableList<scalar> sortComponent(regionCc.component(dir_));
216 sortMap_ = sortComponent.indices();
222 y_.setSize(cellRegion_().nRegions()/2);
231 const polyMesh&
mesh,
232 const dictionary&
dict
238 const polyBoundaryMesh&
patches =
mesh.boundaryMesh();
252 <<
". Valid patches are " <<
patches.name()
256 nFaces +=
patches[patchI].size();
268 startFaces[nFaces++] = pp.start()+j;
273 calcLayeredRegions(
mesh, startFaces);
279 const polyMesh&
mesh,
281 const bool symmetric,
285 symmetric_(symmetric),
289 calcLayeredRegions(
mesh, startFaces);
vectorField pointField
pointField is a vectorField.
virtual const pointField & points() const
Return raw points.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
bool read(const char *, int32_t &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
components
Component labeling enumeration.
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
channelIndex(const channelIndex &)
Disallow default bitwise copy construct and assignment.
List< cell > cellList
list of cells
wordList patchNames(nPatches)
errorManip< error > abort(error &err)
List< bool > boolList
Bool container classes.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const vectorField & cellCentres() const
virtual const faceList & faces() const
Return raw faces.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
fileName path() const
Return path.
static const NamedEnum< vector::components, 3 > vectorComponentsNames_
const Time & time() const
Return the top-level database.
void calcLayeredRegions(const polyMesh &mesh, const labelList &startFaces)
void size(const label)
Override size to be inconsistent with allocated storage.
Initialise the NamedEnum HashTable from the static list of names.
stressControl lookup("compactNormalStress") >> compactNormalStress
void walkOppositeFaces(const polyMesh &mesh, const labelList &startFaces, boolList &blockedFace)