Go to the documentation of this file.
71 int main(
int argc,
char *argv[])
77 "write block edges and centres as .obj files"
83 "specify alternative dictionary for the blockMesh description"
123 runTime.path()/runTime.constant()
155 Info<<
"Creating block mesh from\n "
168 fileName objMeshFile(
"blockTopology.obj");
170 OFstream str(runTime.path()/objMeshFile);
172 Info<<
nl <<
"Dumping block structure as Lightwave obj format"
173 <<
" to " << objMeshFile <<
endl;
180 fileName objCcFile(
"blockCentres.obj");
182 OFstream str(runTime.path()/objCcFile);
184 Info<<
nl <<
"Dumping block centres as Lightwave obj format"
185 <<
" to " << objCcFile <<
endl;
191 forAll(cellCentres, cellI)
194 const point& cc = cellCentres[cellI];
196 str <<
"v " << cc.
x() <<
' ' << cc.
y() <<
' ' << cc.
z() <<
nl;
206 Info<<
nl <<
"Creating polyMesh from blockMesh" <<
endl;
229 if (meshDict.
found(
"mergePatchPairs"))
233 meshDict.
lookup(
"mergePatchPairs")
240 Info<<
nl <<
"There are no merge patch pairs edges" <<
endl;
267 const block&
b = blocks[blockI];
269 const word& zoneName =
b.blockDef().zoneName();
277 if (iter == zoneMap.end())
281 Info<<
" " << zoneI <<
'\t' << zoneName <<
endl;
283 zoneMap.
insert(zoneName, zoneI);
292 zoneCells[zoneI].
append(cellI++);
297 cellI +=
b.cells().size();
304 Info<<
nl <<
"Writing cell zones as cellSets" <<
endl;
308 label zoneI = iter();
313 zoneCells[zoneI].shrink(),
319 cellSet cset(
mesh, iter.key(), zoneCells[zoneI].shrink());
337 <<
"Failed writing polyMesh."
348 Info<<
"----------------" <<
nl
349 <<
"Mesh Information" <<
nl
350 <<
"----------------" <<
nl
357 Info<<
"----------------" <<
nl
359 <<
"----------------" <<
nl;
365 Info<<
" " <<
"patch " << patchI
366 <<
" (start: " <<
p.start()
367 <<
" size: " <<
p.size()
368 <<
") name: " <<
p.name()
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual const pointField & points() const
Return raw points.
PtrList< dictionary > patchDicts() const
Get patch information from the topology mesh.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
const faceListList & patches() const
Return the patch face lists.
A class for handling words, derived from string.
A class for handling file names.
bool exists(const fileName &, const bool checkGzip=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
static void addOption(const word &opt, const string ¶m="", const string &usage="")
Add to an option to validOptions with usage information.
static word defaultRegion
Return the default region name.
#define forAll(list, i)
Loop across all elements in list.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
int main(int argc, char *argv[])
virtual bool write() const
Write using setting from DB.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const polyMesh & topology() const
Return the blockMesh topology as a polyMesh.
Mesh consisting of general polyhedral cells.
static void verbose(const bool on=true)
Enable/disable verbose information about the progress.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const faceZoneMesh & faceZones() const
Return face zone mesh.
fileName objectPath() const
Return complete path + object name.
virtual bool write() const
Write mesh using IO settings from time.
bool headerOk()
Read and check header info.
const word dictName("particleTrackDict")
void writeTopology(Ostream &) const
Writes edges of blockMesh in OBJ format.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Pre-declare SubField and related Field type.
void append(const T &)
Append an element at the end of the list.
A patch is a list of labels that address the faces in the global face list.
const pointZoneMesh & pointZones() const
Return point zone mesh.
void removeFiles(const fileName &instanceDir) const
Remove all files from mesh instance.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return number of elements in table.
label nInternalFaces() const
bool isDir(const fileName &)
Does the name exist as a DIRECTORY in the file system?
A collection of cell labels.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const vectorField & cellCentres() const
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label numZonedBlocks() const
Number of blocks with specified zones.
const pointField & points() const
The points for the entire mesh.
static unsigned int defaultPrecision()
Return the default precision.
Xfer< T > xferCopy(const T &)
Construct by copying the contents of the arg.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
wordList patchNames() const
Return patch names.
bool optionFound(const word &opt) const
Return true if the named option is found.
A bounding box defined in terms of the points at its extremities.
static void noParallel()
Remove the parallel options.
const cellShapeList & cells() const
Return cell shapes list.
Foam::argList args(argc, argv)
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
void addZones(const List< pointZone * > &pz, const List< faceZone * > &fz, const List< cellZone * > &cz)
Add mesh zones.
A multi-block mesh generator.