Go to the documentation of this file.
84 int main(
int argc,
char *argv[])
88 "Translate OPENFOAM data to CCM format"
102 "Provide alternative base name. Default is <meshExport>."
107 "No backup of existing output files"
113 "Use specified remapping dictionary instead of <constant/remapping>"
118 "Convert results only"
130 const bool optResults =
args.
found(
"results");
131 const bool optOverwrite =
args.
found(
"overwrite");
136 const word ext(exportName.
ext());
138 if (ext ==
"ccm" || ext ==
"ccmg" || ext ==
"ccmp")
140 exportName = exportName.
lessExt();
148 if (optMesh && optResults)
151 <<
"\n-mesh and -results options are mutually exclusive\n"
181 #include "getTimeIndex.H"
187 exportName +
".ccmg",
219 #include "getTimeIndex.H"
233 exportName +
".ccmg",
258 Info<<
"writing solution:";
265 writer.writeSolution(objects);
Reader/writer for handling ccm files.
A class for handling words, derived from Foam::string.
A class for handling file names.
static string defaultMeshName
The name for the topology file reference.
static void addNote(const string ¬e)
Add extra notes for the usage information.
const fileName & globalCaseName() const noexcept
Return global case name.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
fileName lessExt() const
Return file name without extension (part before last .)
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
label nPoints() const noexcept
Number of mesh points.
#define forAll(list, i)
Loop across all elements in list.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
label nCells() const noexcept
Number of mesh cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Base class for graphics format writing. Entry points are.
word ext() const
Return file name extension (part after last .)
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
List of IOobjects with searching and retrieving facilities.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
bool moving() const noexcept
Is mesh moving.
static void noParallel()
Remove the parallel options.
static instantList select0(Time &runTime, const argList &args)
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)
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
void printUsage(bool full=true) const
Print usage.
bool found(const word &optName) const
Return true if the named option is found.
Write OpenFOAM meshes and/or results to CCM format.