mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: minor simplifications for handling region meshes
- static version of polyMesh::meshDir(), which takes a region name
polyMesh::meshDir(regionName)
vs
polyMesh::regionName(regionName)/polyMesh::meshSubDir
STYLE: use polyMesh::regionName(..) instead of comparing to defaultRegion
STYLE: use getOrDefault when retrieving various -region options
FIX: polyMesh::dbDir() now checks registry name, not full path (#3033)
This commit is contained in:
@ -540,7 +540,7 @@ int main(int argc, char *argv[])
|
||||
"boundary",
|
||||
runTime.findInstance
|
||||
(
|
||||
polyMesh::regionName(regionName)/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName),
|
||||
"boundary",
|
||||
IOobject::READ_IF_PRESENT
|
||||
),
|
||||
|
||||
@ -54,8 +54,8 @@ Foam::IOPtrList<Foam::entry> Foam::boundaryInfo::readBoundaryDict
|
||||
IOobject
|
||||
(
|
||||
"boundary",
|
||||
runTime.findInstance(regionName/polyMesh::meshSubDir, "boundary"),
|
||||
regionName/polyMesh::meshSubDir,
|
||||
runTime.findInstance(polyMesh::meshDir(regionName), "boundary"),
|
||||
polyMesh::meshDir(regionName),
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
||||
@ -409,15 +409,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
const bool enableEntries = args.found("enableFunctionEntries");
|
||||
|
||||
const word regionName =
|
||||
args.getOrDefault<word>("region", polyMesh::defaultRegion);
|
||||
|
||||
fileName regionPrefix;
|
||||
if (regionName != polyMesh::defaultRegion)
|
||||
{
|
||||
regionPrefix = regionName;
|
||||
}
|
||||
// Specified region or default region
|
||||
#include "getRegionOption.H"
|
||||
|
||||
regionPrefix = polyMesh::regionName(regionName);
|
||||
}
|
||||
|
||||
// Per cyclic patch the new name for this side and the other side
|
||||
HashTable<word> thisNames;
|
||||
|
||||
Reference in New Issue
Block a user