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...
 
 blockDescriptor (const blockDescriptor &)=default
 Copy construct. 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/3]

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 151 of file blockDescriptor.C.

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

Here is the call graph for this function:

◆ blockDescriptor() [2/3]

◆ blockDescriptor() [3/3]

blockDescriptor ( const blockDescriptor )
default

Copy construct.

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.

◆ 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 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.

◆ nCells()

Foam::label nCells ( ) const
inline

Return the number of cells.

Definition at line 69 of file blockDescriptorI.H.

◆ 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.

◆ 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 99 of file blockDescriptorI.H.

References k.

Referenced by Foam::facePoint(), and Foam::facePointN().

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 115 of file blockDescriptorI.H.

◆ 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 149 of file blockDescriptorI.H.

References k.

◆ 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 162 of file blockDescriptorI.H.

References k.

◆ 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 113 of file blockDescriptorEdges.C.

◆ 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 175 of file blockDescriptorI.H.

References k.

◆ 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 k, points, and FixedList< T, Size >::setSize().

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 364 of file blockDescriptor.C.

References forAll.

◆ write()

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

Write block index with dictionary lookup.

Definition at line 384 of file blockDescriptor.C.

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

Here is the call 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: