block Class Reference

Creates a single block of cells from point coordinates, numbers of cells in each direction and an expansion ratio. More...

Inheritance diagram for block:
[legend]
Collaboration diagram for block:
[legend]

Classes

class  iNew
 Class used for the read-construction of. More...
 

Public Member Functions

 TypeName ("block")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, block, Istream,(const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is),(dict, index, vertices, edges, faces, is))
 
 block (const cellShape &bshape, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, const labelVector &density, const UList< gradingDescriptors > &expand=UList< gradingDescriptors >::null(), const word &zoneName="")
 Construct from components. Optional zone name. More...
 
 block (const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)
 Construct from components with Istream. More...
 
 block (const blockDescriptor &blockDesc)
 Construct from a block definition. More...
 
autoPtr< blockclone () const
 Clone. More...
 
virtual ~block ()=default
 Destructor. More...
 
const pointFieldpoints () const noexcept
 The points for filling the block. More...
 
const List< hexCell > & cells () const
 The hex cells for filling the block. More...
 
const FixedList< List< FixedList< label, 4 > >, 6 > & boundaryPatches () const noexcept
 The boundary patch faces for the block. More...
 
cellShapeList shapes () const
 The (hex) cell shapes for filling the block. More...
 
- Public Member Functions inherited from blockDescriptor
 blockDescriptor (const blockDescriptor &)=default
 Copy construct. More...
 
void operator= (const blockDescriptor &)=delete
 No copy assignment. More...
 
 blockDescriptor (const cellShape &bshape, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, const labelVector &density, const UList< gradingDescriptors > &expand=UList< gradingDescriptors >::null(), const word &zoneName=word::null)
 Construct from components. Optional zone name. More...
 
 blockDescriptor (const dictionary &dict, const label blockIndex, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)
 Construct from Istream. More...
 
const pointFieldvertices () const noexcept
 Reference to point field defining the block mesh. More...
 
const blockFaceListblockFaces () const noexcept
 Return reference to the list of curved faces. More...
 
const cellShapeblockShape () const noexcept
 Return the block shape. More...
 
const labelVectordensity () const noexcept
 The mesh density (number of cells) in the i,j,k directions. More...
 
const List< gradingDescriptors > & grading () const noexcept
 Expansion ratios in all directions. More...
 
const wordzoneName () const noexcept
 Return the (optional) zone name. More...
 
const FixedList< label, 6 > & curvedFaces () const noexcept
 Curved-face labels for each block-face (-1 for flat faces) More...
 
label nCurvedFaces () const noexcept
 Number of curved faces in this block. More...
 
const pointblockPoint (const label i) const
 Return block point for local label i. More...
 
label facePointLabel (const direction facei, const label i, const label j) const
 
bool vertex (const label i, const label j, const label k) const
 True if point i,j,k addresses a block vertex. More...
 
bool edge (const label i, const label j, const label k) const
 True if point i,j,k addresses a block edge. More...
 
int edgesPointsWeights (pointField(&edgesPoints)[12], scalarList(&edgesWeights)[12]) const
 Calculate the points and weights for all edges. More...
 
bool edgePointsWeights (const label edgei, pointField &edgePoints, scalarList &edgeWeights, const label nDiv, const gradingDescriptors &gd=gradingDescriptors()) const
 
bool edgePointsWeights (const label edgei, pointField &edgePoints, scalarList &edgeWeights) const
 Calculate points and weights for specified edge. More...
 
bool flatFaceOrEdge (const label i, const label j, const label k) const
 Return true if point i,j,k addresses a block flat face or edge. More...
 
FixedList< pointField, 6 > facePoints (const pointField &points) const
 Return the list of face-points for all of the faces of the block. More...
 
void correctFacePoints (FixedList< pointField, 6 > &) const
 Correct the location of the given face-points. More...
 
InfoProxy< blockDescriptorinfo () const
 Return info proxy. More...
 
- Public Member Functions inherited from ijkMesh
 ijkMesh ()
 Construct zero-sized. More...
 
 ijkMesh (const labelVector &ijk)
 Construct with addressing. More...
 
 ijkMesh (const label nx, const label ny, const label nz)
 Construct with addressing. More...
 
label nPoints () const
 The number of mesh points (nx+1)*(ny+1)*(nz+1) in the i-j-k mesh. More...
 
label nCells () const
 The number of mesh cells (nx*ny*nz) in the i-j-k mesh. More...
 
label nFaces () const
 The total number of mesh faces in the i-j-k mesh. More...
 
label nInternalFaces () const
 The number of internal faces in the i-j-k mesh. More...
 
label nBoundaryFaces () const
 The number of boundary faces in the i-j-k mesh. More...
 
label nBoundaryFaces (const direction shapeFacei) const
 The number of boundary faces on the box face. More...
 
label cellLabel (const label i, const label j, const label k) const
 The linear cell index for an i-j-k position - same as index() More...
 
label cellLabel (const labelVector &ijk) const
 The linear cell index for an i-j-k position - same as index() More...
 
