97 zoneInside_ = areaSelectionAlgoNames[method];
98 if (zoneInside_ == INSIDEPOINT)
100 surfacesDict.
lookup(
"insidePoint") >> zoneInsidePoint_;
111 zoneInside_ == INSIDE
112 || zoneInside_ == OUTSIDE
120 ) <<
"Illegal entry zoneInside " 121 << areaSelectionAlgoNames[zoneInside_]
124 <<
" since surface is not closed." <<
endl;
132 ) <<
"Unused entry zoneInside for faceZone " 134 <<
" since no cellZone specified." 142 faceType_ = faceZoneTypeNames[faceTypeMethod];
150 const word& faceZoneName,
151 const word& cellZoneName,
153 const point& zoneInsidePoint,
157 faceZoneName_(faceZoneName),
158 cellZoneName_(cellZoneName),
159 zoneInside_(zoneInside),
160 zoneInsidePoint_(zoneInsidePoint),
167 faceZoneName_(surfZone.faceZoneName()),
168 cellZoneName_(surfZone.cellZoneName()),
169 zoneInside_(surfZone.zoneInside()),
170 zoneInsidePoint_(surfZone.zoneInsidePoint()),
171 faceType_(surfZone.faceType())
187 anonymousSurfaces[i++] = surfi;
190 anonymousSurfaces.setSize(i);
192 return anonymousSurfaces;
209 && surfList[surfi].faceZoneName().
size()
212 namedSurfaces[namedI++] = surfi;
217 return namedSurfaces;
236 && surfList[surfi].cellZoneName().
size()
241 && allGeometry[surfaces[surfi]].hasVolumeType()
244 closed[closedI++] = surfi;
247 closed.setSize(closedI);
268 && !allGeometry[surfaces[surfi]].hasVolumeType()
271 unclosed[unclosedI++] = surfi;
274 unclosed.setSize(unclosedI);
295 && surfList[surfi].cellZoneName().
size()
296 && allGeometry[surfaces[surfi]].hasVolumeType()
299 closed[closedI++] = surfi;
302 closed.setSize(closedI);
321 && surfList[surfi].cellZoneName().
size()
325 closed[closedI++] = surfi;
328 closed.setSize(closedI);
347 label surfi = namedSurfaces[i];
349 const word& cellZoneName = surfList[surfi].cellZoneName();
353 label zonei = cellZones.findZoneID(cellZoneName);
357 zonei = cellZones.size();
358 cellZones.setSize(zonei+1);
372 surfaceToCellZone[surfi] = zonei;
382 for (
label proci = 1; proci < allCellZones.
size(); proci++)
384 if (allCellZones[proci] != allCellZones[0])
387 <<
"Zones not synchronised among processors." <<
nl 388 <<
" Processor0 has cellZones:" << allCellZones[0]
389 <<
" , processor" << proci
390 <<
" has cellZones:" << allCellZones[proci]
395 return surfaceToCellZone;
412 label surfi = namedSurfaces[i];
414 const word& faceZoneName = surfList[surfi].faceZoneName();
416 label zonei = faceZones.findZoneID(faceZoneName);
420 zonei = faceZones.size();
421 faceZones.setSize(zonei+1);
436 surfaceToFaceZone[surfi] = zonei;
445 for (
label proci = 1; proci < allFaceZones.
size(); proci++)
447 if (allFaceZones[proci] != allFaceZones[0])
450 <<
"Zones not synchronised among processors." <<
nl 451 <<
" Processor0 has faceZones:" << allFaceZones[0]
452 <<
" , processor" << proci
453 <<
" has faceZones:" << allFaceZones[proci]
458 return surfaceToFaceZone;
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
#define forAll(list, i)
Loop across all elements in list.
bool set(const label) const
Is element set.
static const NamedEnum< faceZoneType, 3 > faceZoneTypeNames
errorManipArg< error, int > exit(error &err, const int errNo=1)
const meshCellZones & cellZones() const
Return cell zones.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A surface zone on a MeshedSurface.
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Base class of (analytical or triangulated) surface. Encapsulates all the search routines. WIP.
Initialise the NamedEnum HashTable from the static list of names.
static labelList getUnclosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are unclosed.
static const Vector< scalar > min
static labelList getAllClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed.
List< bool > boolList
Bool container classes.
A class for handling words, derived from string.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
static const word null
An empty word.
Container for searchableSurfaces.
List< label > labelList
A List of labels.
static labelList getInsidePointNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of surfaces with a cellZone that have 'insidePoint'.
static labelList getUnnamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of unnamed surfaces (surfaces without faceZoneName)
label size() const
Return the number of elements in the UPtrList.
void setSize(const label)
Reset size of List.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
const meshFaceZones & faceZones() const
Return face zones.
static labelList addFaceZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
static labelList getClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed and.
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces (surfaces with faceZoneName)
static const NamedEnum< areaSelectionAlgo, 4 > areaSelectionAlgoNames
faceZoneType
What to do with faceZone faces.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Mesh consisting of general polyhedral cells.
surfaceZonesInfo(const searchableSurface &surface, const dictionary &surfacesDict)
Construct from surfaces and dictionary.
A subset of mesh faces organised as a primitive patch.
const word & faceZoneName() const
Per 'interface' surface : empty or name of faceZone to put.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
areaSelectionAlgo
Types of selection of area.
virtual bool hasVolumeType() const =0
Whether supports volume type below.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.