63int main(
int argc,
char *argv[])
67 "Convert an Adventure .msh file to OpenFOAM"
69 argList::noParallel();
70 argList::addArgument(
".msh file");
71 argList::addBoolOption
74 "Treat input as containing hex instead of tet cells"
88 Info<<
"Trying to read " << nCells <<
" hexes." <<
nl <<
endl;
92 Info<<
"Trying to read " << nCells <<
" tets." <<
nl <<
endl;
97 const cellModel& tet = cellModel::ref(cellModel::TET);
105 for (label celli = 0; celli < nCells; celli++)
107 for (label
cp = 0;
cp < 8;
cp++)
109 mshStream >> hexPoints[
cp];
116 for (label celli = 0; celli < nCells; celli++)
118 for (label
cp = 0;
cp < 4;
cp++)
136 for (label pointi = 0; pointi <
nPoints; pointi++)
140 mshStream >>
x >>
y >> z;
150 polyMesh::defaultRegion,
165 IOstream::defaultPrecision(
max(10u, IOstream::defaultPrecision()));
Various functions to operate on Lists.
Input from file stream, using an ISstream.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
T get(const label index) const
Get a value from the argument at index.
bool found(const word &optName) const
Return true if the named option is found.
Maps a geometry to a set of cell primitives.
A class for handling file names.
Mesh consisting of general polyhedral cells.
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a)
const volScalarField & cp
Foam::argList args(argc, argv)