58int main(
int argc,
char *argv[])
62 "Refine by splitting all three edges of triangle"
64 argList::noParallel();
65 argList::addArgument(
"input",
"The input surface file");
66 argList::addArgument(
"output",
"The output surface file");
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)
97 surf = triSurfaceTools::redGreenRefine
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);
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Extract command arguments and options from the supplied argc and argv parameters.
T get(const label index) const
Get a value from the argument at index.
T getCheckOrDefault(const word &optName, const T &deflt, const Predicate &pred) const
A class for handling file names.
Triangulated surface description with patch information.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & flush(Ostream &os)
Flush stream.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)