surfaceZonesInfo.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013-2015 OpenFOAM Foundation
9  Copyright (C) 2015 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "surfaceZonesInfo.H"
30 #include "searchableSurface.H"
31 #include "searchableSurfaces.H"
32 #include "polyMesh.H"
33 #include "dictionary.H"
34 
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 
37 const Foam::Enum
38 <
40 >
42 ({
43  { areaSelectionAlgo::INSIDE, "inside" },
44  { areaSelectionAlgo::OUTSIDE, "outside" },
45  { areaSelectionAlgo::INSIDEPOINT, "insidePoint" },
46  { areaSelectionAlgo::NONE, "none" },
47 });
48 
49 
50 const Foam::Enum
51 <
53 >
55 ({
56  { faceZoneNaming::NOZONE, "none" },
57  { faceZoneNaming::SINGLE, "single" },
58  { faceZoneNaming::REGION, "region" }
59 });
60 
61 
62 const Foam::Enum
63 <
65 >
67 ({
68  { faceZoneType::INTERNAL, "internal" },
69  { faceZoneType::BAFFLE, "baffle" },
70  { faceZoneType::BOUNDARY, "boundary" },
71 });
72 
73 
74 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
75 
77 (
78  const searchableSurface& surface,
79  const dictionary& surfacesDict,
80  const wordList& regionNames
81 )
82 :
83  faceZoneNames_(),
84  cellZoneName_(),
85  zoneInside_(NONE),
86  zoneInsidePoint_(point::min),
87  faceType_(INTERNAL)
88 {
89  const label nRegions = surface.regions().size();
90 
91  // Old syntax
92  surfaceZonesInfo::faceZoneNaming namingType = faceZoneNaming::NOZONE;
93 
94  word namingMethod;
95  word faceZoneName;
96  if (surfacesDict.readIfPresent("faceZone", faceZoneName))
97  {
98  // Single zone name per surface
99  if (surfacesDict.found("faceZoneNaming"))
100  {
101  FatalIOErrorInFunction(surfacesDict)
102  << "Cannot provide both \"faceZone\" and \"faceZoneNaming\""
103  << exit(FatalIOError);
104  }
105 
106  namingType = faceZoneNaming::SINGLE;
107  faceZoneNames_.setSize(nRegions, faceZoneName);
108  }
109  else if (surfacesDict.readIfPresent("faceZoneNaming", namingMethod))
110  {
111  //namingType = faceZoneNamingNames.get("faceZoneNaming", surfacesDict);
112  namingType = faceZoneNamingNames[namingMethod];
113 
114  // Generate faceZone names. Maybe make runtime-selection table?
115  switch (namingType)
116  {
117  case faceZoneNaming::NOZONE:
118  break;
119 
120  case faceZoneNaming::SINGLE:
121  {
122  // Should already be handled above
123  faceZoneNames_.setSize
124  (
125  nRegions,
126  surfacesDict.get<word>("faceZone")
127  );
128  }
129  break;
130 
131  case faceZoneNaming::REGION:
132  {
133  faceZoneNames_ = regionNames;
134  }
135  break;
136  }
137  }
138 
139  if (faceZoneNames_.size())
140  {
141  if (faceZoneNames_.size() != nRegions)
142  {
143  FatalIOErrorInFunction(surfacesDict)
144  << "Number of faceZones (through 'faceZones' keyword)"
145  << " does not correspond to the number of regions "
146  << nRegions << " in surface " << surface.name()
147  << exit(FatalIOError);
148  }
149 
150  // Read optional entry to determine inside of faceZone
151 
152  word method;
153  bool hasSide = surfacesDict.readIfPresent("cellZoneInside", method);
154  if (hasSide)
155  {
156  zoneInside_ = areaSelectionAlgoNames[method];
157  if (zoneInside_ == INSIDEPOINT)
158  {
159  surfacesDict.readEntry("insidePoint", zoneInsidePoint_);
160  }
161 
162  }
163  else
164  {
165  // Check old syntax
166  bool inside;
167  if (surfacesDict.readIfPresent("zoneInside", inside))
168  {
169  hasSide = true;
170  zoneInside_ = (inside ? INSIDE : OUTSIDE);
171  }
172  }
173 
174  // Read optional cellZone name
175 
176  if (surfacesDict.readIfPresent("cellZone", cellZoneName_))
177  {
178  if
179  (
180  (
181  zoneInside_ == INSIDE
182  || zoneInside_ == OUTSIDE
183  )
184  && !surface.hasVolumeType()
185  )
186  {
187  IOWarningInFunction(surfacesDict)
188  << "Illegal entry zoneInside "
189  << areaSelectionAlgoNames[zoneInside_]
190  << " for faceZones "
191  << faceZoneNames_
192  << " since surface is not closed." << endl;
193  }
194  }
195  else if (hasSide)
196  {
197  IOWarningInFunction(surfacesDict)
198  << "Unused entry zoneInside for faceZone "
199  << faceZoneNames_
200  << " since no cellZone specified."
201  << endl;
202  }
203 
204  // How to handle faces on faceZone
205  word faceTypeMethod;
206  if (surfacesDict.readIfPresent("faceType", faceTypeMethod))
207  {
208  faceType_ = faceZoneTypeNames[faceTypeMethod];
209  }
210  }
211 }
212 
213 
215 (
216  const wordList& faceZoneNames,
217  const word& cellZoneName,
218  const areaSelectionAlgo& zoneInside,
219  const point& zoneInsidePoint,
220  const faceZoneType& faceType
221 )
222 :
223  faceZoneNames_(faceZoneNames),
224  cellZoneName_(cellZoneName),
225  zoneInside_(zoneInside),
226  zoneInsidePoint_(zoneInsidePoint),
227  faceType_(faceType)
228 {}
229 
230 
232 :
233  faceZoneNames_(surfZone.faceZoneNames()),
234  cellZoneName_(surfZone.cellZoneName()),
235  zoneInside_(surfZone.zoneInside()),
236  zoneInsidePoint_(surfZone.zoneInsidePoint()),
237  faceType_(surfZone.faceType())
238 {}
239 
240 
242 (
243  const PtrList<surfaceZonesInfo>& surfList
244 )
245 {
246  labelList anonymousSurfaces(surfList.size());
247 
248  label i = 0;
249  forAll(surfList, surfI)
250  {
251  if (surfList[surfI].faceZoneNames().empty())
252  {
253  anonymousSurfaces[i++] = surfI;
254  }
255  }
256  anonymousSurfaces.setSize(i);
257 
258  return anonymousSurfaces;
259 }
260 
261 
263 (
264  const PtrList<surfaceZonesInfo>& surfList
265 )
266 {
267  labelList namedSurfaces(surfList.size());
268 
269  label namedI = 0;
270  forAll(surfList, surfI)
271  {
272  if
273  (
274  surfList.set(surfI)
275  && surfList[surfI].faceZoneNames().size()
276  )
277  {
278  namedSurfaces[namedI++] = surfI;
279  }
280  }
281  namedSurfaces.setSize(namedI);
282 
283  return namedSurfaces;
284 }
285 
286 
288 (
289  const PtrList<surfaceZonesInfo>& surfList
290 )
291 {
292  labelList namedSurfaces(surfList.size());
293 
294  label namedI = 0;
295  forAll(surfList, surfI)
296  {
297  if
298  (
299  surfList.set(surfI)
300  && surfList[surfI].faceZoneNames().size()
301  && !surfList[surfI].cellZoneName().size()
302  )
303  {
304  namedSurfaces[namedI++] = surfI;
305  }
306  }
307  namedSurfaces.setSize(namedI);
308 
309  return namedSurfaces;
310 }
311 
312 
314 (
315  const PtrList<surfaceZonesInfo>& surfList,
316  const searchableSurfaces& allGeometry,
317  const labelList& surfaces
318 )
319 {
320  labelList closed(surfList.size());
321 
322  label closedI = 0;
323  forAll(surfList, surfI)
324  {
325  if
326  (
327  surfList.set(surfI)
328  && surfList[surfI].cellZoneName().size()
329  && (
330  surfList[surfI].zoneInside() == surfaceZonesInfo::INSIDE
331  || surfList[surfI].zoneInside() == surfaceZonesInfo::OUTSIDE
332  )
333  && allGeometry[surfaces[surfI]].hasVolumeType()
334  )
335  {
336  closed[closedI++] = surfI;
337  }
338  }
339  closed.setSize(closedI);
340 
341  return closed;
342 }
343 
344 
346 (
347  const PtrList<surfaceZonesInfo>& surfList,
348  const searchableSurfaces& allGeometry,
349  const labelList& surfaces
350 )
351 {
352  labelList unclosed(surfList.size());
353 
354  label unclosedI = 0;
355  forAll(surfList, surfI)
356  {
357  if
358  (
359  surfList.set(surfI)
360  && !allGeometry[surfaces[surfI]].hasVolumeType()
361  )
362  {
363  unclosed[unclosedI++] = surfI;
364  }
365  }
366  unclosed.setSize(unclosedI);
367 
368  return unclosed;
369 }
370 
371 
373 (
374  const PtrList<surfaceZonesInfo>& surfList,
375  const searchableSurfaces& allGeometry,
376  const labelList& surfaces
377 )
378 {
379  labelList closed(surfList.size());
380 
381  label closedI = 0;
382  forAll(surfList, surfI)
383  {
384  if
385  (
386  surfList.set(surfI)
387  && surfList[surfI].cellZoneName().size()
388  && allGeometry[surfaces[surfI]].hasVolumeType()
389  )
390  {
391  closed[closedI++] = surfI;
392  }
393  }
394  closed.setSize(closedI);
395 
396  return closed;
397 }
398 
399 
401 (
402  const PtrList<surfaceZonesInfo>& surfList
403 )
404 {
405  labelList closed(surfList.size());
406 
407  label closedI = 0;
408  forAll(surfList, surfI)
409  {
410  if
411  (
412  surfList.set(surfI)
413  && surfList[surfI].cellZoneName().size()
414  && surfList[surfI].zoneInside() == surfaceZonesInfo::INSIDEPOINT
415  )
416  {
417  closed[closedI++] = surfI;
418  }
419  }
420  closed.setSize(closedI);
421 
422  return closed;
423 }
424 
425 
427 (
428  const word& name,
429  const labelList& addressing,
430  polyMesh& mesh
431 )
432 {
433  cellZoneMesh& cellZones = mesh.cellZones();
434 
435  label zoneI = cellZones.findZoneID(name);
436 
437  if (zoneI == -1)
438  {
439  zoneI = cellZones.size();
440  cellZones.setSize(zoneI+1);
441  cellZones.set
442  (
443  zoneI,
444  new cellZone
445  (
446  name, // name
447  addressing, // addressing
448  zoneI, // index
449  cellZones // cellZoneMesh
450  )
451  );
452  }
453  return zoneI;
454 }
455 
456 
458 (
459  const PtrList<surfaceZonesInfo>& surfList,
460  const labelList& namedSurfaces,
461  polyMesh& mesh
462 )
463 {
464  labelList surfaceToCellZone(surfList.size(), -1);
465 
466  forAll(namedSurfaces, i)
467  {
468  label surfI = namedSurfaces[i];
469 
470  const word& cellZoneName = surfList[surfI].cellZoneName();
471 
472  if (cellZoneName != word::null)
473  {
474  label zoneI = addCellZone
475  (
476  cellZoneName,
477  labelList(0), // addressing
478  mesh
479  );
480 
481  surfaceToCellZone[surfI] = zoneI;
482  }
483  }
484 
485  // Check they are synced
486  List<wordList> allCellZones(Pstream::nProcs());
487  allCellZones[Pstream::myProcNo()] = mesh.cellZones().names();
488  Pstream::gatherList(allCellZones);
489  Pstream::scatterList(allCellZones);
490 
491  for (label proci = 1; proci < allCellZones.size(); proci++)
492  {
493  if (allCellZones[proci] != allCellZones[0])
494  {
496  << "Zones not synchronised among processors." << nl
497  << " Processor0 has cellZones:" << allCellZones[0]
498  << " , processor" << proci
499  << " has cellZones:" << allCellZones[proci]
500  << exit(FatalError);
501  }
502  }
503 
504  return surfaceToCellZone;
505 }
506 
507 
508 
510 (
511  const word& name,
512  const labelList& addressing,
513  const boolList& flipMap,
514  polyMesh& mesh
515 )
516 {
517  faceZoneMesh& faceZones = mesh.faceZones();
518 
519  label zoneI = faceZones.findZoneID(name);
520 
521  if (zoneI == -1)
522  {
523  zoneI = faceZones.size();
524  faceZones.setSize(zoneI+1);
525  faceZones.set
526  (
527  zoneI,
528  new faceZone
529  (
530  name, // name
531  addressing, // addressing
532  flipMap, // flipMap
533  zoneI, // index
534  faceZones // faceZoneMesh
535  )
536  );
537  }
538  return zoneI;
539 }
540 
541 
543 (
544  const PtrList<surfaceZonesInfo>& surfList,
545  const labelList& namedSurfaces,
546  polyMesh& mesh
547 )
548 {
549  labelListList surfaceToFaceZones(surfList.size());
550 
551  faceZoneMesh& faceZones = mesh.faceZones();
552 
553  forAll(namedSurfaces, i)
554  {
555  label surfI = namedSurfaces[i];
556 
557  const wordList& faceZoneNames = surfList[surfI].faceZoneNames();
558 
559  surfaceToFaceZones[surfI].setSize(faceZoneNames.size(), -1);
560  forAll(faceZoneNames, j)
561  {
562  const word& faceZoneName = faceZoneNames[j];
563 
564  label zoneI = addFaceZone
565  (
566  faceZoneName, //name
567  labelList(0), //addressing
568  boolList(0), //flipmap
569  mesh
570  );
571 
572  surfaceToFaceZones[surfI][j] = zoneI;
573  }
574  }
575 
576  // Check they are synced
577  List<wordList> allFaceZones(Pstream::nProcs());
578  allFaceZones[Pstream::myProcNo()] = faceZones.names();
579  Pstream::gatherList(allFaceZones);
580  Pstream::scatterList(allFaceZones);
581 
582  for (label proci = 1; proci < allFaceZones.size(); proci++)
583  {
584  if (allFaceZones[proci] != allFaceZones[0])
585  {
587  << "Zones not synchronised among processors." << nl
588  << " Processor0 has faceZones:" << allFaceZones[0]
589  << " , processor" << proci
590  << " has faceZones:" << allFaceZones[proci]
591  << exit(FatalError);
592  }
593  }
594 
595  return surfaceToFaceZones;
596 }
597 
598 
599 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::Enum
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: IOstreamOption.H:57
Foam::surfaceZonesInfo::faceZoneType
faceZoneType
What to do with faceZone faces.
Definition: surfaceZonesInfo.H:86
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::surfaceZonesInfo::getInsidePointNamedSurfaces
static labelList getInsidePointNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of surfaces with a cellZone that have 'insidePoint'.
Definition: surfaceZonesInfo.C:401
searchableSurface.H
Foam::dictionary::found
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Definition: dictionaryI.H:87
Foam::Pstream::scatterList
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
Definition: gatherScatterList.C:215
Foam::boolList
List< bool > boolList
A List of bools.
Definition: List.H:65
Foam::surfaceZonesInfo::getNamedSurfaces
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces (surfaces with faceZoneName)
Definition: surfaceZonesInfo.C:263
Foam::FatalIOError
IOerror FatalIOError
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::PtrList::set
const T * set(const label i) const
Return const pointer to element (can be nullptr),.
Definition: PtrList.H:138
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:107
Foam::surfaceZonesInfo::INSIDE
Definition: surfaceZonesInfo.H:67
Foam::surfaceZonesInfo::getAllClosedNamedSurfaces
static labelList getAllClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed.
Definition: surfaceZonesInfo.C:373
polyMesh.H
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
regionNames
wordList regionNames
Definition: getAllRegionOptions.H:37
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::cellZone
A subset of mesh cells.
Definition: cellZone.H:62
Foam::surfaceZonesInfo::getStandaloneNamedSurfaces
static labelList getStandaloneNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of named surfaces without a cellZone.
Definition: surfaceZonesInfo.C:288
searchableSurfaces.H
Foam::searchableSurface::regions
virtual const wordList & regions() const =0
Names of regions.
Foam::faceZone
A subset of mesh faces organised as a primitive patch.
Definition: faceZone.H:64
Foam::polyMesh::cellZones
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
Definition: polyMesh.H:492
Foam::List::setSize
void setSize(const label n)
Alias for resize()
Definition: List.H:222
Foam::searchableSurface
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
Definition: searchableSurface.H:69
Foam::PtrList::setSize
void setSize(const label newLen)
Same as resize()
Definition: PtrList.H:151
Foam::surfaceZonesInfo::areaSelectionAlgo
areaSelectionAlgo
Types of selection of area.
Definition: surfaceZonesInfo.H:65
Foam::ZoneMesh< cellZone, polyMesh >
Foam::dictionary::readEntry
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Definition: dictionaryTemplates.C:302
Foam::polyMesh::faceZones
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
Definition: polyMesh.H:486
Foam::surfaceZonesInfo::OUTSIDE
Definition: surfaceZonesInfo.H:68
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::surfaceZonesInfo
Definition: surfaceZonesInfo.H:60
surfaceZonesInfo.H
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::surfaceZonesInfo::INSIDEPOINT
Definition: surfaceZonesInfo.H:69
Foam::searchableSurface::hasVolumeType
virtual bool hasVolumeType() const
Whether supports volume type (below).
Definition: searchableSurface.C:76
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::surfaceZonesInfo::faceZoneNamingNames
static const Enum< faceZoneNaming > faceZoneNamingNames
Definition: surfaceZonesInfo.H:83
Foam::ZoneMesh::findZoneID
label findZoneID(const word &zoneName) const
Find zone index by name, return -1 if not found.
Definition: ZoneMesh.C:519
Foam::surfaceZonesInfo::getClosedNamedSurfaces
static labelList getClosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are closed and.
Definition: surfaceZonesInfo.C:314
Foam::ZoneMesh::names
wordList names() const
A list of the zone names.
Definition: ZoneMesh.C:305
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::surfaceZonesInfo::getUnclosedNamedSurfaces
static labelList getUnclosedNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList, const searchableSurfaces &allGeometry, const labelList &surfaces)
Get indices of surfaces with a cellZone that are unclosed.
Definition: surfaceZonesInfo.C:346
Foam::surfaceZonesInfo::getUnnamedSurfaces
static labelList getUnnamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
Get indices of unnamed surfaces (surfaces without faceZoneName)
Definition: surfaceZonesInfo.C:242
Foam::IOobject::name
const word & name() const noexcept
Return name.
Definition: IOobjectI.H:65
Foam::surfaceZonesInfo::faceZoneTypeNames
static const Enum< faceZoneType > faceZoneTypeNames
Definition: surfaceZonesInfo.H:93
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::Pstream::gatherList
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
Definition: gatherScatterList.C:52
Foam::UPstream::myProcNo
static int myProcNo(const label communicator=worldComm)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:463
Foam::nl
constexpr char nl
Definition: Ostream.H:404
Foam::surfaceZonesInfo::faceZoneNaming
faceZoneNaming
How to generate faceZone name.
Definition: surfaceZonesInfo.H:76
Foam::Vector< scalar >
Foam::List< word >
Foam::surfZone
A surface zone on a MeshedSurface.
Definition: surfZone.H:56
Foam::searchableSurfaces
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
Definition: searchableSurfaces.H:92
dictionary.H
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
FatalIOErrorInFunction
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:473
Foam::surfaceZonesInfo::addFaceZonesToMesh
static labelListList addFaceZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Definition: surfaceZonesInfo.C:543
IOWarningInFunction
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Definition: messageStream.H:340
Foam::surfaceZonesInfo::areaSelectionAlgoNames
static const Enum< areaSelectionAlgo > areaSelectionAlgoNames
Definition: surfaceZonesInfo.H:73
Foam::surfaceZonesInfo::surfaceZonesInfo
surfaceZonesInfo(const searchableSurface &surface, const dictionary &surfacesDict, const wordList &regionNames)
Construct from surfaces and dictionary and fully resolved.
Definition: surfaceZonesInfo.C:77
Foam::UPstream::nProcs
static label nProcs(const label communicator=worldComm)
Number of processes in parallel run, and 1 for serial run.
Definition: UPstream.H:445
Foam::dictionary::readIfPresent
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:405
Foam::surfaceZonesInfo::addCellZone
static label addCellZone(const word &name, const labelList &addressing, polyMesh &mesh)
Definition: surfaceZonesInfo.C:427
Foam::surfaceZonesInfo::addCellZonesToMesh
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)
Definition: surfaceZonesInfo.C:458
Foam::surfaceZonesInfo::addFaceZone
static label addFaceZone(const word &name, const labelList &addressing, const boolList &flipMap, polyMesh &mesh)
Definition: surfaceZonesInfo.C:510