58 int main(
int argc,
char *argv[])
62 "Refine by splitting all three edges of triangle" 71 "Number of refinement steps (default: 1)" 78 Info<<
"Reading surface from " << surfFileName <<
" ..." <<
endl;
82 Info<<
"Original surface:" <<
nl 83 <<
" triangles :" << surf.size() <<
nl 84 <<
" vertices(used):" << surf.nPoints() <<
endl;
91 Info<<
"Refining " << nsteps <<
" times" <<
flush;
93 for (label step = 0; step < nsteps; ++step)
105 Info<<
"Refined surface:" <<
nl 106 <<
" triangles :" << surf.size() <<
nl 107 <<
" vertices(used):" << surf.nPoints() <<
endl;
110 <<
"Writing refined surface to " << outFileName <<
" ..." <<
endl;
112 surf.
write(outFileName);
static void addNote(const string ¬e)
Add extra notes for the usage information.
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 noParallel()
Remove the parallel options.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
Extract command arguments and options from the supplied argc and argv parameters. ...
static MinMax< T > ge(const T &minVal)
A semi-infinite range from minVal to the type max.
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.
T getCheckOrDefault(const word &optName, const T &deflt, const Predicate &pred) const
Get a value from the named option with additional checking (if present), or return default...
Ostream & flush(Ostream &os)
Flush stream.
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.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Triangulated surface description with patch information.
Foam::argList args(argc, argv)