Go to the documentation of this file.
93 int main(
int argc,
char *argv[])
97 "Reads CCM files as written by PROSTAR/STARCCM and writes an OPENFOAM "
98 " polyMesh. Multi-region support for PROSTAR meshes should be stable."
99 " Multi-region merging for STARCCM meshes will not always be"
108 "Write in ASCII format instead of binary"
113 "Re-export mesh in CCM format for post-processing"
118 "List some information about the geometry"
124 "Use specified remapping dictionary instead of <constant/remapping>"
130 "Provide alternative base name when re-exporting (implies -export). "
131 "Default is <meshExport>."
136 "Remove any baffles by merging the faces"
141 "Merge in-place interfaces"
146 "Use numbered names (eg, patch_0, zone_0) only"
152 "Geometry scaling factor - default is 1 (ie, no scaling)"
157 "Treat any solid cells present just like fluid cells. "
158 "The default is to remove them."
174 const word ext(exportName.
ext());
176 if (ext ==
"ccm" || ext ==
"ccmg" || ext ==
"ccmp")
178 exportName = exportName.
lessExt();
219 Info<<
"treating solids like fluids" <<
endl;
233 Info<<
"mesh geometry information:" <<
endl;
234 if (reader.hasGeometry())
236 Info<<
nl <<
"cellTable:" << reader.cellTableInfo()
237 <<
nl <<
"boundaryRegion:" << reader.boundaryTableInfo()
238 <<
nl <<
"interfaces:" << reader.interfaceDefinitionsInfo()
245 : reader.remapMeshInfo(
runTime)
249 <<
"Remapped cellTable:" << reader.cellTableInfo() <<
nl
250 <<
"Remapped boundaryRegion:" << reader.boundaryTableInfo()
261 else if (reader.readGeometry(scaleFactor))
276 Info<<
"Number of regions: " << rs.nRegions();
277 if (rs.nRegions() == 1)
284 <<
"**************************************************" <<
nl
285 <<
"** WARNING: the mesh has disconnected regions **" <<
nl
286 <<
"**************************************************" <<
nl;
292 if (exportName.size())
294 const fileName geomName = exportName +
".ccmg";
295 Info<<
nl <<
"Re-exporting geometry as " << geomName <<
nl;
302 <<
"could not read geometry"
Reader/writer for handling ccm files.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for handling file names.
Reads CCM files as written by PROSTAR/STARCCM.
T getOrDefault(const word &optName, const T &deflt) const
const fileName & caseName() const noexcept
static string defaultMeshName
static void addNote(const string ¬e)
const functionObjectList & functionObjects() const
const fileName & globalCaseName() const noexcept
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
T get(const label index) const
bool readIfPresent(const word &optName, T &val) const
static void addArgument(const string &argName, const string &usage="")
bool removeBaffles() const
word format(conversionProperties.get< word >("format"))
static void noFunctionObjects(bool addWithOption=false)
bool useNumberedNames() const
This class separates the mesh into distinct unconnected regions, each of which is then given a label ...
label max(const labelHashSet &set, label maxValue=labelMin)
errorManipArg< error, int > exit(error &err, const int errNo=1)
const boundBox & bounds() const
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
static unsigned int defaultPrecision() noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
bool mergeInterfaces() const
@ ASCII
"ascii" (normal default)
#define FatalErrorInFunction
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Foam::argList args(argc, argv)
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
virtual bool writeGeometry()
const fileName & rootPath() const noexcept
bool found(const word &optName) const