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

A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation. Some of the input is similar to blockMeshDict, but since this specialization is for a single-block that is aligned with the x-y-z directions, it provides a different means of specifying the mesh. More...

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

Classes

struct  gridControl
 
class  location
 

Public Types

enum  expansionType : uint8_t { EXPAND_UNIFORM, EXPAND_RATIO, EXPAND_RELATIVE }
 

Public Member Functions

 PDRblock ()
 
 PDRblock (const UList< scalar > &xgrid, const UList< scalar > &ygrid, const UList< scalar > &zgrid)
 
 PDRblock (const dictionary &dict, bool verboseOutput=false)
 
bool read (const dictionary &dict)
 
void reset (const UList< scalar > &xgrid, const UList< scalar > &ygrid, const UList< scalar > &zgrid)
 
const Vector< location > & grid () const
 
Vector< gradingDescriptorsgrading () const
 
gradingDescriptors grading (const direction cmpt) const
 
const boundBoxbounds () const
 
const scalarMinMaxedgeLimits () const
 
scalar dx (const label i) const
 
scalar dx (const labelVector &ijk) const
 
scalar dy (const label j) const
 
scalar dy (const labelVector &ijk) const
 
scalar dz (const label k) const
 
scalar dz (const labelVector &ijk) const
 
vector span (const label i, const label j, const label k) const
 
vector span (const labelVector &ijk) const
 
point grid (const label i, const label j, const label k) const
 
point grid (const labelVector &ijk) const
 
point C (const label i, const label j, const label k) const
 
point C (const labelVector &ijk) const
 
scalar V (const label i, const label j, const label k) const
 
scalar V (const labelVector &ijk) const
 
scalar width (const label i, const label j, const label k) const
 
scalar width (const labelVector &ijk) const
 
labelVector findCell (const point &pt) const
 
labelVector gridIndex (const point &pt, const scalar relTol=0.01) const
 
OstreamblockMeshDict (Ostream &os, const bool withHeader=false) const
 
dictionary blockMeshDict () const
 
void writeBlockMeshDict (const IOobject &io) const
 
autoPtr< polyMeshmesh (const IOobject &io) const
 
autoPtr< polyMeshinnerMesh (const IOobject &io) const
 
- Public Member Functions inherited from ijkMesh
 ijkMesh ()
 
 ijkMesh (const labelVector &ijk)
 
 ijkMesh (const label nx, const label ny, const label nz)
 
label nPoints () const
 
label nCells () const
 
label nFaces () const
 
label nInternalFaces () const
 
label nBoundaryFaces () const
 
label nBoundaryFaces (const direction shapeFacei) const
 
label cellLabel (const label i, const label j, const label k) const
 
label cellLabel (const labelVector &ijk) const
 
label pointLabel (const label i, const label j, const label k) const
 
label pointLabel (const labelVector &ijk) const
 
hexCell vertLabels (const label i, const label j, const label k) const
 
hexCell vertLabels (const labelVector &ijk) const
 
- Public Member Functions inherited from ijkAddressing
 ijkAddressing ()
 
 ijkAddressing (const labelVector &ijk)
 
 ijkAddressing (const label ni, const label nj, const label nk)
 
bool empty () const
 
const labelVectorsizes () const
 
labelVectorsizes ()
 
label size () const
 
const label & size (const vector::components cmpt) const
 
void clear ()
 
void reset (const label ni, const label nj, const label nk)
 
void reset (const labelVector &newSizes)
 
label index (const label i, const label j, const label k) const
 
label index (const labelVector &ijk) const
 
labelVector index (const label idx) const
 
void checkIndex (const label i, const label j, const label k, const bool allowExtra=false) const
 
void checkIndex (const labelVector &ijk, const bool allowExtra=false) const
 
void checkSizes () const
 
void checkSizes (const labelVector &other) const
 
void checkSizes (const label nTotal) const
 

Static Public Member Functions

static const PDRblocknull ()
 

Static Public Attributes

