Go to the documentation of this file.
78 int main(
int argc,
char *argv[])
82 "Information about surface meshes"
93 "Input geometry scaling factor"
98 "Display area of each face"
103 "Write output in XML format"
119 const bool writeAreas =
args.
found(
"areas");
129 surf.scalePoints(scaling);
132 scalar areaTotal = 0;
136 Info<<
"<?xml version='1.0' encoding='utf-8'?>" <<
nl
137 <<
"<surfaceMeshInfo>" <<
nl
138 <<
"<npoints>" << surf.nPoints() <<
"</npoints>" <<
nl
139 <<
"<nfaces>" << surf.size() <<
"</nfaces>" <<
nl;
143 Info<<
"<areas size='" << surf.size() <<
"'>" <<
nl;
148 Info<<
"nPoints : " << surf.nPoints() <<
nl
149 <<
"nFaces : " << surf.size() <<
nl;
159 const scalar fArea(surf[facei].
mag(surf.points()));
175 Info<<
"<area>" << areaTotal <<
"</area>" <<
nl
176 <<
"</surfaceMeshInfo>" <<
nl;
180 Info<<
"area : " << areaTotal <<
nl;
static void noBanner()
Disable emitting the banner information.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling file names.
T getOrDefault(const word &optName, const T &deflt) const
Get a value from the named option if present, or return default.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Extract command arguments and options from the supplied argc and argv parameters.
const fileName & rootPath() const
Return root path.
#define forAll(list, i)
Loop across all elements in list.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
messageStream Info
Information stream (uses stdout - output is on the master only)
static void disable()
Disallow profiling by forcing the InfoSwitch off.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const fileName & caseName() const
Return case name (parallel run) or global case (serial run)
static void noParallel()
Remove the parallel options.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
bool found(const word &optName) const
Return true if the named option is found.