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:
Collaboration diagram for block:

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 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 &)
 Construct from a block definition. More...
 
 block (const block &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< blockclone () const
 Clone. More...
 
virtual ~block ()
 Destructor. More...
 
const pointFieldpoints () const
 Return the points for filling the block. More...
 
List< FixedList< label, 8 > > cells () const
 Return the cells for filling the block. More...
 
const FixedList< List< FixedList< label, 4 > >, 6 > & boundaryPatches () const
 Return the boundary patch faces for the block. More...
 
void operator= (const block &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from blockDescriptor
 blockDescriptor (const cellShape &, const pointField &vertices, const blockEdgeList &, const blockFaceList &, const Vector< label > &density, const UList< gradingDescriptors > &expand, const word &zoneName="")
 Construct from components. Optional cellSet/zone name. More...
 
 blockDescriptor (const dictionary &dict, const label index, const pointField &vertices, const blockEdgeList &, const blockFaceList &, Istream &)
 Construct from Istream. More...
 
const pointFieldvertices () const
 Reference to point field defining the block mesh. More...
 
const blockFaceListfaces () const
 Return reference to the list of curved faces. More...
 
const cellShapeblockShape () const
 Return the block shape. More...
 
const Vector< label > & density () const
 Return the mesh density (number of cells) in the i,j,k directions. More...
 
const wordzoneName () const
 Return the (optional) zone name. More...
 
label nPoints () const
 Return the number of points. More...
 
label nCells () const
 Return the number of cells. More...
 
const FixedList< label, 6 > & curvedFaces () const
 Curved-face labels for each block-face (-1 for flat faces) More...
 
label nCurvedFaces () const
 Number of curved faces in this block. More...
 
const pointblockPoint (const label i) const
 Return block point for local label i. More...
 
label pointLabel (const label i, const label j, const label k) const
 Vertex label offset for a particular i,j,k position. More...
 
label facePointLabel (const label facei, const label i, const label j) const
 Face vertex label offset for a particular i,j,k position. More...
 
bool vertex (const label i, const label j, const label k) const
 Return true if point i,j,k addresses a block vertex. More...
 
bool edge (const label i, const label j, const label k) const
 Return true if point i,j,k addresses a block edge. More...
 
label edgesPointsWeights (pointField(&edgePoints)[12], scalarList(&edgeWeights)[12]) const
 Calculate the points and weights for all edges. 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...
 
void operator= (const blockDescriptor &)=delete
 Disallow default bitwise assignment. 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...
 

Friends

Ostreamoperator<< (Ostream &, const block &)
 

Detailed Description

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

Note: The vertices and cells for filling the block are demand-driven.

Source files

Definition at line 63 of file block.H.

Constructor & Destructor Documentation

◆ block() [1/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 39 of file block.C.

Referenced by block::New().

Here is the caller graph for this function:

◆ block() [2/3]

block ( const blockDescriptor blockDesc)

Construct from a block definition.

Definition at line 55 of file block.C.

References block::New().

Here is the call graph for this function:

◆ block() [3/3]

block ( const block )
delete

Disallow default bitwise copy construction.

◆ ~block()

virtual ~block ( )
inlinevirtual

Destructor.

Definition at line 182 of file block.H.

References block::boundaryPatches(), block::cells(), block::operator<<, block::operator=(), and block::points().

Here is the call graph for this function:

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 130 of file block.H.

References block::iNew::iNew(), block::New(), NotImplemented, and block::points().

Here is the call graph for this function:

◆ 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 65 of file block.C.

References block::block(), dict, Foam::endl(), blockDescriptor::faces(), InfoInFunction, block::points(), and Istream::putBack().

Referenced by block::block(), block::clone(), and 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
inline

Return the points for filling the block.

Definition at line 28 of file blockI.H.

Referenced by block::clone(), block::New(), Foam::operator<<(), and block::~block().

Here is the caller graph for this function:

◆ cells()

Foam::List< Foam::FixedList< Foam::label, 8 > > cells ( ) const

Return the cells for filling the block.

Definition at line 349 of file blockCreate.C.

References blockDescriptor::density(), k, blockDescriptor::nCells(), patchi, and blockDescriptor::pointLabel().

Referenced by Foam::operator<<(), and block::~block().

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

◆ boundaryPatches()

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

Return the boundary patch faces for the block.

Definition at line 35 of file blockI.H.

Referenced by Foam::operator<<(), and block::~block().

Here is the caller graph for this function:

◆ operator=()

void operator= ( const block )
delete

Disallow default bitwise assignment.

Referenced by block::~block().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const block  
)
friend

Referenced by block::~block().


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