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:
parent
f377875bc8
commit
ca25929372
@ -13,6 +13,19 @@ License
|
||||
Description
|
||||
Search for the appropriate faMeshDefinition dictionary...
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
- Foam::IOdictionary
|
||||
|
||||
Required Variables
|
||||
- regionName [word]
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
|
||||
Provided Variables
|
||||
- meshDefDict [IOdictionary]
|
||||
- meshDictPtr [autoPtr<IOdictionary>]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
const word dictName("faMeshDefinition");
|
||||
@ -21,7 +34,7 @@ autoPtr<IOdictionary> meshDictPtr;
|
||||
|
||||
{
|
||||
fileName dictPath;
|
||||
const word& regionDir = polyMesh::regionName(regionName);
|
||||
const word& regionDir = Foam::polyMesh::regionName(regionName);
|
||||
|
||||
if (args.readIfPresent("dict", dictPath))
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -1317,11 +1317,12 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
word regionName(polyMesh::defaultRegion);
|
||||
// Specified region or default region
|
||||
#include "getRegionOption.H"
|
||||
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Info<< "Creating polyMesh for region " << regionName << endl;
|
||||
Info<< "Creating polyMesh for region " << regionName << nl;
|
||||
}
|
||||
|
||||
const bool keepOrientation = args.found("keepOrientation");
|
||||
|
@ -18,11 +18,10 @@ Description
|
||||
{
|
||||
// Shadows enclosing parameter (dictName)
|
||||
const word blockMeshDictName("blockMeshDict");
|
||||
const word& regionDir = polyMesh::regionName(regionName);
|
||||
|
||||
const fileName polyMeshPath
|
||||
(
|
||||
runTime.path()/meshInstance/regionDir/polyMesh::meshSubDir
|
||||
runTime.path()/meshInstance/polyMesh::meshDir(regionName)
|
||||
);
|
||||
|
||||
if (exists(polyMeshPath))
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -183,12 +183,12 @@ int main(int argc, char *argv[])
|
||||
: blockMesh::DEFAULT_MERGE
|
||||
);
|
||||
|
||||
word regionName(polyMesh::defaultRegion);
|
||||
// Specified region or default region
|
||||
#include "getRegionOption.H"
|
||||
|
||||
// Check if the region is specified otherwise mesh the default region
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Info<< nl << "Generating mesh for region " << regionName << endl;
|
||||
Info<< nl << "Generating mesh for region " << regionName << nl;
|
||||
}
|
||||
|
||||
// Instance for resulting mesh
|
||||
|
@ -18,11 +18,10 @@ Description
|
||||
{
|
||||
// Shadows enclosing parameter (dictName)
|
||||
const word blockMeshDictName("blockMeshDict");
|
||||
const word& regionDir = polyMesh::regionName(regionName);
|
||||
|
||||
const fileName polyMeshPath
|
||||
(
|
||||
runTime.path()/meshInstance/regionDir/polyMesh::meshSubDir
|
||||
runTime.path()/meshInstance/polyMesh::meshDir(regionName)
|
||||
);
|
||||
|
||||
if (exists(polyMeshPath))
|
||||
|
@ -38,7 +38,7 @@ autoPtr<IOdictionary> meshDictPtr;
|
||||
exists
|
||||
(
|
||||
runTime.path()/runTime.constant()
|
||||
/ regionDir/polyMesh::meshSubDir/dictName
|
||||
/ polyMesh::meshDir(regionName)/dictName
|
||||
)
|
||||
)
|
||||
{
|
||||
@ -47,7 +47,7 @@ autoPtr<IOdictionary> meshDictPtr;
|
||||
dictPath =
|
||||
(
|
||||
runTime.constant()
|
||||
/ regionDir/polyMesh::meshSubDir/dictName
|
||||
/ polyMesh::meshDir(regionName)/dictName
|
||||
);
|
||||
|
||||
|
||||
|
@ -255,19 +255,17 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTimeExtruded.H"
|
||||
|
||||
// Get optional regionName
|
||||
word regionName(polyMesh::defaultRegion);
|
||||
if (args.readIfPresent("region", regionName))
|
||||
{
|
||||
Info<< "Create mesh " << regionName << " for time = "
|
||||
<< runTimeExtruded.timeName() << nl << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Create mesh for time = "
|
||||
<< runTimeExtruded.timeName() << nl << endl;
|
||||
}
|
||||
// Specified region or default region
|
||||
#include "getRegionOption.H"
|
||||
|
||||
{
|
||||
Info<< "Create mesh";
|
||||
if (!polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Info<< ' ' << regionName;
|
||||
}
|
||||
Info<< " for time = " << runTimeExtruded.timeName() << nl << nl;
|
||||
}
|
||||
|
||||
const IOdictionary dict
|
||||
(
|
||||
|
@ -1210,7 +1210,7 @@ void extrudeGeometricProperties
|
||||
(
|
||||
"patchFaceCentres",
|
||||
mesh.pointsInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
@ -1222,7 +1222,7 @@ void extrudeGeometricProperties
|
||||
(
|
||||
"patchEdgeCentres",
|
||||
mesh.pointsInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
@ -1268,7 +1268,7 @@ void extrudeGeometricProperties
|
||||
(
|
||||
"faceCentres",
|
||||
regionMesh.pointsInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -1352,7 +1352,7 @@ void extrudeGeometricProperties
|
||||
(
|
||||
"cellCentres",
|
||||
regionMesh.pointsInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -2555,7 +2555,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"cellToPatchFaceAddressing",
|
||||
regionMesh.facesInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -2571,7 +2571,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"faceToPatchFaceAddressing",
|
||||
regionMesh.facesInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -2588,7 +2588,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"faceToPatchEdgeAddressing",
|
||||
regionMesh.facesInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -2605,7 +2605,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"pointToPatchPointAddressing",
|
||||
regionMesh.facesInstance(),
|
||||
regionMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
regionMesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -2647,7 +2647,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"patchFaceCentres",
|
||||
mesh.pointsInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::MUST_READ
|
||||
);
|
||||
|
@ -296,7 +296,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
||||
// (
|
||||
// "pointDualAddressing",
|
||||
// instance,
|
||||
// "tetDualMesh"/polyMesh::meshSubDir,
|
||||
// polyMesh::meshDir("tetDualMesh"),
|
||||
// runTime_,
|
||||
// IOobject::NO_READ,
|
||||
// IOobject::NO_WRITE,
|
||||
@ -343,7 +343,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
||||
// (
|
||||
// "dualPoints",
|
||||
// instance,
|
||||
// "tetDualMesh"/polyMesh::meshSubDir,
|
||||
// polyMesh::meshDir("tetDualMesh"),
|
||||
// runTime_,
|
||||
// IOobject::NO_READ,
|
||||
// IOobject::NO_WRITE,
|
||||
|
@ -129,7 +129,7 @@ int main(int argc, char *argv[])
|
||||
const word& regionName = regionNames[regioni];
|
||||
const fileName meshDir
|
||||
(
|
||||
polyMesh::regionName(regionName)/polyMesh::meshSubDir
|
||||
polyMesh::meshDir(regionName)
|
||||
);
|
||||
|
||||
if (regionNames.size() > 1)
|
||||
|
@ -86,7 +86,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createNamedPolyMesh.H"
|
||||
|
||||
const fileName setsSubPath(mesh.dbDir()/polyMesh::meshSubDir/"sets");
|
||||
const fileName setsSubPath(mesh.meshDir()/"sets");
|
||||
|
||||
// Search for list of objects for the time of the mesh
|
||||
word setsInstance = runTime.findInstance
|
||||
|
@ -894,7 +894,7 @@ void createAndWriteRegion
|
||||
(
|
||||
"pointRegionAddressing",
|
||||
newMesh().facesInstance(),
|
||||
newMesh().meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
newMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -913,7 +913,7 @@ void createAndWriteRegion
|
||||
(
|
||||
"faceRegionAddressing",
|
||||
newMesh().facesInstance(),
|
||||
newMesh().meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
newMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -951,7 +951,7 @@ void createAndWriteRegion
|
||||
(
|
||||
"cellRegionAddressing",
|
||||
newMesh().facesInstance(),
|
||||
newMesh().meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
newMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -970,7 +970,7 @@ void createAndWriteRegion
|
||||
(
|
||||
"boundaryRegionAddressing",
|
||||
newMesh().facesInstance(),
|
||||
newMesh().meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
newMesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -22,12 +22,14 @@ Provided Variables
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::Info << "Create mesh";
|
||||
if (regionName != Foam::polyMesh::defaultRegion)
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
Foam::Info << "Create mesh";
|
||||
if (!Foam::polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
}
|
||||
Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
|
||||
}
|
||||
Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
|
||||
|
||||
Foam::fvMesh mesh
|
||||
(
|
||||
|
@ -396,7 +396,7 @@ int main(int argc, char *argv[])
|
||||
const word& regionName = regionNames[regioni];
|
||||
const fileName meshDir
|
||||
(
|
||||
polyMesh::regionName(regionName)/polyMesh::meshSubDir
|
||||
polyMesh::meshDir(regionName)
|
||||
);
|
||||
|
||||
if (regionNames.size() > 1)
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2016-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -296,15 +296,16 @@ int main(int argc, char *argv[])
|
||||
IOobject::fileModificationChecking = IOobject::timeStamp;
|
||||
|
||||
|
||||
word regionName(polyMesh::defaultRegion);
|
||||
if (args.readIfPresent("region", regionName))
|
||||
// Specified region or default region
|
||||
#include "getRegionOption.H"
|
||||
if (!polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Info<< "Using region " << regionName << nl << endl;
|
||||
}
|
||||
|
||||
const fileName meshDir
|
||||
(
|
||||
polyMesh::regionName(regionName)/polyMesh::meshSubDir
|
||||
polyMesh::meshDir(regionName)
|
||||
);
|
||||
|
||||
|
||||
|
@ -813,11 +813,7 @@ int main(int argc, char *argv[])
|
||||
IOobject io
|
||||
(
|
||||
"faBoundary",
|
||||
mesh.time().findInstance
|
||||
(
|
||||
mesh.dbDir()/polyMesh::meshSubDir,
|
||||
"boundary"
|
||||
),
|
||||
mesh.time().findInstance(mesh.meshDir(), "boundary"),
|
||||
faMesh::meshSubDir,
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
|
@ -305,7 +305,7 @@ autoPtr<mapPolyMesh> mergeSharedPoints
|
||||
boundBox procBounds
|
||||
(
|
||||
const PtrList<Time>& databases,
|
||||
const word& regionDir
|
||||
const word& regionName
|
||||
)
|
||||
{
|
||||
boundBox bb;
|
||||
@ -316,7 +316,7 @@ boundBox procBounds
|
||||
(
|
||||
procDb.findInstance
|
||||
(
|
||||
regionDir/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName),
|
||||
"points"
|
||||
)
|
||||
);
|
||||
@ -345,10 +345,10 @@ boundBox procBounds
|
||||
"points",
|
||||
procDb.findInstance
|
||||
(
|
||||
regionDir/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName),
|
||||
"points"
|
||||
),
|
||||
regionDir/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName),
|
||||
procDb,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -771,7 +771,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"faces",
|
||||
databases[0].timeName(),
|
||||
polyMesh::regionName(regionName)/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName),
|
||||
databases[0],
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
|
@ -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
|
||||
|
@ -184,7 +184,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
"pointDualAddressing",
|
||||
tetDualMesh.facesInstance(),
|
||||
tetDualMesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
tetDualMesh,
|
||||
IOobject::MUST_READ
|
||||
)
|
||||
|
@ -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;
|
||||
|
@ -13,6 +13,9 @@ License
|
||||
Description
|
||||
Add multi-region command-line options: -allRegions, -regions, -region
|
||||
|
||||
Required Classes
|
||||
- Foam::argList
|
||||
|
||||
See Also
|
||||
getAllRegionOptions.H
|
||||
|
||||
|
@ -1,6 +1,32 @@
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"region",
|
||||
"name",
|
||||
"Specify alternative mesh region"
|
||||
);
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Add -region option
|
||||
|
||||
Required Classes
|
||||
- Foam::argList
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"region",
|
||||
"name",
|
||||
"Specify mesh region (default: region0)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -1,3 +1,24 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Add various time-related options (see Foam::timeSelector)
|
||||
|
||||
Required Classes
|
||||
- Foam::argList
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::argList::addBoolOption
|
||||
(
|
||||
"constant",
|
||||
@ -22,3 +43,5 @@ Foam::argList::addOption
|
||||
"time",
|
||||
"specify a single time value to select"
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -14,6 +14,10 @@ Description
|
||||
Create a fvMesh (specified region or defaultRegion) with
|
||||
additional handling of -dry-run and -dry-run-write options.
|
||||
|
||||
Required Classes
|
||||
- Foam::fvMesh
|
||||
- Foam::simplifiedMeshes::columnFvMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
@ -26,7 +30,12 @@ Provided Variables
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::autoPtr<Foam::fvMesh> meshPtr(nullptr);
|
||||
Foam::word regionName(Foam::polyMesh::defaultRegion);
|
||||
|
||||
// "getRegionOption.H"
|
||||
Foam::word regionName
|
||||
(
|
||||
args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
if (args.dryRun() || args.found("dry-run-write"))
|
||||
{
|
||||
@ -34,9 +43,6 @@ if (args.dryRun() || args.found("dry-run-write"))
|
||||
<< "Operating in 'dry-run' mode: case will run for 1 time step. "
|
||||
<< "All checks assumed OK on a clean exit" << Foam::endl;
|
||||
|
||||
// Allow region in combination with dry-run
|
||||
args.readIfPresent("region", regionName);
|
||||
|
||||
Foam::FieldBase::allowConstructFromLargerSize = true;
|
||||
|
||||
// Create a simplified 1D mesh and attempt to re-create boundary conditions
|
||||
@ -68,7 +74,7 @@ if (args.dryRun() || args.found("dry-run-write"))
|
||||
else
|
||||
{
|
||||
Foam::Info << "Create mesh";
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!Foam::polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -14,6 +14,9 @@ License
|
||||
Description
|
||||
Create a fvMesh for a specified region, or the defaultRegion
|
||||
|
||||
Required Classes
|
||||
- Foam::fvMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
@ -24,11 +27,15 @@ Provided Variables
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::word regionName(Foam::polyMesh::defaultRegion);
|
||||
// "getRegionOption.H"
|
||||
Foam::word regionName
|
||||
(
|
||||
args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
{
|
||||
Foam::Info << "Create mesh";
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!Foam::polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -14,7 +14,11 @@ License
|
||||
Description
|
||||
Create a polyMesh for a specified region, or the defaultRegion
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
|
||||
Provided Variables
|
||||
@ -23,11 +27,15 @@ Provided Variables
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::word regionName(Foam::polyMesh::defaultRegion);
|
||||
// "getRegionOption.H"
|
||||
Foam::word regionName
|
||||
(
|
||||
args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
{
|
||||
Foam::Info << "Create polyMesh";
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!Foam::polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2022 OpenCFD Ltd.
|
||||
Copyright (C) 2022-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -32,13 +32,13 @@ Foam::PtrList<Foam::polyMesh> meshes(regionNames.size());
|
||||
{
|
||||
forAll(regionNames, regioni)
|
||||
{
|
||||
const Foam::word& regionName = regionNames[regioni];
|
||||
const auto& regionName = regionNames[regioni];
|
||||
|
||||
Foam::Info<< "Create polyMesh";
|
||||
if
|
||||
(
|
||||
regionNames.size() > 1
|
||||
|| regionName != Foam::polyMesh::defaultRegion
|
||||
|| !Foam::polyMesh::regionName(regionName).empty()
|
||||
)
|
||||
{
|
||||
Foam::Info<< ' ' << regionName;
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
Copyright (C) 2021-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -23,6 +23,11 @@ Note
|
||||
There is no semantical difference between "-regions name"
|
||||
and "-region name"
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
- Foam::regionProperties
|
||||
- Foam::IOobjectOption
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
@ -42,7 +47,10 @@ wordList regionNames;
|
||||
if (args.found("allRegions"))
|
||||
{
|
||||
regionNames =
|
||||
regionProperties(runTime, IOobject::READ_IF_PRESENT).names();
|
||||
(
|
||||
Foam::regionProperties(runTime, IOobjectOption::READ_IF_PRESENT)
|
||||
.names()
|
||||
);
|
||||
|
||||
if (regionNames.empty())
|
||||
{
|
||||
@ -60,17 +68,20 @@ wordList regionNames;
|
||||
if
|
||||
(
|
||||
selectByName.size() == 1
|
||||
&& selectByName.first().isLiteral()
|
||||
&& selectByName.front().isLiteral()
|
||||
)
|
||||
{
|
||||
// Identical to -region NAME
|
||||
regionNames.resize(1);
|
||||
regionNames.first() = selectByName.first();
|
||||
regionNames.front() = selectByName.front();
|
||||
}
|
||||
else if (selectByName.size())
|
||||
{
|
||||
regionNames =
|
||||
regionProperties(runTime, IOobject::READ_IF_PRESENT).names();
|
||||
(
|
||||
Foam::regionProperties(runTime, IOobjectOption::READ_IF_PRESENT)
|
||||
.names()
|
||||
);
|
||||
|
||||
if (regionNames.empty())
|
||||
{
|
||||
@ -99,14 +110,14 @@ wordList regionNames;
|
||||
else if (args.found("region"))
|
||||
{
|
||||
regionNames.resize(1);
|
||||
regionNames.first() = args.get<word>("region");
|
||||
regionNames.front() = args.get<word>("region");
|
||||
}
|
||||
|
||||
// Fallback to defaultRegion
|
||||
if (regionNames.empty())
|
||||
{
|
||||
regionNames.resize(1);
|
||||
regionNames.first() = polyMesh::defaultRegion;
|
||||
regionNames.front() = Foam::polyMesh::defaultRegion;
|
||||
}
|
||||
}
|
||||
|
||||
|
33
src/OpenFOAM/include/getRegionOption.H
Normal file
33
src/OpenFOAM/include/getRegionOption.H
Normal file
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Get the value from the -region option
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
|
||||
Provided Variables
|
||||
- regionName [word]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::word regionName
|
||||
(
|
||||
args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1829,7 +1829,7 @@ const Foam::labelList& Foam::globalMeshData::sharedPointGlobalLabels() const
|
||||
IOobject addrHeader
|
||||
(
|
||||
"pointProcAddressing",
|
||||
mesh_.facesInstance()/mesh_.meshSubDir,
|
||||
mesh_.facesInstance()/polyMesh::meshSubDir,
|
||||
mesh_,
|
||||
IOobject::MUST_READ
|
||||
);
|
||||
|
@ -47,6 +47,7 @@ namespace Foam
|
||||
}
|
||||
|
||||
Foam::word Foam::polyMesh::defaultRegion = "region0";
|
||||
|
||||
Foam::word Foam::polyMesh::meshSubDir = "polyMesh";
|
||||
|
||||
|
||||
@ -820,11 +821,22 @@ const Foam::word& Foam::polyMesh::regionName(const word& region)
|
||||
}
|
||||
|
||||
|
||||
Foam::fileName Foam::polyMesh::meshDir(const word& region)
|
||||
{
|
||||
if (region.empty() || region == polyMesh::defaultRegion)
|
||||
{
|
||||
return polyMesh::meshSubDir;
|
||||
}
|
||||
|
||||
return (region / polyMesh::meshSubDir);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
const Foam::fileName& Foam::polyMesh::dbDir() const
|
||||
{
|
||||
if (objectRegistry::dbDir() == defaultRegion)
|
||||
if (objectRegistry::name() == polyMesh::defaultRegion)
|
||||
{
|
||||
return parent().dbDir();
|
||||
}
|
||||
|
@ -426,6 +426,10 @@ public:
|
||||
|
||||
// Regions
|
||||
|
||||
//- Return the local mesh directory name (eg, "polyMesh")
|
||||
//- after applying filter for defaultRegion
|
||||
static fileName meshDir(const word& region);
|
||||
|
||||
//- The mesh region name or word::null if polyMesh::defaultRegion
|
||||
static const word& regionName(const word& region);
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2012 OpenFOAM Foundation
|
||||
Copyright (C) 2022 OpenCFD Ltd.
|
||||
Copyright (C) 2022-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -14,40 +14,49 @@ License
|
||||
Description
|
||||
Create a dynamicFvMesh for a specified region, or the defaultRegion
|
||||
|
||||
Required Classes
|
||||
- Foam::dynamicFvMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
- runTime [Time]
|
||||
|
||||
Provided Variables
|
||||
- regionName [word]
|
||||
- mesh [dynamicFvMesh], meshPtr
|
||||
- mesh [dynamicFvMesh]
|
||||
- meshPtr [autoPtr<dynamicFvMesh>]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::word regionName(Foam::polyMesh::defaultRegion);
|
||||
Foam::autoPtr<Foam::dynamicFvMesh> meshPtr;
|
||||
|
||||
// "getRegionOption.H"
|
||||
Foam::word regionName
|
||||
(
|
||||
args.getOrDefault<word>("region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
{
|
||||
Foam::Info << "Create dynamic mesh";
|
||||
if (args.readIfPresent("region", regionName))
|
||||
if (!Foam::polyMesh::regionName(regionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << regionName;
|
||||
}
|
||||
Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
|
||||
|
||||
meshPtr = dynamicFvMesh::New
|
||||
meshPtr = Foam::dynamicFvMesh::New
|
||||
(
|
||||
IOobject
|
||||
Foam::IOobject
|
||||
(
|
||||
regionName,
|
||||
runTime.timeName(),
|
||||
runTime,
|
||||
IOobject::MUST_READ
|
||||
Foam::IOobject::MUST_READ
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
dynamicFvMesh& mesh = meshPtr();
|
||||
Foam::dynamicFvMesh& mesh = meshPtr();
|
||||
|
||||
Foam::Info << Foam::endl;
|
||||
|
||||
|
@ -5671,7 +5671,7 @@ void Foam::hexRef8::removeFiles(const polyMesh& mesh)
|
||||
(
|
||||
"dummy",
|
||||
mesh.facesInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh
|
||||
);
|
||||
fileName setsDir(io.path());
|
||||
|
@ -1699,7 +1699,7 @@ void Foam::refinementHistory::removeFiles(const polyMesh& mesh)
|
||||
(
|
||||
"dummy",
|
||||
mesh.facesInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh
|
||||
);
|
||||
fileName setsDir(io.path());
|
||||
|
@ -722,6 +722,9 @@ public:
|
||||
return thisDb().name();
|
||||
}
|
||||
|
||||
|
||||
// Regions
|
||||
|
||||
//- The mesh region name or word::null if polyMesh::defaultRegion
|
||||
const word& regionName() const;
|
||||
|
||||
|
31
src/finiteArea/include/addFaRegionOption.H
Normal file
31
src/finiteArea/include/addFaRegionOption.H
Normal file
@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Add -area-region option
|
||||
|
||||
Required Classes
|
||||
- Foam::argList
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
{
|
||||
Foam::argList::addOption
|
||||
(
|
||||
"area-region",
|
||||
"name",
|
||||
"Specify area-mesh region"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1 +1,34 @@
|
||||
faMesh aMesh(mesh);
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016 Wikki Ltd
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Create a finite-area mesh for the defaultRegion
|
||||
|
||||
Required Variables
|
||||
- mesh [polyMesh]
|
||||
|
||||
Provided Variables
|
||||
- aMesh [faMesh]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::Info << "Create finite-area mesh";
|
||||
Foam::Info << Foam::nl;
|
||||
|
||||
Foam::faMesh aMesh
|
||||
(
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
53
src/finiteArea/include/createNamedFaMesh.H
Normal file
53
src/finiteArea/include/createNamedFaMesh.H
Normal file
@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Create a finite-area mesh for a specified region, or the defaultRegion
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
|
||||
Required Variables
|
||||
- mesh [polyMesh]
|
||||
- runTime [Time]
|
||||
|
||||
Provided Variables
|
||||
- areaRegionName [word]
|
||||
- aMesh [faMesh]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// "getFaRegionOption.H"
|
||||
Foam::word areaRegionName
|
||||
(
|
||||
args.getOrDefault<word>("area-region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
{
|
||||
Foam::Info << "Create finite-area mesh";
|
||||
if (!Foam::polyMesh::regionName(areaRegionName).empty())
|
||||
{
|
||||
Foam::Info << ' ' << areaRegionName;
|
||||
}
|
||||
Foam::Info << " for time = " << runTime.timeName() << Foam::nl;
|
||||
}
|
||||
|
||||
Foam::faMesh aMesh
|
||||
(
|
||||
areaRegionName,
|
||||
mesh
|
||||
);
|
||||
|
||||
Foam::Info << Foam::endl;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
33
src/finiteArea/include/getFaRegionOption.H
Normal file
33
src/finiteArea/include/getFaRegionOption.H
Normal file
@ -0,0 +1,33 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
|
||||
Description
|
||||
Get the value from the -area-region option
|
||||
|
||||
Required Classes
|
||||
- Foam::polyMesh
|
||||
|
||||
Required Variables
|
||||
- args [argList]
|
||||
|
||||
Provided Variables
|
||||
- areaRegionName [word]
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
Foam::word areaRegionName
|
||||
(
|
||||
args.getOrDefault<word>("area-region", Foam::polyMesh::defaultRegion)
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -461,7 +461,7 @@ Foam::fvMeshTools::newMesh
|
||||
|
||||
const fileName meshSubDir
|
||||
(
|
||||
polyMesh::regionName(io.name()) / polyMesh::meshSubDir
|
||||
polyMesh::meshDir(io.name())
|
||||
);
|
||||
|
||||
|
||||
@ -745,7 +745,7 @@ Foam::fvMeshTools::loadOrCreateMeshImpl
|
||||
|
||||
const fileName meshSubDir
|
||||
(
|
||||
polyMesh::regionName(io.name()) / polyMesh::meshSubDir
|
||||
polyMesh::meshDir(io.name())
|
||||
);
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries
|
||||
(
|
||||
"boundary",
|
||||
localInstance_,
|
||||
polyMesh::regionName(regionName_)/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName_),
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -209,7 +209,7 @@ void Foam::simplifiedMeshes::columnFvMeshInfo::initialise(const Time& runTime)
|
||||
(
|
||||
"points",
|
||||
localInstance_,
|
||||
polyMesh::regionName(regionName_)/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName_),
|
||||
runTime,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
@ -413,7 +413,7 @@ Foam::simplifiedMeshes::columnFvMeshInfo::columnFvMeshInfo
|
||||
(
|
||||
runTime.findInstance
|
||||
(
|
||||
polyMesh::regionName(regionName_)/polyMesh::meshSubDir,
|
||||
polyMesh::meshDir(regionName_),
|
||||
"boundary",
|
||||
IOobject::READ_IF_PRESENT
|
||||
)
|
||||
|
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2015-2022 OpenCFD Ltd.
|
||||
Copyright (C) 2015-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -354,16 +354,9 @@ Foam::word Foam::functionObjects::externalCoupled::compositeName
|
||||
}
|
||||
else if (regionNames.size() == 1)
|
||||
{
|
||||
if (regionNames[0] == polyMesh::defaultRegion)
|
||||
{
|
||||
// For compatibility with single region cases
|
||||
// - suppress single region name
|
||||
return word::null;
|
||||
}
|
||||
else
|
||||
{
|
||||
return regionNames[0];
|
||||
}
|
||||
// For compatibility with single region cases
|
||||
// - suppress single region name
|
||||
return polyMesh::regionName(regionNames[0]);
|
||||
}
|
||||
|
||||
// Enforce lexical ordering
|
||||
|
@ -3755,7 +3755,7 @@ void Foam::meshRefinement::removeFiles(const polyMesh& mesh)
|
||||
(
|
||||
"dummy",
|
||||
mesh.facesInstance(),
|
||||
mesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
mesh
|
||||
);
|
||||
fileName setsDir(io.path());
|
||||
|
@ -136,7 +136,7 @@ Foam::fileName Foam::topoSet::localPath
|
||||
const word& name
|
||||
)
|
||||
{
|
||||
return mesh.facesInstance()/mesh.dbDir()/polyMesh::meshSubDir/"sets"/name;
|
||||
return mesh.facesInstance()/mesh.meshDir()/"sets"/name;
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ Foam::IOobject Foam::topoSet::findIOobject
|
||||
name,
|
||||
mesh.time().findInstance
|
||||
(
|
||||
mesh.dbDir()/polyMesh::meshSubDir/"sets",
|
||||
mesh.meshDir()/"sets",
|
||||
word::null,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
mesh.facesInstance()
|
||||
@ -628,7 +628,7 @@ void Foam::topoSet::removeFiles(const polyMesh& mesh)
|
||||
(
|
||||
"dummy",
|
||||
mesh.facesInstance(),
|
||||
mesh.meshSubDir/"sets",
|
||||
polyMesh::meshSubDir/"sets",
|
||||
mesh
|
||||
);
|
||||
fileName setsDir(io.path());
|
||||
|
@ -1362,7 +1362,7 @@ Foam::isoSurfacePoint::isoSurfacePoint
|
||||
(
|
||||
"C",
|
||||
fvmesh.pointsInstance(),
|
||||
fvmesh.meshSubDir,
|
||||
polyMesh::meshSubDir,
|
||||
fvmesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
|
Loading…
Reference in New Issue
Block a user