NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoN::BoundaryMesh Class Reference

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 labelVectorfaceOwners () const
 Get the list of labels of owner cells of boundary faces.
 
View< const labelfaceOwners (const localIdx i) const
 Get a view of labels of owner cells for a specific boundary face.
 
const vectorVectorfaceCenters () const
 Get the field of face centers.
 
View< const Vec3faceCenters (const localIdx i) const
 Get a view of face centers for a specific boundary face.
 
const vectorVectorownerCellCenters () const
 Get the field of centers of owner cells of boundary faces.
 
View< const Vec3ownerCellCenters (const localIdx i) const
 Get a view of owner cell centers for a specific boundary face.
 
const vectorVectorfaceNormals () const
 Get the field of face areas normals.
 
View< const Vec3faceNormals (const localIdx i) const
 Get a view of face areas normals for a specific boundary face.
 
const scalarVectorfaceAreas () const
 Get the field of face areas.
 
View< const scalarfaceAreas (const localIdx i) const
 Get a view of face areas for a specific boundary face.
 
const vectorVectorfaceUnitNormals () const
 Get the field of face unit normal vectors.
 
View< const Vec3faceUnitNormals (const localIdx i) const
 Get a view of face unit normal vectors for a specific boundary face.
 
const vectorVectordelta () const
 Get the field of delta vectors.
 
View< const Vec3delta (const localIdx i) const
 Get a view of delta vectors for a specific boundary face.
 
const scalarVectorweights () const
 Get the field of weights.
 
View< const scalarweights (const localIdx i) const
 Get a view of weights for a specific boundary face.
 
const scalarVectordeltaCoeffs () const
 Get the field of delta coefficients.
 
