69 int main(
int argc,
char *argv[])
73 "information about surface meshes" 84 "geometry scaling factor - default is 1" 89 "display area of each face" 94 "write output in XML format" 118 Info<<
" -scale " << scaling <<
endl;
119 surf.scalePoints(scaling);
122 scalar areaTotal = 0;
126 Info<<
"<?xml version='1.0' encoding='utf-8'?>" <<
nl 127 <<
"<surfaceMeshInfo>" <<
nl 128 <<
"<npoints>" << surf.nPoints() <<
"</npoints>" <<
nl 129 <<
"<nfaces>" << surf.size() <<
"</nfaces>" <<
nl;
133 Info<<
"<areas size='" << surf.size() <<
"'>" <<
nl;
138 Info<<
"nPoints : " << surf.nPoints() <<
nl 139 <<
"nFaces : " << surf.size() <<
nl;
149 const scalar fArea(surf[facei].
mag(surf.points()));
165 Info<<
"<area>" << areaTotal <<
"</area>" <<
nl 166 <<
"</surfaceMeshInfo>" <<
nl;
170 Info<<
"area : " << areaTotal <<
nl;
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
#define forAll(list, i)
Loop across all elements in list.
A class for handling file names.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void noParallel()
Remove the parallel options.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
const fileName & rootPath() const
Return root path.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
bool optionFound(const word &opt) const
Return true if the named option is found.
Extract command arguments and options from the supplied argc and argv parameters. ...
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static void noBanner()
Disable emitting the banner information.
dimensioned< scalar > mag(const dimensioned< Type > &)
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
static void addNote(const string &)
Add extra notes for the usage information.
Foam::argList args(argc, argv)