const static Enum< expansionTypeexpansionNames_
 

Detailed Description

A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation. Some of the input is similar to blockMeshDict, but since this specialization is for a single-block that is aligned with the x-y-z directions, it provides a different means of specifying the mesh.

Dictionary controls

Property Description Required Default
x X-direction grid specification yes
y Y-direction grid specification yes
z Z-direction grid specification yes
scale Point scaling no 1.0
expansion Type of expansion (ratio/relative) no ratio
boundary Boundary patches yes
defaultPatch Default patch specification no

Grid coordinate controls

Property Description Required Default
points Locations defining the mesh segment yes
nCells Divisions per mesh segment yes
ratios Expansion values per segment no

A negative expansion value is trapped and treated as its reciprocal. by default, the expansion is as per blockMesh and represents the ratio of end-size / start-size for the section. Alternatively, the relative size can be given.

Source files

Definition at line 149 of file PDRblock.H.

Member Enumeration Documentation

◆ expansionType

enum expansionType : uint8_t
Enumerator
EXPAND_UNIFORM 

Uniform expansion (ie, no expansion)

EXPAND_RATIO 

End/start ratio.

EXPAND_RELATIVE 

Relative expansion ratio.

Definition at line 158 of file PDRblock.H.

Constructor & Destructor Documentation

◆ PDRblock() [1/3]

PDRblock ( )

Definition at line 508 of file PDRblock.C.

◆ PDRblock() [2/3]

PDRblock ( const UList< scalar > &  xgrid,
const UList< scalar > &  ygrid,
const UList< scalar > &  zgrid 
)

Definition at line 515 of file PDRblock.C.

References Foam::name(), and reset().

Here is the call graph for this function:

◆ PDRblock() [3/3]

PDRblock ( const dictionary dict,
bool  verboseOutput = false 
)
explicit

Definition at line 541 of file PDRblock.C.

References dict, and PDRblock::read().

Here is the call graph for this function:

Member Function Documentation

◆ null()

const Foam::PDRblock & null ( )
static

Definition at line 106 of file PDRblock.C.

◆ read()

bool read ( const dictionary dict)

Definition at line 561 of file PDRblock.C.

References dict, dictionary::findDict(), dictionary::getOrDefault(), Foam::Info, dictionary::read(), and dictionary::subDict().

Referenced by PDRblock::PDRblock().

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

◆ reset()

void reset ( const UList< scalar > &  xgrid,
const UList< scalar > &  ygrid,
const UList< scalar > &  zgrid 
)

◆ grid() [1/3]

const Foam::Vector< Foam::PDRblock::location > & grid ( ) const
inline

Definition at line 141 of file PDRblockI.H.

◆ grading() [1/2]

Foam::Vector< Foam::gradingDescriptors > grading ( ) const

Definition at line 706 of file PDRblock.C.

◆ grading() [2/2]

Foam::gradingDescriptors grading ( const direction  cmpt) const

Definition at line 712 of file PDRblock.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Vector< scalar >::X, Vector< scalar >::Y, and Vector< scalar >::Z.

Here is the call graph for this function:

◆ bounds()

const Foam::boundBox & bounds ( ) const
inline

Definition at line 153 of file PDRblockI.H.

◆ edgeLimits()

const Foam::scalarMinMax & edgeLimits ( ) const
inline

Definition at line 147 of file PDRblockI.H.

◆ dx() [1/2]

Foam::scalar dx ( const label  i) const
inline

Definition at line 159 of file PDRblockI.H.

Referenced by PDRblock::span(), and PDRblock::V().

Here is the caller graph for this function:

◆ dx() [2/2]

Foam::scalar dx ( const labelVector ijk) const
inline

Definition at line 165 of file PDRblockI.H.

References Vector< Cmpt >::x().

Here is the call graph for this function:

◆ dy() [1/2]

Foam::scalar dy ( const label  j) const
inline

Definition at line 171 of file PDRblockI.H.

Referenced by PDRblock::span(), and PDRblock::V().

