63 int main(
int argc,
char *argv[])
67 "Convert an Adventure .msh file to OpenFOAM" 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;
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;
List< faceList > faceListList
List of faceList.
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
IOstream & hex(IOstream &io)
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy the source to the destination (recursively if necessary).
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.
Various functions to operate on Lists.
static const cellModel & ref(const modelType model)
Look up reference to cellModel by enumeration. Fatal on failure.
void removeFiles(const fileName &instanceDir) const
Remove all files from mesh instance.
static word defaultRegion
Return the default region name.
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
const word & constant() const noexcept
Return constant name.
Input from file stream as an ISstream, normally using std::ifstream for the actual input...
List< word > wordList
List of word.
vector point
Point is a vector.
T get(const label index) const
Get a value from the argument at index.
Tet point storage. Default constructable (tetrahedron is not)
Maps a geometry to a set of cell primitives.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Mesh consisting of general polyhedral cells.
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
bool found(const word &optName) const
Return true if the named option is found.