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 "Alternative remapping dictionary (default: '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")
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);
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
A class for handling file names.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/"finiteArea-edgesCentres"))
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fileName & globalCaseName() const noexcept
Return global case name.
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.
Write OpenFOAM meshes and/or results to CCM format.
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.
#define forAll(list, i)
Loop across all elements in list.
void printUsage(bool full=true) const
Print usage.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
label size() const noexcept
The number of entries in the list.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
bool remove_ext()
Remove extension, returning true if string changed.
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options and also set the runTime to the first i...
T & last()
Access last element of the list, position [size()-1].
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
bool moving() const noexcept
Is mesh moving.
label nCells() const noexcept
Number of mesh cells.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool writeGeometry()
Write patch topology.
bool readIfPresent(const word &optName, T &val) const
Read a value from the named option if present.
Reader/writer for handling ccm files.
Foam::argList args(argc, argv)
static string defaultMeshName
The name for the topology file reference.
bool found(const word &optName) const
Return true if the named option is found.
static void addOptions(const bool constant=true, const bool withZero=false)
Add timeSelector options to argList::validOptions.