63int main(
int argc,
char *argv[])
67 "A mesh generator for finiteArea mesh"
73 "Specify name for a default empty patch",
80 "Create but do not write"
85 "Suppress procAddressing creation and field decomposition"
91 "Suppress field decomposition"
97 "Write mesh as a vtp (vtk) file for display or debugging"
102 "Write mesh edges as obj files (one per processor)",
116 const bool doDecompose = !
args.found(
"no-decompose");
117 const bool doDecompFields = !
args.found(
"no-fields");
121 Info<<
"Skip decompose of finiteArea mesh/fields" <<
nl;
123 else if (!doDecompFields)
125 Info<<
"Skip decompose of finiteArea fields" <<
nl;
144 <<
"Did not find area-mesh definition"<<
nl
149 auto& meshDefDict = (*faMeshDefinitionPtr);
155 meshDefDict.add(
"emptyPatch",
name,
true);
161 Info<<
"Create area-mesh";
166 Info<<
" with polyMesh at time = " <<
runTime.timeName() <<
nl;
174 if (
args.found(
"write-edges-obj"))
179 if (
args.found(
"write-vtk"))
186 Info<<
"\ndry-run: not writing mesh or decomposing fields\n" <<
nl;
193 Info<<
nl <<
"Write finite area mesh";
194 if (
const word&
name = aMesh.regionName(); !
name.empty())
Functions to operate on Pointer Lists.
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
static void addDryRunOption(const string &usage, bool advanced=false)
Enable a 'dry-run' bool option, with usage information.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
static const word & regionName(const word ®ion)
The mesh region name or word::null if polyMesh::defaultRegion.
A class for handling words, derived from Foam::string.
Foam::word areaRegionName(args.getOrDefault< word >("area-region", Foam::polyMesh::defaultRegion))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< IOdictionary > faMeshDefinitionPtr
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)