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;
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
const fileName & caseName() const noexcept
static void addNote(const string ¬e)
Extract command arguments and options from the supplied argc and argv parameters.
T get(const label index) const
static void addArgument(const string &argName, const string &usage="")
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
const fileName & rootPath() const noexcept
bool found(const word &optName) const