All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
blockDescriptor Class Reference

Takes the description of the block and the list of curved edges and creates a list of points on edges together with the weighting factors. More...

Inheritance diagram for blockDescriptor:

Public Member Functions

 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 void write (Ostream &, const label blocki, const dictionary &)
 Write block index with dictionary lookup. More...
 

Friends

Ostreamoperator<< (Ostream &, const blockDescriptor &)
 

Detailed Description

Takes the description of the block and the list of curved edges and creates a list of points on edges together with the weighting factors.

For a given block, the correspondence between the ordering of vertex labels and face labels is shown below. For vertex numbering in the sequence 0 to 7 (block, centre): faces 0 (f0) and 1 are left and right, respectively; faces 2 and 3 are front and back; and faces 4 and 5 are bottom and top:

               7 ---- 6
          f5   |\     |\   f3
           |   | 4 ---- 5    \
           |   3 |--- 2 |     \
           |    \|     \|      f2
          f4     0 ---- 1

     Z         f0 ----- f1
     |  Y
     | /
     O --- X
Source files

Definition at line 80 of file blockDescriptor.H.

Constructor & Destructor Documentation

◆ blockDescriptor() [1/2]

blockDescriptor ( const cellShape bshape,
const pointField vertices,
const blockEdgeList edges,
const blockFaceList faces,
const Vector< label > &  density,
const UList< gradingDescriptors > &  expand,
const word zoneName = "" 
)

Construct from components. Optional cellSet/zone name.

Definition at line 152 of file blockDescriptor.C.

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

Here is the call graph for this function:

◆ blockDescriptor() [2/2]

Member Function Documentation

◆ vertices()

const Foam::pointField & vertices ( ) const
inline

Reference to point field defining the block mesh.

Definition at line 28 of file blockDescriptorI.H.

Referenced by projectFace::project().

Here is the caller graph for this function:

◆ faces()

const Foam::blockFaceList & faces ( ) const
inline

Return reference to the list of curved faces.

Definition at line 34 of file blockDescriptorI.H.

Referenced by block::New().

Here is the caller graph for this function:

◆ blockShape()

const Foam::cellShape & blockShape ( ) const
inline

Return the block shape.

Definition at line 40 of file blockDescriptorI.H.

Referenced by Foam::operator<<(), and projectFace::project().

Here is the caller graph for this function:

◆ density()

const Foam::Vector< Foam::label > & density ( ) const
inline

Return the mesh density (number of cells) in the i,j,k directions.

Definition at line 46 of file blockDescriptorI.H.

Referenced by block::cells(), Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), Foam::operator<<(), and projectFace::project().

Here is the caller graph for this function:

◆ zoneName()

const Foam::word & zoneName ( ) const
inline

Return the (optional) zone name.

Definition at line 52 of file blockDescriptorI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nPoints()

Foam::label nPoints ( ) const
inline

Return the number of points.

Definition at line 58 of file blockDescriptorI.H.

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

Here is the call graph for this function:

◆ nCells()

Foam::label nCells ( ) const
inline

Return the number of cells.

Definition at line 69 of file blockDescriptorI.H.

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

Referenced by block::cells().

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

◆ curvedFaces()

const Foam::FixedList< Foam::label, 6 > & curvedFaces ( ) const
inline

Curved-face labels for each block-face (-1 for flat faces)

Definition at line 81 of file blockDescriptorI.H.

◆ nCurvedFaces()

Foam::label nCurvedFaces ( ) const
inline

Number of curved faces in this block.

Definition at line 87 of file blockDescriptorI.H.

◆ blockPoint()

const Foam::point & blockPoint ( const label  i) const
inline

Return block point for local label i.

Definition at line 93 of file blockDescriptorI.H.

References blockDescriptor::pointLabel().

Here is the call graph for this function:

◆ pointLabel()

Foam::label pointLabel ( const label  i,
const label  j,
const label  k 
) const
inline

Vertex label offset for a particular i,j,k position.

Definition at line 100 of file blockDescriptorI.H.

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

Referenced by blockDescriptor::blockPoint(), block::cells(), Foam::facePoint(), Foam::facePointN(), and blockDescriptor::facePoints().

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

◆ facePointLabel()

Foam::label facePointLabel ( const label  facei,
const label  i,
const label  j 
) const
inline

Face vertex label offset for a particular i,j,k position.

Definition at line 116 of file blockDescriptorI.H.

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

Referenced by blockDescriptor::facePoints(), and blockDescriptor::pointLabel().

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

◆ vertex()

bool vertex ( const label  i,
const label  j,
const label  k 
) const
inline

Return true if point i,j,k addresses a block vertex.

Definition at line 150 of file blockDescriptorI.H.

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

Referenced by blockDescriptor::facePointLabel().

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

◆ edge()

bool edge ( const label  i,
const label  j,
const label  k 
) const
inline

Return true if point i,j,k addresses a block edge.

Definition at line 163 of file blockDescriptorI.H.

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

Referenced by blockDescriptor::vertex().

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

◆ edgesPointsWeights()

Foam::label edgesPointsWeights ( pointField(&)  edgePoints[12],
scalarList(&)  edgeWeights[12] 
) const

Calculate the points and weights for all edges.

Return the number of curved edges

Definition at line 114 of file blockDescriptorEdges.C.

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

Here is the call graph for this function:

◆ flatFaceOrEdge()

bool flatFaceOrEdge ( const label  i,
const label  j,
const label  k 
) const
inline

Return true if point i,j,k addresses a block flat face or edge.

Definition at line 176 of file blockDescriptorI.H.

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

Referenced by blockDescriptor::edge().

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

◆ facePoints()

Foam::FixedList< Foam::pointField, 6 > facePoints ( const pointField points) const

Return the list of face-points for all of the faces of the block.

Definition at line 308 of file blockDescriptor.C.

References blockDescriptor::correctFacePoints(), blockDescriptor::facePointLabel(), k, blockDescriptor::pointLabel(), FixedList< T, Size >::setSize(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ correctFacePoints()

Foam::label correctFacePoints ( FixedList< pointField, 6 > &  facePoints) const

Correct the location of the given face-points.

to lie on the faces of the block

Definition at line 365 of file blockDescriptor.C.

References forAll, and blockDescriptor::write().

Referenced by Foam::faceCorr(), and blockDescriptor::facePoints().

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

◆ write()

void write ( Ostream os,
const label  blocki,
const dictionary d 
)
static

Write block index with dictionary lookup.

Definition at line 385 of file blockDescriptor.C.

References dictionary::subDictPtr(), and Foam::blockMeshTools::write().

Referenced by blockDescriptor::correctFacePoints().

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

◆ operator=()

void operator= ( const blockDescriptor )
delete

Disallow default bitwise assignment.

Friends And Related Function Documentation

◆ operator<<

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

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