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