View< const scalardeltaCoeffs (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.
 

Detailed Description

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.

Template Parameters
ExecutorThe type of the executor used for computations.

Definition at line 32 of file boundaryMesh.hpp.

Constructor & Destructor Documentation

◆ BoundaryMesh()

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.

Parameters
execThe executor used for computations.
faceOwnersA list of labels of owner cells of boundary faces.
faceCentersA field of face centers.
ownerCellCentersA field of centers of owner cells of boundary faces.
faceNormalsA field of face normal vectors.
faceAreasA field of face areas.
faceUnitNormalsA field of face unit normal vectors.
deltaA field of delta vectors.
weightsA field of weights used in cell to face interpolation.
deltaCoeffsA field of the inverse of distances between boundary faces and their neighboring cell centers
offsetThe offsets of the boundary faces, i.e. offset[i], offset[i+1] define beginning and end of a patch.
neighbourRankcorresponding mpiRank ouf neighbour

Member Function Documentation

◆ delta() [1/2]

const vectorVector & NeoN::BoundaryMesh::delta ( ) const

Get the field of delta vectors.

Returns
A constant reference to the field of delta vectors.

◆ delta() [2/2]

View< const Vec3 > NeoN::BoundaryMesh::delta ( const localIdx  i) const

Get a view of delta vectors for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of delta vectors for the specified boundary face.

◆ deltaCoeffs() [1/2]

const scalarVector & NeoN::BoundaryMesh::deltaCoeffs ( ) const

Get the field of delta coefficients.

Returns
A constant reference to the field of delta coefficients.

◆ deltaCoeffs() [2/2]

View< const scalar > NeoN::BoundaryMesh::deltaCoeffs ( const localIdx  i) const

Get a view of delta coefficients for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of delta coefficients for the specified boundary face.

◆ faceAreas() [1/2]

const scalarVector & NeoN::BoundaryMesh::faceAreas ( ) const

Get the field of face areas.

Returns
A constant reference to the field of face areas.

◆ faceAreas() [2/2]

View< const scalar > NeoN::BoundaryMesh::faceAreas ( const localIdx  i) const

Get a view of face areas for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of face areas for the specified boundary face.

◆ faceCenters() [1/2]

const vectorVector & NeoN::BoundaryMesh::faceCenters ( ) const

Get the field of face centers.

Returns
A constant reference to the field of face centers.

◆ faceCenters() [2/2]

View< const Vec3 > NeoN::BoundaryMesh::faceCenters ( const localIdx  i) const

Get a view of face centers for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of face centers for the specified boundary face.

◆ faceNormals() [1/2]

const vectorVector & NeoN::BoundaryMesh::faceNormals ( ) const

Get the field of face areas normals.

Returns
A constant reference to the field of face areas normals.

◆ faceNormals() [2/2]

View< const Vec3 > NeoN::BoundaryMesh::faceNormals ( const localIdx  i) const

Get a view of face areas normals for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of face areas normals for the specified boundary face.

◆ faceOwners() [1/2]

const labelVector & NeoN::BoundaryMesh::faceOwners ( ) const

Get the list of labels of owner cells of boundary faces.

Returns
A constant reference to the field of owner cells.

◆ faceOwners() [2/2]

View< const label > NeoN::BoundaryMesh::faceOwners ( const localIdx  i) const

Get a view of labels of owner cells for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of labels of owner cells for the specified boundary face.

◆ faceUnitNormals() [1/2]

const vectorVector & NeoN::BoundaryMesh::faceUnitNormals ( ) const

Get the field of face unit normal vectors.

Returns
A constant reference to the field of face unit normal vectors.

◆ faceUnitNormals() [2/2]

View< const Vec3 > NeoN::BoundaryMesh::faceUnitNormals ( const localIdx  i) const

Get a view of face unit normal vectors for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of face unit normal vectors for the specified boundary face.

◆ getRowOrderWriteIndex()

const Vector< localIdx > & NeoN::BoundaryMesh::getRowOrderWriteIndex ( ) const

◆ getRowSortPerm()

const std::vector< localIdx > & NeoN::BoundaryMesh::getRowSortPerm ( ) const

◆ isDistributed()

bool NeoN::BoundaryMesh::isDistributed ( ) const
inline

Return whether this local mesh is a part of a global distributed mesh.

Definition at line 267 of file boundaryMesh.hpp.

◆ nBoundaries()

localIdx NeoN::BoundaryMesh::nBoundaries ( ) const
inline

Get the number of the boundaries.

Definition at line 247 of file boundaryMesh.hpp.

◆ nBoundaryFaces()

localIdx NeoN::BoundaryMesh::nBoundaryFaces ( ) const
inline

Get the number of the boundary faces.

Definition at line 257 of file boundaryMesh.hpp.

◆ neighbourRank() [1/2]

const std::vector< localIdx > & NeoN::BoundaryMesh::neighbourRank ( ) const

Get the offset of the boundary faces.

Returns
A constant reference to the offset of the boundary faces.

◆ neighbourRank() [2/2]

localIdx NeoN::BoundaryMesh::neighbourRank ( const localIdx  i) const

Given a patchId the corresponding neighbour Rank gets returned.

-1 for patches without a distributed neighbour

◆ neighbourRankForRange()

localIdx NeoN::BoundaryMesh::neighbourRankForRange ( std::pair< localIdx, localIdx range) const

Returns the neighbour rank for the processor patch whose face range matches the given range.

Parameters
rangeThe [start, end) face index range of the processor patch.
Returns
The MPI rank of the neighbour for that patch.

◆ nProcBoundaryFaces()

localIdx NeoN::BoundaryMesh::nProcBoundaryFaces ( ) const

Get the number of the processor boundary faces.

◆ nProcBoundaryPatches()

localIdx NeoN::BoundaryMesh::nProcBoundaryPatches ( ) const

number of proc boundary patches

◆ offset()

const std::vector< localIdx > & NeoN::BoundaryMesh::offset ( ) const

Get the offset of the boundary faces.

Returns
A constant reference to the offset of the boundary faces.

◆ ownerCellCenters() [1/2]

const vectorVector & NeoN::BoundaryMesh::ownerCellCenters ( ) const

Get the field of centers of owner cells of boundary faces.

Returns
A constant reference to the field of owner cell centers.

◆ ownerCellCenters() [2/2]

View< const Vec3 > NeoN::BoundaryMesh::ownerCellCenters ( const localIdx  i) const

Get a view of owner cell centers for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of owner cell centers for the specified boundary face.

◆ validate()

void NeoN::BoundaryMesh::validate ( ) const

◆ weights() [1/2]

const scalarVector & NeoN::BoundaryMesh::weights ( ) const

Get the field of weights.

Returns
A constant reference to the boundary field of weights.

◆ weights() [2/2]

View< const scalar > NeoN::BoundaryMesh::weights ( const localIdx  i) const

Get a view of weights for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A view of weights for the specified boundary face.

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