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:
@ -275,7 +275,7 @@ void Foam::masterMeshInstance
|
||||
{
|
||||
const fileName meshSubDir
|
||||
(
|
||||
polyMesh::regionName(io.name()) / polyMesh::meshSubDir
|
||||
polyMesh::meshDir(io.name())
|
||||
);
|
||||
|
||||
if (UPstream::master())
|
||||
|
||||
@ -1577,14 +1577,20 @@ int main(int argc, char *argv[])
|
||||
forAll(regionNames, regioni)
|
||||
{
|
||||
const word& regionName = regionNames[regioni];
|
||||
const word& regionDir = polyMesh::regionName(regionName);
|
||||
|
||||
const fileName volMeshSubDir(regionDir/polyMesh::meshSubDir);
|
||||
const fileName areaMeshSubDir(regionDir/faMesh::meshSubDir);
|
||||
const fileName volMeshSubDir
|
||||
(
|
||||
polyMesh::meshDir(regionName)
|
||||
);
|
||||
const fileName areaMeshSubDir
|
||||
(
|
||||
polyMesh::regionName(regionName) / faMesh::meshSubDir
|
||||
);
|
||||
|
||||
InfoOrPout
|
||||
<< nl
|
||||
<< "Reconstructing mesh " << regionDir << nl << endl;
|
||||
<< "Reconstructing mesh:"
|
||||
<< polyMesh::regionName(regionName) << nl << endl;
|
||||
|
||||
bool areaMeshDetected = false;
|
||||
|
||||
@ -2474,15 +2480,20 @@ int main(int argc, char *argv[])
|
||||
forAll(regionNames, regioni)
|
||||
{
|
||||
const word& regionName = regionNames[regioni];
|
||||
const word& regionDir = polyMesh::regionName(regionName);
|
||||
|
||||
const fileName volMeshSubDir(regionDir/polyMesh::meshSubDir);
|
||||
const fileName areaMeshSubDir(regionDir/faMesh::meshSubDir);
|
||||
const fileName volMeshSubDir
|
||||
(
|
||||
polyMesh::meshDir(regionName)
|
||||
);
|
||||
const fileName areaMeshSubDir
|
||||
(
|
||||
polyMesh::regionName(regionName) / faMesh::meshSubDir
|
||||
);
|
||||
|
||||
InfoOrPout
|
||||
<< nl << nl
|
||||
<< (decompose ? "Decomposing" : "Redistributing")
|
||||
<< " mesh " << regionDir << nl << endl;
|
||||
<< " mesh:" << polyMesh::regionName(regionName) << nl << endl;
|
||||
|
||||
|
||||
// Get time instance directory
|
||||
|
||||
Reference in New Issue
Block a user