Go to the documentation of this file.
91 bool hasSide = surfacesDict.
readIfPresent(
"cellZoneInside", method);
94 zoneInside_ = areaSelectionAlgoNames[method];
95 if (zoneInside_ == INSIDEPOINT)
97 surfacesDict.
lookup(
"insidePoint") >> zoneInsidePoint_;
108 zoneInside_ = (inside ? INSIDE : OUTSIDE);
119 zoneInside_ == INSIDE
120 || zoneInside_ == OUTSIDE
128 ) <<
"Illegal entry zoneInside "
129 << areaSelectionAlgoNames[zoneInside_]
132 <<
" since surface is not closed." <<
endl;
140 ) <<
"Unused entry zoneInside for faceZone "
142 <<
" since no cellZone specified."
150 faceType_ = faceZoneTypeNames[faceTypeMethod];
158 const word& faceZoneName,
159 const word& cellZoneName,
161 const point& zoneInsidePoint,
165 faceZoneName_(faceZoneName),
166 cellZoneName_(cellZoneName),
167 zoneInside_(zoneInside),
168 zoneInsidePoint_(zoneInsidePoint),
175 faceZoneName_(
surfZone.faceZoneName()),
176 cellZoneName_(
surfZone.cellZoneName()),
178 zoneInsidePoint_(
surfZone.zoneInsidePoint()),
193 if (surfList[surfI].faceZoneName().empty())
195 anonymousSurfaces[i++] = surfI;
200 return anonymousSurfaces;
217 && surfList[surfI].faceZoneName().
size()
220 namedSurfaces[namedI++] = surfI;
225 return namedSurfaces;
242 && surfList[surfI].faceZoneName().
size()
243 && !surfList[surfI].cellZoneName().
size()
246 namedSurfaces[namedI++] = surfI;
251 return namedSurfaces;
270 && surfList[surfI].cellZoneName().
size()
275 && allGeometry[surfaces[surfI]].hasVolumeType()
278 closed[closedI++] = surfI;
302 && !allGeometry[surfaces[surfI]].hasVolumeType()
305 unclosed[unclosedI++] = surfI;
329 && surfList[surfI].cellZoneName().
size()
330 && allGeometry[surfaces[surfI]].hasVolumeType()
333 closed[closedI++] = surfI;
355 && surfList[surfI].cellZoneName().
size()
359 closed[closedI++] = surfI;
381 zoneI = cellZones.size();
382 cellZones.setSize(zoneI+1);
410 label surfI = namedSurfaces[i];
412 const word& cellZoneName = surfList[surfI].cellZoneName();
416 label zoneI = addCellZone
423 surfaceToCellZone[surfI] = zoneI;
433 for (
label procI = 1; procI < allCellZones.
size(); procI++)
435 if (allCellZones[procI] != allCellZones[0])
438 <<
"Zones not synchronised among processors." <<
nl
439 <<
" Processor0 has cellZones:" << allCellZones[0]
440 <<
" , processor" << procI
441 <<
" has cellZones:" << allCellZones[procI]
446 return surfaceToCellZone;
465 zoneI = faceZones.size();
466 faceZones.setSize(zoneI+1);
497 label surfI = namedSurfaces[i];
499 const word& faceZoneName = surfList[surfI].faceZoneName();
501 label zoneI = addFaceZone
509 surfaceToFaceZone[surfI] = zoneI;
518 for (
label procI = 1; procI < allFaceZones.
size(); procI++)
520 if (allFaceZones[procI] != allFaceZones[0])
523 <<
"Zones not synchronised among processors." <<
nl
524 <<
" Processor0 has faceZones:" << allFaceZones[0]
525 <<
" , processor" << procI
526 <<
" has faceZones:" << allFaceZones[procI]
531 return surfaceToFaceZone;
static const NamedEnum< areaSelectionAlgo, 4 > areaSelectionAlgoNames
faceZoneType
What to do with faceZone faces.
surfaceZonesInfo(const searchableSurface &surface, const dictionary &surfacesDict)
Construct from surfaces and dictionary.
A class for handling words, derived from string.
static labelList getInsidePointNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of surfaces with a cellZone that have 'insidePoint'.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces (surfaces with faceZoneName)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static labelList getAllClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed.
static labelList addFaceZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Mesh consisting of general polyhedral cells.
const faceZoneMesh & faceZones() const
Return face zone mesh.
static labelList getStandaloneNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces without a cellZone.
bool set(const label) const
Is element set.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A subset of mesh faces organised as a primitive patch.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
areaSelectionAlgo
Types of selection of area.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list of keyword definitions, which are a keyword followed by any number of values (e....
static const NamedEnum< faceZoneType, 3 > faceZoneTypeNames
label findZoneID(const word &zoneName) const
Find zone index given a name.
List< bool > boolList
Bool container classes.
static labelList getClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed and.
wordList names() const
Return a list of zone names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static labelList getUnclosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are unclosed.
static labelList getUnnamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of unnamed surfaces (surfaces without faceZoneName)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
void setSize(const label)
Reset size of List.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
Container for searchableSurfaces.
label size() const
Return the number of elements in the PtrList.
static const word null
An empty word.
void size(const label)
Override size to be inconsistent with allocated storage.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
Initialise the NamedEnum HashTable from the static list of names.
static label addCellZone(const word &name, const labelList &addressing, polyMesh &mesh)
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
static label addFaceZone(const word &name, const labelList &addressing, const boolList &flipMap, polyMesh &mesh)