Go to the documentation of this file.
75 label sizeCoeffToRefinement
77 const scalar level0Coeff,
78 const scalar sizeCoeff
81 return round(::
log(level0Coeff/sizeCoeff)/::
log(2));
90 const label gapLevelIncrement,
91 const scalar level0Coeff
100 const word& geomName = allGeometry.
names()[geomi];
102 if (surfacesDict.
found(geomName))
129 const word& geomName = allGeometry.
names()[geomi];
138 names[surfi] = geomName;
139 surfaces[surfi] = geomi;
146 const word scsFuncName =
147 shapeDict.
get<
word>(
"surfaceCellSizeFunction");
152 const scalar surfaceCellSize =
153 scsDict.
get<scalar>(
"surfaceCellSizeCoeff");
155 const label refLevel = sizeCoeffToRefinement
161 globalMinLevel[surfi] = refLevel;
162 globalMaxLevel[surfi] = refLevel;
163 globalLevelIncr[surfi] = gapLevelIncrement;
179 if (shapeDict.
found(
"patchInfo"))
191 if (shapeDict.
found(
"regions"))
195 allGeometry[surfaces[surfi]].regions();
207 if (regionDict.
found(
"patchInfo"))
209 regionPatchInfo[surfi].insert
220 if (shapeDict.
found(
"regions"))
225 allGeometry[surfaces[surfi]].regions();
232 shapeControlRegionsDict.
subDict
237 const word scsFuncName =
238 shapeControlRegionDict.
get<
word>
240 "surfaceCellSizeFunction"
245 scsFuncName +
"Coeffs"
248 const scalar surfaceCellSize =
249 scsDict.
get<scalar>(
"surfaceCellSizeCoeff");
251 const label refLevel = sizeCoeffToRefinement
257 regionMinLevel[surfi].insert(regioni, refLevel);
258 regionMaxLevel[surfi].insert(regioni, refLevel);
259 regionLevelIncr[surfi].insert(regioni, 0);
273 regionOffset[surfi] = nRegions;
274 nRegions += allGeometry[surfaces[surfi]].regions().size();
283 forAll(globalMinLevel, surfi)
285 label nRegions = allGeometry[surfaces[surfi]].regions().size();
288 for (label i = 0; i < nRegions; i++)
290 label globalRegioni = regionOffset[surfi] + i;
291 minLevel[globalRegioni] = globalMinLevel[surfi];
292 maxLevel[globalRegioni] = globalMaxLevel[surfi];
293 gapLevel[globalRegioni] =
294 maxLevel[globalRegioni]
295 + globalLevelIncr[surfi];
297 if (globalPatchInfo.set(surfi))
302 globalPatchInfo[surfi].clone()
310 label globalRegioni = regionOffset[surfi] + iter.key();
312 minLevel[globalRegioni] = iter();
313 maxLevel[globalRegioni] = regionMaxLevel[surfi][iter.key()];
314 gapLevel[globalRegioni] =
315 maxLevel[globalRegioni]
316 + regionLevelIncr[surfi][iter.key()];
322 label globalRegioni = regionOffset[surfi] + iter.key();
323 patchInfo.
set(globalRegioni, iter()().clone());
362 <<
setw(10) <<
"Min Level"
363 <<
setw(10) <<
"Max Level"
364 <<
setw(10) <<
"Gap Level" <<
nl
365 <<
setw(maxLen) <<
"------"
366 <<
setw(10) <<
"---------"
367 <<
setw(10) <<
"---------"
408 for (
const label patchi : includePatches)
411 patchSize.insert(pp.
name(), pp.size());
421 label sz = compactZoneID.size();
422 compactZoneID.insert(iter.key(), sz);
431 label patchi =
bMesh.findPatchID(iter.key());
434 patchToCompactZone[patchi] = iter();
441 for (
const label patchi : includePatches)
446 faceLabels.append(pp.
start()+i);
447 compactZones.append(patchToCompactZone[pp.
index()]);
464 allBoundary.meshPoints(),
465 allBoundary.meshPointMap(),
501 gatheredPoints.clear();
503 faceList allFaces = ListListOps::combine<faceList>
508 gatheredFaces.clear();
510 labelList allZones = ListListOps::combine<labelList>
515 gatheredZones.clear();
523 Info<<
"surfZone " << iter() <<
" : " << surfZones[iter()].name()
544 globalCasePath.clean();
546 Info<<
"Writing merged surface to " << globalCasePath <<
endl;
548 sortedFace.
write(globalCasePath);
559 label nUnaligned = 0;
563 const face&
f = faces[facei];
566 label fp1 =
f.fcIndex(fp);
569 const scalar magV(
mag(v));
570 if (magV > ROOTVSMALL)
575 dir < pTraits<vector>::nComponents;
579 const scalar
s(
mag(v[dir]));
580 if (
s > magV*tol &&
s < magV*(1-tol))
594 os <<
"Initial mesh has " << nUnaligned
595 <<
" edges unaligned with any of the coordinate axes" <<
nl <<
endl;
602 scalar getMergeDistance
605 const scalar mergeTol,
610 scalar mergeDist = mergeTol *
meshBb.mag();
613 <<
"Overall mesh bounding box : " <<
meshBb <<
nl
614 <<
"Relative tolerance : " << mergeTol <<
nl
615 <<
"Absolute matching distance : " << mergeDist <<
nl
627 if (mergeTol < writeTol)
630 <<
"Your current settings specify ASCII writing with "
632 <<
"Your merging tolerance (" << mergeTol
633 <<
") is finer than this." <<
nl
634 <<
"Change to binary writeFormat, "
635 <<
"or increase the writePrecision" <<
endl
636 <<
"or adjust the merge tolerance (mergeTol)."
661 if (!isA<processorPolyPatch>(pp))
665 isA<coupledPolyPatch>(pp)
670 oldToNew[patchi] = newPatchi++;
679 if (isA<processorPolyPatch>(pp))
681 oldToNew[patchi] = newPatchi++;
686 const label nKeepPatches = newPatchi;
689 if (nKeepPatches != pbm.size())
696 if (oldToNew[patchi] == -1)
699 <<
" type " << pbm[patchi].type()
700 <<
" at position " << patchi <<
endl;
701 oldToNew[patchi] = newPatchi++;
739 Info<<
"Wrote mesh in = "
744 int main(
int argc,
char *argv[])
748 "Automatic split hex mesher. Refines and snaps to surface"
757 "Check all surface geometry for quality"
761 "Check case set-up only using a single time step"
767 "Simplify the surface using snappyHexMesh starting from a boundBox"
772 "(patch0 .. patchN)",
773 "Only triangulate selected patches (wildcards supported)"
779 "Name of the file to save the simplified surface to"
788 const bool overwrite =
args.
found(
"overwrite");
790 const bool surfaceSimplify =
args.
found(
"surfaceSimplify");
795 Info<<
"Operating in dry-run mode to detect set-up errors"
801 Info<<
"Read mesh in = "
843 const scalar mergeDist = getMergeDistance
846 meshRefinement::get<scalar>
871 const scalar maxSizeRatio
906 decomposeDict = *dictPtr;
910 decomposeDict.
add(
"method",
"none");
911 decomposeDict.
add(
"numberOfSubdomains", 1);
1015 Info<<
"Reading refinement surfaces." <<
endl;
1017 if (surfaceSimplify)
1019 addProfiling(surfaceSimplify,
"snappyHexMesh::surfaceSimplify");
1035 "geometryToConformTo"
1039 foamyHexMeshDict.
subDict(
"motionControl");
1042 motionDict.
subDict(
"shapeControlFunctions");
1045 const scalar defaultCellSize =
1046 motionDict.
get<scalar>(
"defaultCellSize");
1048 const scalar initialCellSize =
::pow(
mesh.
V()[0], 1.0/3.0);
1056 createRefinementSurfaces
1062 initialCellSize/defaultCellSize
1077 "refinementSurfaces",
1085 Info<<
"Read refinement surfaces in = "
1103 forAll(surfaceGeometry, surfi)
1105 label geomi = surfaceGeometry[surfi];
1109 forAll(regNames, regioni)
1111 label globalRegioni = surfaces.
globalRegion(surfi, regioni);
1113 if (patchInfo.
set(globalRegioni))
1116 meshRefinement::get<word>
1118 patchInfo[globalRegioni],
1127 patchTypes[geomi][regioni] = wallPolyPatch::typeName;
1156 Info<<
"Checking for geometry size relative to mesh." <<
endl;
1158 forAll(allGeometry, geomi)
1164 if (ratio > maxSizeRatio || ratio < 1.0/maxSizeRatio)
1167 <<
" " << allGeometry.
names()[geomi]
1168 <<
" bounds differ from mesh"
1169 <<
" by more than a factor " << maxSizeRatio <<
":" <<
nl
1170 <<
" bounding box : " << bb <<
nl
1171 <<
" mesh bounding box : " <<
meshBb
1174 if (!
meshBb.contains(bb))
1177 <<
" " << allGeometry.
names()[geomi]
1178 <<
" bounds not fully contained in mesh" <<
nl
1179 <<
" bounding box : " << bb <<
nl
1180 <<
" mesh bounding box : " <<
meshBb
1193 Info<<
"Reading refinement shells." <<
endl;
1200 Info<<
"Read refinement shells in = "
1204 Info<<
"Setting refinement level of surface to be consistent"
1205 <<
" with shells." <<
endl;
1207 Info<<
"Checked shell refinement in = "
1216 if (!limitDict.empty())
1218 Info<<
"Reading limit shells." <<
endl;
1223 if (!limitDict.empty())
1225 Info<<
"Read limit shells in = "
1235 unusedGeometries.erase(surfaces.
surfaces());
1236 unusedGeometries.erase(shells.shells());
1237 unusedGeometries.erase(limitShells.shells());
1239 if (unusedGeometries.size())
1242 <<
"The following geometry entries are not used:" <<
nl;
1243 for (
const label geomi : unusedGeometries)
1245 Info<<
" " << allGeomNames[geomi] <<
nl;
1257 Info<<
"Reading features." <<
endl;
1267 Info<<
"Read features in = "
1274 Info<<
"Checking for line geometry size relative to surface geometry."
1278 bool hasErrors = features.checkSizes
1296 <<
"Determining initial surface intersections" <<
nl
1297 <<
"-----------------------------------------" <<
nl
1317 Info<<
"Calculated surface intersections in = "
1360 refineParams.addCellZonesToMesh(
mesh);
1375 <<
"Adding patches for surface regions" <<
nl
1376 <<
"----------------------------------" <<
nl
1386 <<
setw(6) <<
"Patch"
1387 <<
setw(20) <<
"Type"
1388 <<
setw(30) <<
"Region" <<
nl
1389 <<
setw(6) <<
"-----"
1390 <<
setw(20) <<
"----"
1398 forAll(surfaceGeometry, surfi)
1400 label geomi = surfaceGeometry[surfi];
1410 surfaces.
surfZones()[surfi].faceZoneNames();
1412 if (fzNames.empty())
1421 if (surfacePatchInfo.
set(globalRegioni))
1426 surfacePatchInfo[globalRegioni]
1432 patchInfo.
set(
"type", wallPolyPatch::typeName);
1444 <<
setw(6) << patchi
1445 <<
setw(20) << pbm[patchi].type()
1446 <<
setw(30) << regNames[i] <<
nl;
1449 globalToMasterPatch[globalRegioni] = patchi;
1450 globalToSlavePatch[globalRegioni] = patchi;
1464 if (surfacePatchInfo.
set(globalRegioni))
1469 surfacePatchInfo[globalRegioni]
1475 patchInfo.
set(
"type", wallPolyPatch::typeName);
1487 <<
setw(6) << patchi
1488 <<
setw(20) << pbm[patchi].type()
1489 <<
setw(30) << regNames[i] <<
nl;
1492 globalToMasterPatch[globalRegioni] = patchi;
1496 const word slaveName = regNames[i] +
"_slave";
1499 if (surfacePatchInfo.
set(globalRegioni))
1504 surfacePatchInfo[globalRegioni]
1510 patchInfo.
set(
"type", wallPolyPatch::typeName);
1522 <<
setw(6) << patchi
1523 <<
setw(20) << pbm[patchi].type()
1524 <<
setw(30) << slaveName <<
nl;
1527 globalToSlavePatch[globalRegioni] = patchi;
1533 if (regNames.size())
1537 const word& fzName = fzNames[fzi];
1538 label globalRegioni = surfaces.
globalRegion(surfi, fzi);
1543 pbm[globalToMasterPatch[globalRegioni]].
name(),
1544 pbm[globalToSlavePatch[globalRegioni]].
name(),
1556 Info<<
"Added patches in = "
1579 if (i != string::npos)
1581 word cz0 = fzName.substr(0, i);
1582 word cz1 = fzName.substr(i+4, fzName.size()-i+4);
1583 word slaveName(cz1 +
"_to_" + cz0);
1589 const word slaveName = fzName +
"_slave";
1595 if (faceZoneToPatches.
size())
1617 nFaces += pbm[adaptPatchIDs[i]].size();
1624 const polyPatch& pp = pbm[adaptPatchIDs[i]];
1627 faceLabels[nFaces++] = pp.
start()+i;
1652 <<
"You have selected decomposition method "
1653 << decomposer.typeName
1654 <<
" which is not parallel aware." <<
endl
1655 <<
"Please select one that is (hierarchical, ptscotch)"
1669 const bool wantRefine
1671 meshRefinement::get<bool>(
meshDict,
"castellatedMesh", dryRun)
1675 meshRefinement::get<bool>(
meshDict,
"snap", dryRun)
1677 const bool wantLayers
1679 meshRefinement::get<bool>(
meshDict,
"addLayers", dryRun)
1687 if (errorMsg.size() || IOerrorMsg.size())
1696 <<
"Missing/incorrect required dictionary entries:" <<
nl
1698 << IOerrorMsg.c_str() <<
nl
1699 << errorMsg.c_str() <<
nl <<
nl
1700 <<
"Exiting dry-run" <<
nl <<
endl;
1712 meshRefinement::FaceMergeType::GEOMETRIC;
1714 const bool mergePatchFaces
1719 if (!mergePatchFaces)
1721 Info<<
"Not merging patch-faces of cell to preserve"
1722 <<
" (split)hex cell shape."
1724 mergeType = meshRefinement::FaceMergeType::NONE;
1728 const bool mergeAcrossPatches
1733 if (mergeAcrossPatches)
1735 Info<<
"Merging co-planar patch-faces of cells"
1736 <<
", regardless of patch assignment"
1738 mergeType = meshRefinement::FaceMergeType::IGNOREPATCH;
1754 globalToMasterPatch,
1761 if (!overwrite && !debugLevel)
1767 refineDriver.doRefine
1772 refineParams.handleSnapProblems(),
1778 if (!keepPatches && !wantSnap && !wantLayers)
1794 Info<<
"Mesh refined in = "
1795 <<
timer.cpuTimeIncrement() <<
" s." <<
endl;
1807 globalToMasterPatch,
1812 if (!overwrite && !debugLevel)
1818 scalar curvature = refineParams.curvature();
1819 scalar planarAngle = refineParams.planarAngle();
1832 if (!keepPatches && !wantLayers)
1848 Info<<
"Mesh snapped in = "
1849 <<
timer.cpuTimeIncrement() <<
" s." <<
endl;
1869 globalToMasterPatch,
1877 (
mesh.
nCells() >= refineParams.maxLocalCells()),
1882 if (!overwrite && !debugLevel)
1887 layerDriver.doLayers
1915 Info<<
"Layers added in = "
1916 <<
timer.cpuTimeIncrement() <<
" s." <<
endl;
1926 Info<<
"Checking final mesh ..." <<
endl;
1937 Info<<
"Finished meshing with " << nErrors <<
" illegal faces"
1938 <<
" (concave, zero area or negative cell pyramid volume)"
1944 Info<<
"Finished meshing without any errors" <<
endl;
1951 if (surfaceSimplify)
1953 addProfiling(surfaceSimplify,
"snappyHexMesh::surfaceSimplify");
1961 includePatches =
bMesh.patchSet
1972 if (!isA<processorPolyPatch>(
patch))
1974 includePatches.insert(patchi);
1984 "constant/triSurface/simplifiedSurface.stl"
2000 "internalCellCentres",
2009 cellCentres.write();
2014 Info<<
"Finished meshing in = "
2023 if (errorMsg.size() || IOerrorMsg.size())
2031 <<
"Missing/incorrect required dictionary entries:" <<
nl
2033 << IOerrorMsg.c_str() <<
nl
2034 << errorMsg.c_str() <<
nl <<
nl
2035 <<
"Exiting dry-run" <<
nl <<
endl;
static void mapCombineGather(const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm)
A keyword and a list of tokens is an 'entry'.
List< label > labelList
A List of labels.
Smanip< ios_base::fmtflags > setf(const ios_base::fmtflags flags)
vectorField pointField
pointField is a vectorField.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
label size() const noexcept
virtual const pointField & points() const
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const labelList & maxLevel() const
A class for handling words, derived from Foam::string.
A class for handling file names.
A primitive field of type <T> with automated input and output.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
T getOrDefault(const word &optName, const T &deflt) const
static ITstream & lookup(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
static constexpr const zero Zero
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const labelList & surfaces() const
const word setFormat(propsDict.getOrDefault< word >("setFormat", "vtk"))
IOstream::streamFormat writeFormat() const
bool processorCase() const noexcept
static writeType writeLevel()
const word dictName("faMeshDefinition")
void printMeshInfo(const bool, const string &) const
label addFaceZone(const word &fzName, const word &masterPatch, const word &slavePatch, const surfaceZonesInfo::faceZoneType &fzType)
label checkTopology(const bool report) const
static word timeName(const scalar t, const int precision=precision_)
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
static const dictionary & subDict(const dictionary &dict, const word &keyword, const bool noExit, enum keyType::option matchOpt=keyType::REGEX)
static void addNote(const string ¬e)
bool insert(const Key &key, const T &obj)
A HashTable to objects of type <T> with a label key.
static bool master(const label communicator=worldComm)
static labelList getNamedSurfaces(const PtrList< surfaceZonesInfo > &surfList)
const keyType & keyword() const noexcept
double elapsedCpuTime() const
const polyBoundaryMesh & boundaryMesh() const
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces, const bool dryRun=false)
Ostream & endl(Ostream &os)
void writeStats(const List< wordList > &, Ostream &) const
const T * set(const label i) const
All to do with snapping to surface.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
entry * set(entry *entryPtr)
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
Starts timing CPU usage and return elapsed time from start.
A HashTable with keys but without contents that is similar to std::unordered_set.
const fvMesh & mesh() const
Ostream & incrIndent(Ostream &os)
double cpuTimeIncrement() const
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
const labelList & gapLevel() const
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Mesh consisting of general polyhedral cells.
Identifies a surface patch/zone by name and index, with optional geometric type.
wordList patchTypes(nPatches)
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
static const word canonicalName
Simple container to keep together snap specific information.
virtual bool parallelAware() const =0
const PtrList< surfaceZonesInfo > & surfZones() const
bool checkParallelSync(const bool report=false) const
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static void noFunctionObjects(bool addWithOption=false)
label nCells() const noexcept
Encapsulates queries for volume refinement ('refine all cells within shell').
const wordList & names() const
int dryRun() const noexcept
Generic templated field type.
static void checkCoupledFaceZones(const polyMesh &)
static int readFlags(const EnumContainer &namedEnum, const wordList &words)
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
A patch is a list of labels that address the faces in the global face list.
void setSize(const label n)
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
labelList meshedPatches() const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const labelList & minLevel() const
Istream and Ostream manipulators taking arguments.
Simple container to keep together refinement specific information.
const faceZoneMesh & faceZones() const noexcept
static IOobject selectIO(const IOobject &io, const fileName &altFile, const word &ioName="")
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
graph_traits< Graph >::vertices_size_type size_type
label checkGeometry(const polyMesh &mesh, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, const autoPtr< writer< scalar >> &setWriter)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label max(const labelHashSet &set, label maxValue=labelMin)
Simple container to keep together layer specific information.
static const Enum< writeType > writeTypeNames
#define addProfiling(name, descr)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
label globalRegion(const label surfI, const label regionI) const
dimensionedScalar log(const dimensionedScalar &ds)
OBJstream os(runTime.globalPath()/outputName)
Abstract base class for domain decomposition.
Base class for graphics format writing. Entry points are.
virtual bool write(const token &tok)=0
Mesh data needed to do the Finite Volume discretisation.
Ostream & decrIndent(Ostream &os)
label index() const noexcept
static void removeFiles(const polyMesh &)
Omanip< int > setw(const int i)
virtual const dictionary & dict() const =0
Ostream & indent(Ostream &os)
const List< wordList > & regionNames() const
static void addDryRunOption(const string &usage, bool advanced=false)
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
const PtrList< dictionary > & patchInfo() const
errorManipArg< error, int > exit(error &err, const int errNo=1)
All to do with adding layers.
const boundBox & bounds() const
void reset(autoPtr< T > &&other) noexcept
const word & name() const noexcept
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
static unsigned int defaultPrecision() noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const vectorField & cellCentres() const
label checkGeometry(const scalar maxRatio, const scalar tolerance, const autoPtr< writer< scalar >> &setWriter, const scalar minQuality, const bool report) const
const word & system() const
@ ASCII
"ascii" (normal default)
virtual const faceList & faces() const
#define FatalErrorInFunction
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
static int myProcNo(const label communicator=worldComm)
forAllConstIters(mixture.phases(), phase)
static void mapCombineScatter(const List< commsStruct > &comms, Container &Values, const int tag, const label comm)
Encapsulates queries for features.
virtual void rename(const word &newName)
static bool & parRun() noexcept
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Implements a timeout mechanism via sigalarm.
Helper class which maintains intersections of (changing) mesh with (static) surfaces.
static void removeFiles(const polyMesh &mesh)
entry * findEntry(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
const dimensionedScalar e
autoPtr< dictionary > clone() const
@ REGEX
Regular expression.
labelList identity(const label len, label start=0)
static autoPtr< decompositionMethod > New(const dictionary &decompDict, const word ®ionName="")
label addMeshedPatch(const word &name, const dictionary &)
List< T > getList(const label index) const
static void addFaceZones(meshRefinement &meshRefiner, const refinementParameters &refineParams, const HashTable< Pair< word >> &faceZoneToPatches)
const dictionary & optionalSubDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
void setMinLevelFields(const shellSurfaces &shells)
A bounding box defined in terms of min/max extrema points.
fileName globalPath() const
word name(const expressions::valueTypeCode typeCode)
const Time & time() const
A List with indirect addressing.
entry * add(entry *entryPtr, bool mergeEntry=false)
label nFaces() const noexcept
A face is a list of labels corresponding to mesh vertices.
void updateIntersections(const labelList &changedFaces)
const word & name() const noexcept
const wordList & names() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define IOWarningInFunction(ios)
const globalMeshData & globalData() const
static const Enum< debugType > debugTypeNames
const word & constant() const
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
Container for data on surfaces used for surface-driven refinement. Contains all the data about the le...
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
static void removeFiles(const polyMesh &)
const IOdictionary & meshDict
Sends/receives parts of mesh+fvfields to neighbouring processors. Used in load balancing.
static label nProcs(const label communicator=worldComm)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
bool getFaceZoneInfo(const word &fzName, label &masterPatchID, label &slavePatchID, surfaceZonesInfo::faceZoneType &fzType) const
bool found(const word &optName) const
A list of faces which address into the list of points.
const DimensionedField< scalar, volMesh > & V() const
static labelList addCellZonesToMesh(const PtrList< surfaceZonesInfo > &surfList, const labelList &namedSurfaces, polyMesh &mesh)