Here is the caller graph for this function:

◆ dy() [2/2]

Foam::scalar dy ( const labelVector ijk) const
inline

Definition at line 177 of file PDRblockI.H.

References Vector< Cmpt >::y().

Here is the call graph for this function:

◆ dz() [1/2]

Foam::scalar dz ( const label  k) const
inline

Definition at line 183 of file PDRblockI.H.

References k.

Referenced by PDRblock::span(), and PDRblock::V().

Here is the caller graph for this function:

◆ dz() [2/2]

Foam::scalar dz ( const labelVector ijk) const
inline

Definition at line 189 of file PDRblockI.H.

References Vector< Cmpt >::z().

Here is the call graph for this function:

◆ span() [1/2]

Foam::vector span ( const label  i,
const label  j,
const label  k 
) const
inline

Definition at line 196 of file PDRblockI.H.

References PDRblock::dx(), PDRblock::dy(), PDRblock::dz(), and k.

Here is the call graph for this function:

◆ span() [2/2]

Foam::vector span ( const labelVector ijk) const
inline

Definition at line 206 of file PDRblockI.H.

References PDRblock::dx(), PDRblock::dy(), and PDRblock::dz().

Here is the call graph for this function:

◆ grid() [2/3]

Foam::point grid ( const label  i,
const label  j,
const label  k 
) const
inline

Definition at line 213 of file PDRblockI.H.

References k.

◆ grid() [3/3]

Foam::point grid ( const labelVector ijk) const
inline

Definition at line 223 of file PDRblockI.H.

References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ C() [1/2]

Foam::point C ( const label  i,
const label  j,
const label  k 
) const
inline

Definition at line 236 of file PDRblockI.H.

References k.

◆ C() [2/2]

Foam::point C ( const labelVector ijk) const
inline

Definition at line 246 of file PDRblockI.H.

References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ V() [1/2]

Foam::scalar V ( const label  i,
const label  j,
const label  k 
) const
inline

Definition at line 259 of file PDRblockI.H.

References PDRblock::dx(), PDRblock::dy(), PDRblock::dz(), and k.

Referenced by PDRblock::width().

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

◆ V() [2/2]

Foam::scalar V ( const labelVector ijk) const
inline

Definition at line 269 of file PDRblockI.H.

References PDRblock::dx(), PDRblock::dy(), PDRblock::dz(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ width() [1/2]

Foam::scalar width ( const label  i,
const label  j,
const label  k 
) const
inline

Definition at line 276 of file PDRblockI.H.

References Foam::cbrt(), k, and PDRblock::V().

Here is the call graph for this function:

◆ width() [2/2]

Foam::scalar width ( const labelVector ijk) const
inline

Definition at line 286 of file PDRblockI.H.

References Foam::cbrt(), and PDRblock::V().

Here is the call graph for this function:

◆ findCell()

Foam::labelVector findCell ( const point pt) const

Definition at line 676 of file PDRblock.C.

References Foam::pos().

Here is the call graph for this function:

◆ gridIndex()

Foam::labelVector gridIndex ( const point pt,
const scalar  relTol = 0.01 
) const

Definition at line 690 of file PDRblock.C.

References Foam::pos().

Here is the call graph for this function:

◆ blockMeshDict() [1/2]

Foam::Ostream & blockMeshDict ( Ostream os,
const bool  withHeader = false 
) const

◆ blockMeshDict() [2/2]

Foam::dictionary blockMeshDict ( ) const

Definition at line 770 of file PDRblockBlockMesh.C.

References os(), and List::transfer().

Here is the call graph for this function:

◆ writeBlockMeshDict()

void writeBlockMeshDict ( const IOobject io) const

◆ mesh()

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

Definition at line 374 of file PDRblockCreate.C.

References Foam::Info, and Foam::nl.

◆ innerMesh()

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

Member Data Documentation

◆ expansionNames_

const Foam::Enum< Foam::PDRblock::expansionType > expansionNames_
static

Definition at line 166 of file PDRblock.H.


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