label pointLabel (const label i, const label j, const label k) const
 The linear point index for an i-j-k position. More...
 
label pointLabel (const labelVector &ijk) const
 The linear point index for an i-j-k position. More...
 
hexCell vertLabels (const label i, const label j, const label k) const
 The hex cell vertices for an i-j-k position. More...
 
hexCell vertLabels (const labelVector &ijk) const
 The hex cell vertices for an i-j-k position. More...
 
- Public Member Functions inherited from ijkAddressing
 ijkAddressing ()
 Construct zero-size addressing. More...
 
 ijkAddressing (const labelVector &ijk)
 Construct with addressing. More...
 
 ijkAddressing (const label ni, const label nj, const label nk)
 Construct with addressing components. More...
 
bool empty () const
 Addressing is considered empty if any component is zero. More...
 
const labelVectorsizes () const
 The (i,j,k) addressing dimensions. More...
 
labelVectorsizes ()
 Return the (i,j,k) dimensions for modification. More...
 
label size () const
 Return the total i*j*k size. More...
 
const label & size (const vector::components cmpt) const
 The addressing dimension in the given direction. More...
 
void clear ()
 Reset to (0,0,0) sizing. More...
 
void reset (const label ni, const label nj, const label nk)
 Change the sizing parameters. More...
 
void reset (const labelVector &newSizes)
 Change the sizing parameters. More...
 
label index (const label i, const label j, const label k) const
 Linear addressing index (offset) for an (i,j,k) position. More...
 
label index (const labelVector &ijk) const
 Linear addressing index (offset) for an (i,j,k) position. More...
 
labelVector index (const label idx) const
 The (i,j,k) indexing from linear addressing. More...
 
void checkIndex (const label i, const label j, const label k, const bool allowExtra=false) const
 Check indices are within ni,nj,nk range. More...
 
void checkIndex (const labelVector &ijk, const bool allowExtra=false) const
 Check indices are within ni,nj,nk range. More...
 
void checkSizes () const
 Check that all components of sizes() are non-negative. More...
 
void checkSizes (const labelVector &other) const
 Check that all components of sizes() match. More...
 
void checkSizes (const label nTotal) const
 Check that the total size matches. More...
 

Static Public Member Functions

static autoPtr< blockNew (const dictionary &dict, const label index, const pointField &points, const blockEdgeList &edges, const blockFaceList &faces, Istream &)
 New function which constructs and returns pointer to a block. More...
 
- Static Public Member Functions inherited from blockDescriptor
static void write (Ostream &, const label blocki, const dictionary &)
 Write block index with dictionary lookup. More...
 

Detailed Description

Creates a single block of cells from point coordinates, numbers of cells in each direction and an expansion ratio.

Note
The cells for filling the block are demand-driven.
Source files

Definition at line 58 of file block.H.

Constructor & Destructor Documentation

◆ block() [1/3]

block ( const cellShape bshape,
const pointField vertices,
const blockEdgeList edges,
const blockFaceList faces,
const labelVector density,
const UList< gradingDescriptors > &  expand = UList<gradingDescriptors>::null(),
const word zoneName = "" 
)

Construct from components. Optional zone name.

Definition at line 42 of file block.C.

◆ block() [2/3]

block ( const dictionary dict,
const label  index,
const pointField vertices,
const blockEdgeList edges,
const blockFaceList faces,
Istream is 
)

Construct from components with Istream.

Definition at line 64 of file block.C.

◆ block() [3/3]

block ( const blockDescriptor blockDesc)

Construct from a block definition.

Definition at line 84 of file block.C.

◆ ~block()

virtual ~block ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "block"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
block  ,
Istream  ,
(const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &edges, const blockFaceList &faces, Istream &is)  ,
(dict, index, vertices, edges, faces, is)   
)

◆ clone()

autoPtr<block> clone ( ) const
inline

Clone.

Definition at line 157 of file block.H.

References NotImplemented.

◆ New()

Foam::autoPtr< Foam::block > New ( const dictionary dict,
const label  index,
const pointField points,
const blockEdgeList edges,
const blockFaceList faces,
Istream is 
)
static

New function which constructs and returns pointer to a block.

Definition at line 100 of file block.C.

References DebugInFunction, dict, Foam::endl(), autoPtr< T >::New(), points, and Istream::putBack().

Referenced by block::iNew::operator()().

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

◆ points()

const Foam::pointField & points ( ) const
inlinenoexcept

The points for filling the block.

Definition at line 31 of file blockI.H.

◆ cells()

const Foam::List< Foam::hexCell > & cells ( ) const
inline

The hex cells for filling the block.

Definition at line 37 of file blockI.H.

◆ boundaryPatches()

const Foam::FixedList< Foam::List< Foam::FixedList< Foam::label, 4 > >, 6 > & boundaryPatches ( ) const
inlinenoexcept

The boundary patch faces for the block.

Definition at line 49 of file blockI.H.

◆ shapes()

Foam::cellShapeList shapes ( ) const

The (hex) cell shapes for filling the block.

Definition at line 556 of file blockCreate.C.

References k.


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