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...
Public Member Functions | |
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 pointField & | vertices () const noexcept |
Reference to point field defining the block mesh. More... | |
const blockFaceList & | blockFaces () const noexcept |
Return reference to the list of curved faces. More... | |
const cellShape & | blockShape () const noexcept |
Return the block shape. More... | |
const labelVector & | density () 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 word & | zoneName () 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 point & | blockPoint (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< blockDescriptor > | info () const |
Return info proxy. More... | |
![]() | |
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... | |
![]() | |
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 labelVector & | sizes () const |
The (i,j,k) addressing dimensions. More... | |
labelVector & | sizes () |
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 void | write (Ostream &, const label blocki, const dictionary &) |
Write block index with dictionary lookup. More... | |
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 Y Z \ | f0 ------ f1 \| o--- X
Definition at line 78 of file blockDescriptor.H.
|
default |
Copy construct.
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.
Definition at line 197 of file blockDescriptor.C.
References Foam::exit(), Foam::stringOps::expand(), Foam::FatalError, and FatalErrorInFunction.
blockDescriptor | ( | const dictionary & | dict, |
const label | blockIndex, | ||
const pointField & | vertices, | ||
const blockEdgeList & | edges, | ||
const blockFaceList & | faces, | ||
Istream & | is | ||
) |
Construct from Istream.
Definition at line 230 of file blockDescriptor.C.
References token::BEGIN_LIST, Foam::check(), dict, Foam::endl(), Foam::exit(), Foam::stringOps::expand(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, token::info(), IOWarningInFunction, token::isPunctuation(), token::isWord(), token::pToken(), Istream::putBack(), ijkAddressing::sizes(), dictionary::subOrEmptyDict(), token::wordToken(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
|
delete |
No copy assignment.
|
inlinenoexcept |
Reference to point field defining the block mesh.
Definition at line 32 of file blockDescriptorI.H.
Referenced by projectFace::project().
|
inlinenoexcept |
Return reference to the list of curved faces.
Definition at line 39 of file blockDescriptorI.H.
|
inlinenoexcept |
Return the block shape.
Definition at line 46 of file blockDescriptorI.H.
Referenced by Foam::operator<<(), and projectFace::project().
|
inlinenoexcept |
The mesh density (number of cells) in the i,j,k directions.
Definition at line 53 of file blockDescriptorI.H.
References ijkAddressing::sizes().
Referenced by Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), Foam::operator<<(), and projectFace::project().
|
inlinenoexcept |
Expansion ratios in all directions.
Definition at line 60 of file blockDescriptorI.H.
Referenced by Foam::operator<<().
|
inlinenoexcept |
Return the (optional) zone name.
Definition at line 66 of file blockDescriptorI.H.
Referenced by Foam::operator<<().
|
inlinenoexcept |
Curved-face labels for each block-face (-1 for flat faces)
Definition at line 73 of file blockDescriptorI.H.
|
inlinenoexcept |
Number of curved faces in this block.
Definition at line 79 of file blockDescriptorI.H.
|
inline |
Return block point for local label i.
Definition at line 85 of file blockDescriptorI.H.
|
inline |
Face vertex label offset for a particular i,j,k position on hex face (0-5)
Definition at line 92 of file blockDescriptorI.H.
|
inline |
True if point i,j,k addresses a block vertex.
Definition at line 129 of file blockDescriptorI.H.
References k.
True if point i,j,k addresses a block edge.
Definition at line 142 of file blockDescriptorI.H.
References k.
int edgesPointsWeights | ( | pointField(&) | edgesPoints[12], |
scalarList(&) | edgesWeights[12] | ||
) | const |
Calculate the points and weights for all edges.
Definition at line 129 of file blockDescriptorEdges.C.
References hexCell::modelEdges().
bool edgePointsWeights | ( | const label | edgei, |
pointField & | edgePoints, | ||
scalarList & | edgeWeights, | ||
const label | nDiv, | ||
const gradingDescriptors & | gd = gradingDescriptors() |
||
) | const |
Calculate points and weights for specified edge, using the specified number of divisions and grading
Definition at line 154 of file blockDescriptorEdges.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and hexCell::modelEdges().
bool edgePointsWeights | ( | const label | edgei, |
pointField & | edgePoints, | ||
scalarList & | edgeWeights | ||
) | const |
Calculate points and weights for specified edge.
Definition at line 185 of file blockDescriptorEdges.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and hexCell::modelEdges().
|
inline |
Return true if point i,j,k addresses a block flat face or edge.
Definition at line 155 of file blockDescriptorI.H.
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 326 of file blockDescriptor.C.
References k, points, and FixedList< T, N >::setSize().
void 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 382 of file blockDescriptor.C.
References forAll.
|
static |
Write block index with dictionary lookup.
Definition at line 402 of file blockDescriptor.C.
References dictionary::findDict(), os(), and Foam::blockMeshTools::write().
|
inline |
Return info proxy.
Definition at line 264 of file blockDescriptor.H.