Public Types | Public Member Functions | Static Public Attributes | List of all members
blockMesh Class Reference

A multi-block mesh generator. More...

Inheritance diagram for blockMesh:
Inheritance graph
[legend]
Collaboration diagram for blockMesh:
Collaboration graph
[legend]

Public Types

enum  mergeStrategy { DEFAULT_MERGE, MERGE_TOPOLOGY, MERGE_POINTS }
 
typedef PtrList< blockblockList
 

Public Member Functions

 ClassName ("blockMesh")
 
 blockMesh (const IOdictionary &dict, const word &regionName=polyMesh::defaultRegion, mergeStrategy strategy=mergeStrategy::DEFAULT_MERGE, int verbosity=0)
 
 ~blockMesh ()=default
 
const dictionarymeshDict () const noexcept
 
const searchableSurfacesgeometry () const noexcept
 
const blockEdgeListedges () const noexcept
 
const blockFaceListfaces () const noexcept
 
bool valid () const noexcept
 
wordList patchNames () const
 
label numZonedBlocks () const
 
bool hasPointTransforms () const noexcept
 
bool inplacePointTransforms (pointField &pts) const
 
tmp< pointFieldglobalPosition (const pointField &localPoints) const
 
const pointFieldvertices () const noexcept
 
tmp< pointFieldvertices (bool applyTransform) const
 
const polyMeshtopology () const
 
refPtr< polyMeshtopology (bool applyTransform) const
 
const pointFieldpoints () const
 
const cellShapeListcells () const
 
const faceListListpatches () const
 
PtrList< dictionarypatchDicts () const
 
int verbose () const noexcept
 
int verbose (const int level) noexcept
 
autoPtr< polyMeshmesh (const IOobject &io) const
 
scalar scaleFactor () const
 
- Public Member Functions inherited from PtrList< block >
constexpr PtrList () noexcept
 
 PtrList (const label len)
 
 PtrList (const PtrList< T > &list)
 
 PtrList (PtrList< T > &&list)
 
 PtrList (UList< T * > &list)
 
 PtrList (const PtrList< T > &list, const CloneArg &cloneArgs)
 
 PtrList (PtrList< T > &list, bool reuse)
 
 PtrList (const SLPtrList< T > &list)
 
 PtrList (Istream &is, const INew &inew)
 
 PtrList (Istream &is)
 
 PtrList (PtrList< T > &list, bool reuse)
 
 PtrList (const SLPtrList< T > &list)
 
constexpr PtrList () noexcept
 
 PtrList (const label len)
 
 PtrList (const PtrList< T > &list)
 
 PtrList (PtrList< T > &&list)
 
 PtrList (UList< T * > &list)
 
 PtrList (Istream &is)
 
 ~PtrList ()
 
PtrList< Tclone (Args &&... args) const
 
Foam::PtrList< Tclone (Args &&... args) const
 
const Tset (const label i) const
 
autoPtr< Tset (const label i, T *ptr)
 
autoPtr< Tset (const label i, autoPtr< T > &ptr)
 
autoPtr< Tset (const label i, autoPtr< T > &&ptr)
 
autoPtr< Tset (const label i, std::unique_ptr< T > &&ptr)
 
autoPtr< Tset (const label i, const refPtr< T > &ptr)
 
autoPtr< Tset (const label i, const tmp< T > &ptr)
 
void clear ()
 
void resize (const label newLen)
 
void setSize (const label newLen)
 
void emplace_append (Args &&... args)
 
void append (T *ptr)
 
void append (autoPtr< T > &ptr)
 
void append (autoPtr< T > &&ptr)
 
void append (std::unique_ptr< T > &&ptr)
 
void append (const refPtr< T > &ptr)
 
void append (const tmp< T > &ptr)
 
autoPtr< Templace (const label i, Args &&... args)
 
Foam::autoPtr< Templace (const label i, Args &&... args)
 
autoPtr< Trelease (const label i)
 
void transfer (PtrList< T > &list)
 
void operator= (const PtrList< T > &list)
 
void operator= (PtrList< T > &&list)
 

Static Public Attributes

static bool verboseOutput = true
 

Additional Inherited Members

- Protected Member Functions inherited from PtrList< block >
void readIstream (Istream &is, const INew &inew)
 
void free ()
 

Detailed Description

A multi-block mesh generator.

Dictionary controls

Property Description Required Default
prescale Point scaling before transform no 1.0
scale Point scaling after transform no 1.0
transform Point transform (origin, rotation) no
vertices yes
blocks yes
edges no
faces no
boundary Boundary definition no
patches Alternate version for "boundary" no
namedBlocks no
namedVertices no
mergeType Merging "points" or "topology" no topology
checkFaceCorrespondence no true
verbose no true
Note
The prescale and scale can be a single scalar or a vector of values.

