102 ) <<
"Illegal entry zoneInside "
106 <<
" since surface is not closed." <<
endl;
114 ) <<
"Unused entry zoneInside for faceZone "
116 <<
" since no cellZone specified."
132 const word& faceZoneName,
133 const word& cellZoneName,
135 const point& zoneInsidePoint,
139 faceZoneName_(faceZoneName),
140 cellZoneName_(cellZoneName),
141 zoneInside_(zoneInside),
142 zoneInsidePoint_(zoneInsidePoint),
149 faceZoneName_(
surfZone.faceZoneName()),
150 cellZoneName_(
surfZone.cellZoneName()),
152 zoneInsidePoint_(
surfZone.zoneInsidePoint()),
167 if (surfList[surfi].faceZoneName().empty())
169 anonymousSurfaces[i++] = surfi;
174 return anonymousSurfaces;
191 && surfList[surfi].faceZoneName().
size()
194 namedSurfaces[namedI++] = surfi;
199 return namedSurfaces;
218 && surfList[surfi].cellZoneName().
size()
223 && allGeometry[surfaces[surfi]].hasVolumeType()
226 closed[closedI++] = surfi;
250 && !allGeometry[surfaces[surfi]].hasVolumeType()
253 unclosed[unclosedI++] = surfi;
277 && surfList[surfi].cellZoneName().
size()
278 && allGeometry[surfaces[surfi]].hasVolumeType()
281 closed[closedI++] = surfi;
303 && surfList[surfi].cellZoneName().
size()
307 closed[closedI++] = surfi;
329 label surfi = namedSurfaces[i];
331 const word& cellZoneName = surfList[surfi].cellZoneName();
339 zonei = cellZones.
size();
353 surfaceToCellZone[surfi] = zonei;
363 for (
label proci = 1; proci < allCellZones.
size(); proci++)
365 if (allCellZones[proci] != allCellZones[0])
368 <<
"Zones not synchronised among processors." <<
nl
369 <<
" Processor0 has cellZones:" << allCellZones[0]
370 <<
" , processor" << proci
371 <<
" has cellZones:" << allCellZones[proci]
376 return surfaceToCellZone;
393 label surfi = namedSurfaces[i];
395 const word& faceZoneName = surfList[surfi].faceZoneName();
401 zonei = faceZones.
size();
416 surfaceToFaceZone[surfi] = zonei;
425 for (
label proci = 1; proci < allFaceZones.
size(); proci++)
427 if (allFaceZones[proci] != allFaceZones[0])
430 <<
"Zones not synchronised among processors." <<
nl
431 <<
" Processor0 has faceZones:" << allFaceZones[0]
432 <<
" , processor" << proci
433 <<
" has faceZones:" << allFaceZones[proci]
438 return surfaceToFaceZone;
#define forAll(list, i)
Loop across all elements in list.
wordList toc() const
Return the table of contents.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
Initialise the NamedEnum HashTable from the static list of names.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
autoPtr< T > set(const label, const word &key, T *)
Set element to pointer provided and return old element.
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the number of elements in the UPtrList.
Named list of cell indices representing a sub-set of the mesh.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Named list of face indices representing a sub-set of the mesh faces.
Mesh consisting of general polyhedral cells.
const cellZoneList & cellZones() const
Return cell zones.
const faceZoneList & faceZones() const
Return face zones.
Container for searchableSurfaces.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
virtual bool hasVolumeType() const =0
Whether supports volume type below.
A surface zone on a MeshedSurface.
static labelList getInsidePointNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of surfaces with a cellZone that have 'insidePoint'.
areaSelectionAlgo
Types of selection of area.
static const NamedEnum< faceZoneType, 3 > faceZoneTypeNames
static labelList getUnnamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of unnamed surfaces (surfaces without faceZoneName)
faceZoneType
What to do with faceZone faces.
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces (surfaces with faceZoneName)
static const NamedEnum< areaSelectionAlgo, 4 > areaSelectionAlgoNames
static labelList getClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaceList &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed and.
surfaceZonesInfo(const searchableSurface &surface, const dictionary &surfacesDict)
Construct from surfaces and dictionary.
static labelList getAllClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaceList &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)
static labelList getUnclosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaceList &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are unclosed.
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionSet dimLength
List< bool > boolList
Bool container classes.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)