Add region option for all finiteArea utilities

This commit is contained in:
Pascal Beckstein 2016-02-11 15:44:59 +01:00
parent 51047b302d
commit b6a5ca2550
4 changed files with 16 additions and 3 deletions

View file

@ -37,9 +37,11 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createNamedMesh.H"
# include "createFaMesh.H"
Info<< "Time = " << runTime.timeName() << nl << endl;

View file

@ -50,6 +50,8 @@ using namespace Foam;
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
argList::validArgs.append("STL mesh file");
argList args(argc, argv);

View file

@ -23,11 +23,18 @@
faceRegion[faceI] = patch[faceI].region();
}
word polyRegionName;
if (!args.optionReadIfPresent("region", polyRegionName))
{
polyRegionName = polyMesh::defaultRegion;
}
polyMesh mesh
(
IOobject
(
polyMesh::defaultRegion,
polyRegionName,
runTime.constant(),
runTime
),

View file

@ -63,9 +63,11 @@ public:
int main(int argc, char *argv[])
{
# include "addRegionOption.H"
# include "setRootCase.H"
# include "createTime.H"
# include "createMesh.H"
# include "createNamedMesh.H"
// Reading faMeshDefinition dictionary
IOdictionary faMeshDefinition