The vertices, cells and patches for filling the blocks are demand-driven.

Source files

Definition at line 161 of file blockMesh.H.

Member Typedef Documentation

◆ blockList

Definition at line 170 of file blockMesh.H.

Member Enumeration Documentation

◆ mergeStrategy

Enumerator
DEFAULT_MERGE 

Default (TOPOLOGY), not selectable.

MERGE_TOPOLOGY 

"topology" merge by block topology (default)

MERGE_POINTS 

"points" merge by point geometry

Definition at line 176 of file blockMesh.H.

Constructor & Destructor Documentation

◆ blockMesh()

blockMesh ( const IOdictionary dict,
const word regionName = polyMesh::defaultRegion,
mergeStrategy  strategy = mergeStrategy::DEFAULT_MERGE,
int  verbosity = 0 
)
explicit

Definition at line 242 of file blockMesh.C.

References Foam::endl(), Foam::Info, and Foam::nl.

Here is the call graph for this function:

◆ ~blockMesh()

~blockMesh ( )
default

Member Function Documentation

◆ ClassName()

ClassName ( "blockMesh"  )

◆ meshDict()

const dictionary& meshDict ( ) const
inlinenoexcept

Definition at line 364 of file blockMesh.H.

◆ geometry()

const searchableSurfaces& geometry ( ) const
inlinenoexcept

Definition at line 370 of file blockMesh.H.

◆ edges()

const blockEdgeList& edges ( ) const
inlinenoexcept

Definition at line 376 of file blockMesh.H.

◆ faces()

const blockFaceList& faces ( ) const
inlinenoexcept

Definition at line 382 of file blockMesh.H.

◆ valid()

bool valid ( ) const
noexcept

Definition at line 320 of file blockMesh.C.

References bool.

◆ patchNames()

Foam::wordList patchNames ( ) const

Definition at line 412 of file blockMesh.C.

Referenced by blockMesh::mesh().

Here is the caller graph for this function:

◆ numZonedBlocks()

Foam::label numZonedBlocks ( ) const

Definition at line 430 of file blockMesh.C.

References Foam::BitOps::count().

Referenced by blockMesh::mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasPointTransforms()

bool hasPointTransforms ( ) const
noexcept

Definition at line 448 of file blockMesh.C.

References bool.

◆ inplacePointTransforms()

bool inplacePointTransforms ( pointField pts) const

Definition at line 454 of file blockMesh.C.

References Foam::cmptMultiply(), p, and Foam::transform().

Here is the call graph for this function:

◆ globalPosition()

Foam::tmp< Foam::pointField > globalPosition ( const pointField localPoints) const

Definition at line 527 of file blockMesh.C.

References tmp::New().

Here is the call graph for this function:

◆ vertices() [1/2]

const Foam::pointField & vertices ( ) const
noexcept

Definition at line 340 of file blockMesh.C.

◆ vertices() [2/2]

Foam::tmp< Foam::pointField > vertices ( bool  applyTransform) const

Definition at line 347 of file blockMesh.C.

References tmp::New().

Here is the call graph for this function:

◆ topology() [1/2]

const Foam::polyMesh & topology ( ) const

Definition at line 287 of file blockMeshCreate.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ topology() [2/2]

Foam::refPtr< Foam::polyMesh > topology ( bool  applyTransform) const

◆ points()

const Foam::pointField & points ( ) const

Definition at line 379 of file blockMesh.C.

Referenced by blockMesh::mesh().

Here is the caller graph for this function:

◆ cells()

const Foam::cellShapeList & cells ( ) const

Definition at line 390 of file blockMesh.C.

Referenced by blockMesh::mesh().

Here is the caller graph for this function:

◆ patches()

const Foam::faceListList & patches ( ) const

Definition at line 401 of file blockMesh.C.

Referenced by blockMesh::mesh().

Here is the caller graph for this function:

◆ patchDicts()

Foam::PtrList< Foam::dictionary > patchDicts ( ) const

Definition at line 362 of file blockMesh.C.

References forAll, os(), and patchDicts.

Referenced by blockMesh::mesh().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ verbose() [1/2]

int verbose ( ) const
noexcept

Definition at line 326 of file blockMesh.C.

◆ verbose() [2/2]

int verbose ( const int  level)
noexcept

Definition at line 332 of file blockMesh.C.

◆ mesh()

Foam::autoPtr< Foam::polyMesh > mesh ( const IOobject io) const

◆ scaleFactor()

scalar scaleFactor ( ) const
inline

Definition at line 464 of file blockMesh.H.

Member Data Documentation

◆ verboseOutput

bool verboseOutput = true
static

Definition at line 335 of file blockMesh.H.

Referenced by Foam::getVerbosity().


The documentation for this class was generated from the following files: