NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Member Functions | List of all members
NeoFOAM::BoundaryMesh Class Reference

Represents boundaries of an unstructured mesh. More...

#include <boundaryMesh.hpp>

Public Member Functions

 BoundaryMesh (const Executor &exec, labelField faceCells, vectorField cf, vectorField cn, vectorField sf, scalarField magSf, vectorField nf, vectorField delta, scalarField weights, scalarField deltaCoeffs, std::vector< localIdx > offset)
 Constructor for the BoundaryMesh class.
 
const labelFieldfaceCells () const
 Get the field of face cells.
 
std::span< const labelfaceCells (const localIdx i) const
 Get a span of face cells for a specific boundary face.
 
const vectorFieldcf () const
 Get the field of face centres.
 
std::span< const Vectorcf (const localIdx i) const
 Get a span of face centres for a specific boundary face.
 
const vectorFieldcn () const
 Get the field of face normals.
 
std::span< const Vectorcn (const localIdx i) const
 Get a span of face normals for a specific boundary face.
 
const vectorFieldsf () const
 Get the field of face areas normals.
 
std::span< const Vectorsf (const localIdx i) const
 Get a span of face areas normals for a specific boundary face.
 
const scalarFieldmagSf () const
 Get the field of magnitudes of face areas normals.
 
std::span< const scalarmagSf (const localIdx i) const
 Get a span of magnitudes of face areas normals for a specific boundary face.
 
const vectorFieldnf () const
 Get the field of face unit normals.
 
std::span< const Vectornf (const localIdx i) const
 Get a span of face unit normals for a specific boundary face.
 
const vectorFielddelta () const
 Get the field of delta vectors.
 
std::span< const Vectordelta (const localIdx i) const
 Get a span of delta vectors for a specific boundary face.
 
const scalarFieldweights () const
 Get the field of weights.
 
std::span< const scalarweights (const localIdx i) const
 Get a span of weights for a specific boundary face.
 
const scalarFielddeltaCoeffs () const
 Get the field of delta coefficients.
 
std::span< const scalardeltaCoeffs (const localIdx i) const
 Get a span of delta coefficients for a specific boundary face.
 
const std::vector< localIdx > & offset () const
 Get the offset of the boundary faces.
 

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 centres, face normals, face areas normals, magnitudes of face areas normals, delta vectors, weights, delta coefficients, and offsets.

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 27 of file boundaryMesh.hpp.

Constructor & Destructor Documentation

◆ BoundaryMesh()

NeoFOAM::BoundaryMesh::BoundaryMesh ( const Executor exec,
labelField  faceCells,
vectorField  cf,
vectorField  cn,
vectorField  sf,
scalarField  magSf,
vectorField  nf,
vectorField  delta,
scalarField  weights,
scalarField  deltaCoeffs,
std::vector< localIdx offset 
)

Constructor for the BoundaryMesh class.

Parameters
execThe executor used for computations.
faceCellsA field with the neighbouring cell of each boundary face.
CfA field of face centres.
CnA field of neighbor cell centers.
SfA field of face areas normals.
magSfA field of magnitudes of face areas normals.
nfA field of face unit normals.
deltaA field of delta vectors.
weightsA field of weights used in cell to face interpolation.
deltaCoeffsA field of cell to face distances.
offsetThe offset of the boundary faces.

Member Function Documentation

◆ cf() [1/2]

const vectorField & NeoFOAM::BoundaryMesh::cf ( ) const

Get the field of face centres.

Returns
A constant reference to the field of face centres.

◆ cf() [2/2]

std::span< const Vector > NeoFOAM::BoundaryMesh::cf ( const localIdx  i) const

Get a span of face centres for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A span of face centres for the specified boundary face.

◆ cn() [1/2]

const vectorField & NeoFOAM::BoundaryMesh::cn ( ) const

Get the field of face normals.

Returns
A constant reference to the field of face normals.

◆ cn() [2/2]

std::span< const Vector > NeoFOAM::BoundaryMesh::cn ( const localIdx  i) const

Get a span of face normals for a specific boundary face.

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

◆ delta() [1/2]

const vectorField & NeoFOAM::BoundaryMesh::delta ( ) const

Get the field of delta vectors.

Returns
A constant reference to the field of delta vectors.

◆ delta() [2/2]

std::span< const Vector > NeoFOAM::BoundaryMesh::delta ( const localIdx  i) const

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

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

◆ deltaCoeffs() [1/2]

const scalarField & NeoFOAM::BoundaryMesh::deltaCoeffs ( ) const

Get the field of delta coefficients.

Returns
A constant reference to the field of delta coefficients.

◆ deltaCoeffs() [2/2]

std::span< const scalar > NeoFOAM::BoundaryMesh::deltaCoeffs ( const localIdx  i) const

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

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

◆ faceCells() [1/2]

const labelField & NeoFOAM::BoundaryMesh::faceCells ( ) const

Get the field of face cells.

Returns
A constant reference to the field of face cells.

◆ faceCells() [2/2]

std::span< const label > NeoFOAM::BoundaryMesh::faceCells ( const localIdx  i) const

Get a span of face cells for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A span of face cells for the specified boundary face.

◆ magSf() [1/2]

const scalarField & NeoFOAM::BoundaryMesh::magSf ( ) const

Get the field of magnitudes of face areas normals.

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

◆ magSf() [2/2]

std::span< const scalar > NeoFOAM::BoundaryMesh::magSf ( const localIdx  i) const

Get a span of magnitudes of face areas normals for a specific boundary face.

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

◆ nf() [1/2]

const vectorField & NeoFOAM::BoundaryMesh::nf ( ) const

Get the field of face unit normals.

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

◆ nf() [2/2]

std::span< const Vector > NeoFOAM::BoundaryMesh::nf ( const localIdx  i) const

Get a span of face unit normals for a specific boundary face.

Parameters
iThe index of the boundary face.
Returns
A span of face unit normals for the specified boundary face.

◆ offset()

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

Get the offset of the boundary faces.

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

◆ sf() [1/2]

const vectorField & NeoFOAM::BoundaryMesh::sf ( ) const

Get the field of face areas normals.

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

◆ sf() [2/2]

std::span< const Vector > NeoFOAM::BoundaryMesh::sf ( const localIdx  i) const

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

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

◆ weights() [1/2]

const scalarField & NeoFOAM::BoundaryMesh::weights ( ) const

Get the field of weights.

Returns
A constant reference to the boundary field of weights.

◆ weights() [2/2]

std::span< const scalar > NeoFOAM::BoundaryMesh::weights ( const localIdx  i) const

Get a span of weights for a specific boundary face.

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

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