A multi-block mesh generator. More...
Public Member Functions | |
ClassName ("blockMesh") | |
blockMesh (const IOdictionary &, const word ®ionName) | |
Construct from IOdictionary. More... | |
~blockMesh () | |
Destructor. More... | |
const pointField & | blockPointField () const |
Reference to point field defining the block mesh. More... | |
const polyMesh & | topology () const |
Return the blockMesh topology as a polyMesh. More... | |
const curvedEdgeList & | edges () const |
Return the curved edges. More... | |
scalar | scaleFactor () const |
The scaling factor used to convert to metres. More... | |
const pointField & | points () const |
The points for the entire mesh. More... | |
const cellShapeList & | cells () const |
Return cell shapes list. More... | |
const faceListList & | patches () const |
Return the patch face lists. More... | |
PtrList< dictionary > | patchDicts () const |
Get patch information from the topology mesh. More... | |
wordList | patchNames () const |
Return patch names. More... | |
label | numZonedBlocks () const |
Number of blocks with specified zones. More... | |
void | clearGeom () |
Clear geometry (internal points, cells, boundaryPatches) More... | |
void | writeTopology (Ostream &) const |
Writes edges of blockMesh in OBJ format. More... | |
![]() | |
PtrList () | |
Null Constructor. More... | |
PtrList (const label) | |
Construct with size specified. More... | |
PtrList (const PtrList< T > &) | |
Copy constructor. More... | |
template<class CloneArg > | |
PtrList (const PtrList< T > &, const CloneArg &) | |
Copy constructor with additional argument for clone. More... | |
PtrList (const Xfer< PtrList< T > > &) | |
Construct by transferring the parameter contents. More... | |
PtrList (PtrList< T > &, bool reUse) | |
Construct as copy or re-use as specified. More... | |
PtrList (const SLPtrList< T > &) | |
Construct as copy of SLPtrList<T> More... | |
template<class INew > | |
PtrList (Istream &, const INew &) | |
Construct from Istream using given Istream constructor class. More... | |
PtrList (Istream &) | |
Construct from Istream using default Istream constructor class. More... | |
~PtrList () | |
Destructor. More... | |
label | size () const |
Return the number of elements in the PtrList. More... | |
bool | empty () const |
Return true if the PtrList is empty (ie, size() is zero). More... | |
T & | first () |
Return reference to the first element of the list. More... | |
const T & | first () const |
Return reference to first element of the list. More... | |
T & | last () |
Return reference to the last element of the list. More... | |
const T & | last () const |
Return reference to the last element of the list. More... | |
void | setSize (const label) |
Reset size of PtrList. If extending the PtrList, new entries are. More... | |
void | resize (const label) |
Alias for setSize(const label) More... | |
void | clear () |
Clear the PtrList, i.e. set size to zero deleting all the. More... | |
void | append (T *) |
Append an element at the end of the list. More... | |
void | append (const autoPtr< T > &) |
void | append (const tmp< T > &) |
void | transfer (PtrList< T > &) |
Transfer the contents of the argument PtrList into this PtrList. More... | |
Xfer< PtrList< T > > | xfer () |
Transfer contents to the Xfer container. More... | |
bool | set (const label) const |
Is element set. More... | |
autoPtr< T > | set (const label, T *) |
Set element. Return old element (can be NULL). More... | |
autoPtr< T > | set (const label, const autoPtr< T > &) |
autoPtr< T > | set (const label, const tmp< T > &) |
void | reorder (const labelUList &) |
Reorders elements. Ordering does not have to be done in. More... | |
const T & | operator[] (const label) const |
Return element const reference. More... | |
T & | operator[] (const label) |
Return element reference. More... | |
const T * | operator() (const label) const |
Return element const pointer. More... | |
PtrList< T > & | operator= (const PtrList< T > &) |
Assignment. More... | |
iterator | begin () |
Return an iterator to begin traversing the PtrList. More... | |
iterator | end () |
Return an iterator to end traversing the PtrList. More... | |
const_iterator | cbegin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | cend () const |
Return an const_iterator to end traversing the PtrList. More... | |
const_iterator | begin () const |
Return an const_iterator to begin traversing the PtrList. More... | |
const_iterator | end () const |
Return an const_iterator to end traversing the PtrList. More... | |
template<class T > | |
PtrList () | |
template<class T > | |
PtrList (const label s) | |
template<class T > | |
PtrList (const PtrList< T > &a) | |
template<class T > | |
PtrList (const Xfer< PtrList< T > > &lst) | |
template<class T > | |
PtrList (PtrList< T > &a, bool reUse) | |
template<class T > | |
PtrList (const SLPtrList< T > &sll) | |
template<class T > | |
PtrList (Istream &is) | |
Static Public Member Functions | |
static void | verbose (const bool on=true) |
Enable/disable verbose information about the progress. More... | |
Private Member Functions | |
bool | blockLabelsOK (const label blockLabel, const pointField &points, const cellShape &blockShape) const |
bool | patchLabelsOK (const label patchLabel, const pointField &points, const faceList &patchShapes) const |
bool | readPatches (const dictionary &meshDescription, faceListList &tmpBlocksPatches, wordList &patchNames, wordList &patchTypes, wordList &nbrPatchNames) |
bool | readBoundary (const dictionary &meshDescription, wordList &patchNames, faceListList &tmpBlocksPatches, PtrList< dictionary > &patchDicts) |
void | createCellShapes (cellShapeList &tmpBlockCells) |
polyMesh * | createTopology (const IOdictionary &, const word ®ionName) |
void | checkBlockMesh (const polyMesh &) const |
void | calcMergeInfo () |
Determine the merge info and the final number of cells/points. More... | |
void | calcMergeInfoFast () |
Determine the merge info and the final number of cells/points. More... | |
faceList | createPatchFaces (const polyPatch &patchTopologyFaces) const |
void | createPoints () const |
void | createCells () const |
void | createPatches () const |
blockMesh (const blockMesh &) | |
As copy (not implemented) More... | |
Private Attributes | |
pointField | blockPointField_ |
Point field defining the block mesh (corners) More... | |
curvedEdgeList | edges_ |
The list of curved edges. More... | |
scalar | scaleFactor_ |
The scaling factor to convert to metres. More... | |
polyMesh * | topologyPtr_ |
The blocks themselves (the topology) as a polyMesh. More... | |
label | nPoints_ |
label | nCells_ |
The sum of all cells in each block. More... | |
labelList | blockOffsets_ |
The point offset added to each block. More... | |
labelList | mergeList_ |
The merge points information. More... | |
pointField | points_ |
cellShapeList | cells_ |
faceListList | patches_ |
Static Private Attributes | |
static bool | verboseOutput |
Switch for verbose output. More... | |
Additional Inherited Members | |
![]() | |
typedef T | value_type |
Type of values the PtrList contains. More... | |
typedef T & | reference |
Type that can be used for storing into PtrList::value_type objects. More... | |
![]() | |
const typedef T & | const_reference |
Type that can be used for storing into constant PtrList::value_type. More... | |
![]() | |
template<class INew > | |
void | read (Istream &, const INew &inewt) |
Read from Istream using given Istream constructor class. More... | |
A multi-block mesh generator.
Definition at line 58 of file blockMesh.H.
blockMesh | ( | const IOdictionary & | dict, |
const word & | regionName | ||
) |
Construct from IOdictionary.
Definition at line 41 of file blockMesh.C.
References blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), and dict.
~blockMesh | ( | ) |
Destructor.
Definition at line 62 of file blockMesh.C.
|
private |
Definition at line 150 of file blockMeshCheck.C.
References Foam::endl(), forAll, points, and WarningInFunction.
|
private |
Definition at line 185 of file blockMeshCheck.C.
References Foam::endl(), f(), forAll, patchFaces(), points, and WarningInFunction.
|
private |
Definition at line 34 of file blockMeshTopology.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, token::isLabel(), token::isPunctuation(), token::labelToken(), IOstream::lineNumber(), dictionary::lookup(), Foam::nl, nPatches, patchNames(), patchTypes(), token::pToken(), Istream::putBack(), Istream::readBegin(), Istream::readEnd(), List::setSize(), List::size(), and WarningInFunction.
|
private |
Definition at line 186 of file blockMeshTopology.C.
References entry::dict(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, entry::isDict(), entry::keyword(), dictionary::lookup(), patchDicts, patchNames(), List::setSize(), and PtrList::size().
|
private |
Definition at line 235 of file blockMeshTopology.C.
References Foam::endl(), forAll, Foam::mag(), List::setSize(), PtrList::size(), and WarningInFunction.
|
private |
Definition at line 259 of file blockMeshTopology.C.
References TimePaths::constant(), defaultFacesType, dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, dictionary::found(), Foam::Info, IOWarningInFunction, token::isLabel(), token::isPunctuation(), token::labelToken(), dictionary::lookup(), Foam::compressible::New(), Foam::nl, patchDicts, patchNames(), patchTypes(), preservePatchTypes(), token::pToken(), Istream::putBack(), Istream::readBegin(), Istream::readEnd(), dictionary::readIfPresent(), regionName, PtrList::set(), PtrList::setSize(), PtrList::size(), dictionary::subDictPtr(), IOobject::time(), and Foam::xferCopy().
|
private |
Definition at line 30 of file blockMeshCheck.C.
References polyMesh::boundaryMesh(), blockMesh::cells(), primitiveMesh::cells(), Foam::endl(), Foam::exit(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, primitiveMesh::nInternalFaces(), Foam::nl, face::normal(), blockMesh::patches(), patchi, blockMesh::points(), polyMesh::points(), List::size(), Foam::tab, and blockMesh::verboseOutput.
|
private |
Determine the merge info and the final number of cells/points.
Definition at line 30 of file blockMeshMerge.C.
References blockMesh::blockOffsets_, primitiveMesh::cells(), Foam::cp(), Foam::endl(), Foam::exit(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, Foam::flush(), forAll, Foam::Info, Foam::magSqr(), blockMesh::mergeList_, Foam::min(), blockMesh::nCells_, Foam::nl, blockMesh::nPoints_, blockMesh::points(), polyMesh::points(), List::setSize(), List::size(), PtrList::size(), boundBox::span(), blockMesh::topology(), and blockMesh::verboseOutput.
Referenced by blockMesh::blockMesh().
|
private |
Determine the merge info and the final number of cells/points.
Definition at line 291 of file blockMeshMergeFast.C.
References blockMesh::blockOffsets_, primitiveMesh::cells(), Foam::e, Foam::endl(), Foam::exit(), Foam::faceMap(), polyMesh::faceNeighbour(), Foam::faceNij(), polyMesh::faceOwner(), Foam::facePoint(), Foam::facePointN(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, Pair::first(), Foam::flush(), forAll, Foam::genFaceFaceRotMap(), Foam::Info, Foam::mag(), Foam::magSqr(), Foam::max(), blockMesh::mergeList_, Foam::min(), blockMesh::nCells_, blockMesh::nPoints_, blockMesh::points(), polyMesh::points(), Pair::second(), Foam::setBlockFaceCorrespondence(), List::setSize(), PtrList::size(), UList::size(), boundBox::span(), Foam::sqrt(), blockMesh::topology(), and blockMesh::verboseOutput.
Referenced by blockMesh::blockMesh().
|
private |
Definition at line 145 of file blockMeshCreate.C.
References forAll, patchFaces(), quadFace(), List::setSize(), and PtrList::size().
|
private |
Definition at line 32 of file blockMeshCreate.C.
References blockMesh::blockOffsets_, Foam::endl(), forAll, Foam::Info, Foam::mag(), blockMesh::mergeList_, Foam::nl, blockMesh::nPoints_, blockMesh::points_, blockMesh::scaleFactor_, blockMesh::verboseOutput, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
private |
Definition at line 99 of file blockMeshCreate.C.
References Foam::endl(), forAll, Foam::hex(), Foam::Info, and cellModeller::lookup().
|
private |
Definition at line 259 of file blockMeshCreate.C.
References Foam::endl(), forAll, Foam::Info, and PtrList::size().
ClassName | ( | "blockMesh" | ) |
const Foam::pointField & blockPointField | ( | ) | const |
Reference to point field defining the block mesh.
these points have not been scaled by scaleFactor
Definition at line 76 of file blockMesh.C.
const Foam::polyMesh & topology | ( | ) | const |
Return the blockMesh topology as a polyMesh.
Definition at line 82 of file blockMesh.C.
References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), and main().
|
inline |
Foam::scalar scaleFactor | ( | ) | const |
The scaling factor used to convert to metres.
Definition at line 112 of file blockMesh.C.
const Foam::pointField & points | ( | ) | const |
The points for the entire mesh.
these points have been scaled by scaleFactor
Definition at line 118 of file blockMesh.C.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), blockMesh::checkBlockMesh(), and main().
const Foam::cellShapeList & cells | ( | ) | const |
Return cell shapes list.
Definition at line 129 of file blockMesh.C.
Referenced by blockMesh::checkBlockMesh(), and main().
const Foam::faceListList & patches | ( | ) | const |
Return the patch face lists.
Definition at line 140 of file blockMesh.C.
Referenced by blockMesh::checkBlockMesh(), and main().
Foam::PtrList< Foam::dictionary > patchDicts | ( | ) | const |
Get patch information from the topology mesh.
Definition at line 95 of file blockMesh.C.
References forAll, patchDicts, PtrList::size(), and OStringStream::str().
Referenced by main().
Foam::wordList patchNames | ( | ) | const |
Return patch names.
Definition at line 151 of file blockMesh.C.
Referenced by main().
Foam::label numZonedBlocks | ( | ) | const |
Number of blocks with specified zones.
Definition at line 169 of file blockMesh.C.
References forAll.
Referenced by main().
void clearGeom | ( | ) |
Clear geometry (internal points, cells, boundaryPatches)
Definition at line 283 of file blockMeshCreate.C.
References forAll.
|
static |
Enable/disable verbose information about the progress.
Definition at line 70 of file blockMesh.C.
Referenced by main().
void writeTopology | ( | Ostream & | os | ) | const |
Writes edges of blockMesh in OBJ format.
Definition at line 185 of file blockMesh.C.
References Foam::e, Foam::endl(), forAll, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by main().
|
staticprivate |
Switch for verbose output.
Definition at line 65 of file blockMesh.H.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), blockMesh::checkBlockMesh(), and blockMesh::createPoints().
|
private |
Point field defining the block mesh (corners)
Definition at line 68 of file blockMesh.H.
|
private |
The list of curved edges.
Definition at line 71 of file blockMesh.H.
Referenced by blockMesh::edges().
|
private |
The scaling factor to convert to metres.
Definition at line 74 of file blockMesh.H.
Referenced by blockMesh::createPoints().
|
private |
The blocks themselves (the topology) as a polyMesh.
Definition at line 77 of file blockMesh.H.
|
private |
Definition at line 79 of file blockMesh.H.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), and blockMesh::createPoints().
|
private |
The sum of all cells in each block.
Definition at line 82 of file blockMesh.H.
Referenced by blockMesh::calcMergeInfo(), and blockMesh::calcMergeInfoFast().
|
private |
The point offset added to each block.
Definition at line 85 of file blockMesh.H.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), and blockMesh::createPoints().
|
private |
The merge points information.
Definition at line 88 of file blockMesh.H.
Referenced by blockMesh::calcMergeInfo(), blockMesh::calcMergeInfoFast(), and blockMesh::createPoints().
|
mutableprivate |
Definition at line 90 of file blockMesh.H.
Referenced by blockMesh::createPoints().
|
mutableprivate |
Definition at line 92 of file blockMesh.H.
|
mutableprivate |
Definition at line 94 of file blockMesh.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.