|
NeoN
A framework for CFD software
|
Represents boundaries of an unstructured mesh. More...
#include <boundaryMesh.hpp>
Public Member Functions | |
| void | validate () const |
| BoundaryMesh (const Executor &exec, labelVector faceOwners, vectorVector faceCenters, vectorVector ownerCellCenters, vectorVector faceNormals, scalarVector faceAreas, vectorVector faceUnitNormals, vectorVector delta, scalarVector weights, scalarVector deltaCoeffs, std::vector< localIdx > offset, localIdx procBoundaryPatches, std::vector< localIdx > neighbourRank) | |
| Constructor for the BoundaryMesh class. | |
| const labelVector & | faceOwners () const |
| Get the list of labels of owner cells of boundary faces. | |
| View< const label > | faceOwners (const localIdx i) const |
| Get a view of labels of owner cells for a specific boundary face. | |
| const vectorVector & | faceCenters () const |
| Get the field of face centers. | |
| View< const Vec3 > | faceCenters (const localIdx i) const |
| Get a view of face centers for a specific boundary face. | |
| const vectorVector & | ownerCellCenters () const |
| Get the field of centers of owner cells of boundary faces. | |
| View< const Vec3 > | ownerCellCenters (const localIdx i) const |
| Get a view of owner cell centers for a specific boundary face. | |
| const vectorVector & | faceNormals () const |
| Get the field of face areas normals. | |
| View< const Vec3 > | faceNormals (const localIdx i) const |
| Get a view of face areas normals for a specific boundary face. | |
| const scalarVector & | faceAreas () const |
| Get the field of face areas. | |
| View< const scalar > | faceAreas (const localIdx i) const |
| Get a view of face areas for a specific boundary face. | |
| const vectorVector & | faceUnitNormals () const |
| Get the field of face unit normal vectors. | |
| View< const Vec3 > | faceUnitNormals (const localIdx i) const |
| Get a view of face unit normal vectors for a specific boundary face. | |
| const vectorVector & | delta () const |
| Get the field of delta vectors. | |
| View< const Vec3 > | delta (const localIdx i) const |
| Get a view of delta vectors for a specific boundary face. | |
| const scalarVector & | weights () const |
| Get the field of weights. | |
| View< const scalar > | weights (const localIdx i) const |
| Get a view of weights for a specific boundary face. | |
| const scalarVector & | deltaCoeffs () const |
| Get the field of delta coefficients. | |
| View< const scalar > | deltaCoeffs (const localIdx i) const |
| Get a view of delta coefficients for a specific boundary face. | |
| localIdx | neighbourRank (const localIdx i) const |
| Given a patchId the corresponding neighbour Rank gets returned. | |
| const std::vector< localIdx > & | offset () const |
| Get the offset of the boundary faces. | |
| localIdx | nProcBoundaryPatches () const |
| number of proc boundary patches | |
| const std::vector< localIdx > & | neighbourRank () const |
| Get the offset of the boundary faces. | |
| localIdx | neighbourRankForRange (std::pair< localIdx, localIdx > range) const |
| Returns the neighbour rank for the processor patch whose face range matches the given range. | |
| localIdx | nBoundaries () const |
| Get the number of the boundaries. | |
| const Vector< localIdx > & | getRowOrderWriteIndex () const |
| const std::vector< localIdx > & | getRowSortPerm () const |
| localIdx | nBoundaryFaces () const |
| Get the number of the boundary faces. | |
| localIdx | nProcBoundaryFaces () const |
| Get the number of the processor boundary faces. | |
| bool | isDistributed () const |
| Return whether this local mesh is a part of a global distributed mesh. | |
Represents boundaries of an unstructured mesh.
The BoundaryMesh class stores information about the boundary faces and their properties in an unstructured mesh. It provides access to various fields such as face cells, face centers, face normals, face areas normals, magnitudes of face areas normals, delta vectors, weights, delta coefficients, and offsets.
Boundary faces are organised such that regular boundaries are stored first, followed by the processor boundaries.
The class also provides getter methods to access the individual fields and their components.
| Executor | The type of the executor used for computations. |
Definition at line 32 of file boundaryMesh.hpp.
| NeoN::BoundaryMesh::BoundaryMesh | ( | const Executor & | exec, |
| labelVector | faceOwners, | ||
| vectorVector | faceCenters, | ||
| vectorVector | ownerCellCenters, | ||
| vectorVector | faceNormals, | ||
| scalarVector | faceAreas, | ||
| vectorVector | faceUnitNormals, | ||
| vectorVector | delta, | ||
| scalarVector | weights, | ||
| scalarVector | deltaCoeffs, | ||
| std::vector< localIdx > | offset, | ||
| localIdx | procBoundaryPatches, | ||
| std::vector< localIdx > | neighbourRank | ||
| ) |
Constructor for the BoundaryMesh class.
| exec | The executor used for computations. |
| faceOwners | A list of labels of owner cells of boundary faces. |
| faceCenters | A field of face centers. |
| ownerCellCenters | A field of centers of owner cells of boundary faces. |
| faceNormals | A field of face normal vectors. |
| faceAreas | A field of face areas. |
| faceUnitNormals | A field of face unit normal vectors. |
| delta | A field of delta vectors. |
| weights | A field of weights used in cell to face interpolation. |
| deltaCoeffs | A field of the inverse of distances between boundary faces and their neighboring cell centers |
| offset | The offsets of the boundary faces, i.e. offset[i], offset[i+1] define beginning and end of a patch. |
| neighbourRank | corresponding mpiRank ouf neighbour |
| const vectorVector & NeoN::BoundaryMesh::delta | ( | ) | const |
Get the field of delta vectors.
Get a view of delta vectors for a specific boundary face.
| i | The index of the boundary face. |
| const scalarVector & NeoN::BoundaryMesh::deltaCoeffs | ( | ) | const |
Get the field of delta coefficients.
Get a view of delta coefficients for a specific boundary face.
| i | The index of the boundary face. |
| const scalarVector & NeoN::BoundaryMesh::faceAreas | ( | ) | const |
Get the field of face areas.
Get a view of face areas for a specific boundary face.
| i | The index of the boundary face. |
| const vectorVector & NeoN::BoundaryMesh::faceCenters | ( | ) | const |
Get the field of face centers.
Get a view of face centers for a specific boundary face.
| i | The index of the boundary face. |
| const vectorVector & NeoN::BoundaryMesh::faceNormals | ( | ) | const |
Get the field of face areas normals.
Get a view of face areas normals for a specific boundary face.
| i | The index of the boundary face. |
| const labelVector & NeoN::BoundaryMesh::faceOwners | ( | ) | const |
Get the list of labels of owner cells of boundary faces.
Get a view of labels of owner cells for a specific boundary face.
| i | The index of the boundary face. |
| const vectorVector & NeoN::BoundaryMesh::faceUnitNormals | ( | ) | const |
Get the field of face unit normal vectors.
Get a view of face unit normal vectors for a specific boundary face.
| i | The index of the boundary face. |
| const std::vector< localIdx > & NeoN::BoundaryMesh::getRowSortPerm | ( | ) | const |
|
inline |
Return whether this local mesh is a part of a global distributed mesh.
Definition at line 267 of file boundaryMesh.hpp.
|
inline |
Get the number of the boundaries.
Definition at line 247 of file boundaryMesh.hpp.
|
inline |
Get the number of the boundary faces.
Definition at line 257 of file boundaryMesh.hpp.
| const std::vector< localIdx > & NeoN::BoundaryMesh::neighbourRank | ( | ) | const |
Get the offset of the boundary faces.
Given a patchId the corresponding neighbour Rank gets returned.
-1 for patches without a distributed neighbour
Returns the neighbour rank for the processor patch whose face range matches the given range.
| range | The [start, end) face index range of the processor patch. |
| localIdx NeoN::BoundaryMesh::nProcBoundaryFaces | ( | ) | const |
Get the number of the processor boundary faces.
| localIdx NeoN::BoundaryMesh::nProcBoundaryPatches | ( | ) | const |
number of proc boundary patches
| const std::vector< localIdx > & NeoN::BoundaryMesh::offset | ( | ) | const |
Get the offset of the boundary faces.
| const vectorVector & NeoN::BoundaryMesh::ownerCellCenters | ( | ) | const |
Get the field of centers of owner cells of boundary faces.
Get a view of owner cell centers for a specific boundary face.
| i | The index of the boundary face. |
| void NeoN::BoundaryMesh::validate | ( | ) | const |
| const scalarVector & NeoN::BoundaryMesh::weights | ( | ) | const |
Get the field of weights.
Get a view of weights for a specific boundary face.
| i | The index of the boundary face. |