60int main(
int argc,
char *argv[])
64 "Extract boundaries from an OpenFOAM mesh and write in a surface format"
75 "Geometry scaling factor - default is 1"
87 const scalar scaleFactor =
args.getOrDefault<scalar>(
"scale", 0);
88 const bool doTriangulate =
args.found(
"tri");
91 const word exportExt = exportName.
ext();
104 runTime.setTime(timeDirs[timeI], timeI);
113 exportName = exportBase +
"." + exportExt;
118 exportBase +
'_' +
runTime.timeName() +
"." + exportExt;
122 surf.scalePoints(scaleFactor);
124 Info<<
"writing " << exportName;
127 Info<<
" triangulated";
131 if (scaleFactor <= 0)
137 Info<<
" with scaling " << scaleFactor <<
endl;
139 surf.write(exportName);
static bool canWriteType(const word &fileType, bool verbose=false)
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
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.
A class for handling file names.
fileName lessExt() const
Return file name without extension (part before last .).
readUpdateState
Enumeration defining the state of the mesh after a read update.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options and also set the runTime to the first i...
A class for handling words, derived from Foam::string.
word ext() const
Return file name extension (part after last .).
messageStream Info
Information stream (stdout output on master, null elsewhere).
List< instant > instantList
List of instants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
MeshedSurface< face > meshedSurface
constexpr char nl
The newline '\n' character (0x0a).
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.