63int main(
int argc,
char *argv[])
67 "Convert an Adventure .msh file to OpenFOAM"
74 "Treat input as containing hex instead of tet cells"
80 const bool readHex =
args.found(
"hex");
88 Info<<
"Trying to read " << nCells <<
" hexes." <<
nl <<
endl;
92 Info<<
"Trying to read " << nCells <<
" tets." <<
nl <<
endl;
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;
Various functions to operate on Lists.
Input from file stream as an ISstream, normally using std::ifstream for the actual input.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void noParallel()
Remove the parallel options.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Maps a geometry to a set of cell primitives.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
A class for handling file names.
Mesh consisting of general polyhedral cells.
static word defaultRegion
Return the default region name.
Tet point storage. Default constructable (tetrahedron is not).
List< word > wordList
List of word.
List< label > labelList
A List of labels.
messageStream Info
Information stream (stdout output on master, null elsewhere).
IOstream & hex(IOstream &io)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< faceList > faceListList
List of faceList.
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
List< cellShape > cellShapeList
List of cellShape.
constexpr char nl
The newline '\n' character (0x0a).
const volScalarField & cp
Foam::argList args(argc, argv)