60 int 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" 88 const bool doTriangulate =
args.
found(
"tri");
91 const word exportExt = exportName.
ext();
105 #include "getTimeIndex.H" 113 exportName = exportBase +
"." + exportExt;
124 Info<<
"writing " << exportName;
127 Info<<
" triangulated";
131 if (scaleFactor <= 0)
137 Info<<
" with scaling " << scaleFactor <<
endl;
139 surf.
write(exportName);
static void addNote(const string ¬e)
Add extra notes for the usage information.
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
A class for handling file names.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
#define forAll(list, i)
Loop across all elements in list.
word ext() const
Return file name extension (part after last .)
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
static bool canWriteType(const word &fileType, bool verbose=false)
Can we write this file format? Also checks proxy types.
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...
T get(const label index) const
Get a value from the argument at index.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
fileName lessExt() const
Return file name without extension (part before last .)
messageStream Info
Information stream (stdout output on master, null elsewhere)
readUpdateState
Enumeration defining the state of the mesh after a read update.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.