NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
NeoN::finiteVolume::cellCentred Namespace Reference

Namespaces

namespace  detail
 
namespace  surfaceBoundary
 
namespace  volumeBoundary
 
namespace  volumeFieldDetail
 

Classes

class  BasicGeometryScheme
 Default GeometryScheme kernel: computes weights, nonOrthDeltaCoeffs and the non-orthogonal correction vectors directly from the mesh geometry. More...
 
struct  BoundaryAttributes
 
class  BoundaryContext
 Carries named field references for context-aware boundary conditions. More...
 
class  BoundaryPatchMixin
 A base class for implementing derived boundary conditions. More...
 
class  BoundedDiv
 
class  CellLimitedGrad
 
class  CellToFaceStencil
 
class  Corrected
 
class  CreateFromExistingVector
 Creates a VectorDocument from an existing field. More...
 
class  DdtOperator
 
class  DivOperator
 
class  DivOperatorFactory
 
class  DomainMixin
 This class represents a mixin for a geometric field. More...
 
class  FaceNormalGradient
 
class  FaceNormalGradientFactory
 
class  FieldDatabaseMixin
 Mixin for database registration for fields (volume/surface). More...
 
class  GaussGreenDdtDivLaplacian
 
class  GaussGreenDiv
 
class  GaussGreenDivLaplacian
 
class  GaussGreenGrad
 
class  GaussGreenLaplacian
 
class  GeometryScheme
 
class  GeometrySchemeFactory
 
class  GradOperator
 
class  GradOperatorFactory
 
class  LaplacianOperator
 
class  LaplacianOperatorFactory
 
class  LimitedCorrected
 
class  Linear
 
class  LinearUpwind
 
class  OldTimeCollection
 
class  OldTimeDocument
 
class  SourceTerm
 
class  SurfaceBoundary
 Represents a surface boundary field for a cell-centered finite volume method. More...
 
class  SurfaceBoundaryFactory
 
class  SurfaceField
 Represents a surface field in a finite volume method. More...
 
class  SurfaceIntegrate
 
class  SurfaceInterpolation
 
class  SurfaceInterpolationFactory
 
class  Uncorrected
 
class  Upwind
 
class  VectorCollection
 A class representing a collection of field documents in a database. More...
 
class  VectorDocument
 A class representing a field document in a database. More...
 
class  VolumeBoundary
 Represents a volume boundary field for a cell-centered finite volume method. More...
 
class  VolumeBoundaryFactory
 
class  VolumeField
 Represents a volume field in a finite volume method. More...
 

Typedefs

using CreateFunction = std::function< VectorDocument(NeoN::Database &db)>
 A function type for creating a VectorDocument.
 
using VolVectorField = VolumeField< Vec3 >
 
using SurfScalarField = SurfaceField< scalar >
 

Enumerations

enum class  DdtScheme { None , SteadyState , BDF1 , BDF2 }
 

Functions

bool validateVectorDoc (const Document &doc)
 Validates a VectorDocument.
 
template<typename VectorType >
VectorType & oldTime (VectorType &field)
 Retrieves the old time field of a given field.
 
template<typename VectorType >
const VectorType & oldTime (const VectorType &field)
 Retrieves the old time field of a given field (const version).
 
template<typename VectorType >
int oldTimeLevel (const VectorType &field)
 Helper function to retrieve the history depth of a field in oldTimeCollection.
 
template<typename VectorType >
void rotateOldTimes (VectorType &field)
 Rotate time levels for a field. Meaning of level (computed via oldTimeLevel(field)): level == 0 : no history exists yet level == 1 : φ^{n} exists (one oldTime buffer) level >= 2 : φ^{n} and φ^{n-1} exist (old and oldOld)
 
std::pair< scalar, scalarcomputeCoNum (const SurfaceField< scalar > &faceFlux, const scalar dt)
 
template<typename BoundaryType >
std::vector< BoundaryType > createCalculatedBCs (const UnstructuredMesh &mesh)
 
template<typename BoundaryType >
std::vector< BoundaryType > createCalculatedProcBCs (const UnstructuredMesh &mesh)
 
template<typename BoundaryType >
std::vector< BoundaryType > createExtrapolatedBCs (const UnstructuredMesh &mesh)
 
std::vector< SurfaceBoundary< scalar > > createFluxCorrBCsFromU (const UnstructuredMesh &mesh, const VolumeField< Vec3 > &u)
 Boundary condition to apply to ddtFluxCorr surfaceScalarField. It sets the flux correction to zero for all fixedValue velocity boundaries by calling .correctBoundaryConditions().
 
template<typename ValueType >
void computeCorrectedFaceNormalGrad (const VolumeField< ValueType > &volField, const std::shared_ptr< GeometryScheme > geometryScheme, SurfaceField< ValueType > &surfaceField)
 
template<typename ValueType >
void computeCorrectionTerm (const VolumeField< ValueType > &volField, const std::shared_ptr< GeometryScheme > geometryScheme, SurfaceField< ValueType > &corrField)
 
template<typename ValueType >
void computeLimitedCorrectedFaceNormalGrad (const VolumeField< ValueType > &volField, const std::shared_ptr< GeometryScheme > geometryScheme, scalar limitCoeff, SurfaceField< ValueType > &surfaceField)
 
template<typename ValueType >
void computeLimitedCorrectionTerm (const VolumeField< ValueType > &volField, const std::shared_ptr< GeometryScheme > geometryScheme, scalar limitCoeff, SurfaceField< ValueType > &corrField)
 
template<typename ValueType >
void computeFaceNormalGrad (const VolumeField< ValueType > &volVector, const std::shared_ptr< GeometryScheme > geometryScheme, SurfaceField< ValueType > &surfaceVector)
 
SurfaceField< scalaroperator* (const SurfaceField< scalar > &lhs, const SurfaceField< scalar > &rhs)
 
SurfaceField< scalaroperator+ (const SurfaceField< scalar > &lhs, const SurfaceField< scalar > &rhs)
 
SurfaceField< scalaroperator- (const SurfaceField< scalar > &lhs, const SurfaceField< scalar > &rhs)
 
SurfaceField< scalaroperator* (scalar s, const SurfaceField< scalar > &fld)
 
VolumeField< Vec3cross (const VolumeField< Vec3 > &lhs, const VolumeField< Vec3 > &rhs)
 Element-wise cross product of two Vec3 volume fields.
 
template<typename ValueType >
void computeLinearInterpolation (const VolumeField< ValueType > &src, const SurfaceField< scalar > &weights, SurfaceField< ValueType > &dst)
 
template<typename ValueType >
void computeLinearUpwindInterpolation (const VolumeField< ValueType > &src, const SurfaceField< scalar > &flux, const SurfaceField< Vec3 > &faceDeltaOwner, const SurfaceField< Vec3 > &faceDeltaNeighbour, SurfaceField< ValueType > &dst, const bool cellLimitedGradient=false)
 
template<typename ValueType >
void computeLinearUpwindCorrection (const VolumeField< ValueType > &src, const SurfaceField< scalar > &flux, const SurfaceField< Vec3 > &faceDeltaOwner, const SurfaceField< Vec3 > &faceDeltaNeighbour, SurfaceField< ValueType > &dst, const bool cellLimitedGradient=false)
 
template<typename ValueType >
void computeUpwindInterpolation (const VolumeField< ValueType > &src, const SurfaceField< scalar > &flux, const SurfaceField< scalar > &weights, SurfaceField< ValueType > &dst)
 
template<typename ValueType >
void computeUpwindInterpolationWeights (const SurfaceField< scalar > &flux, const VolumeField< ValueType > &src, SurfaceField< scalar > &weights)
 
template<typename FieldValueType , typename AssemblyType = FieldValueType>
void applyBoundedDivDiagonal (la::LinearSystem< AssemblyType, FieldValueType > &ls, const SurfaceField< scalar > &faceFlux, const UnstructuredMesh &mesh, const dsl::Coeff scaling)
 
SurfScalarField ddtFluxCorr (const VolVectorField &u, const SurfScalarField &phi, scalar dt, DdtScheme scheme)
 
template<typename FieldValueType , typename AssemblyType >
void addDivCorrectionToRhs (la::LinearSystem< AssemblyType, FieldValueType > &ls, const SurfaceField< scalar > &faceFlux, const SurfaceField< FieldValueType > &correction, const dsl::Coeff operatorScaling)
 
template void addDivCorrectionToRhs (la::LinearSystem< scalar, scalar > &, const SurfaceField< scalar > &, const SurfaceField< scalar > &, const dsl::Coeff)
 
template void addDivCorrectionToRhs (la::LinearSystem< Vec3, Vec3 > &, const SurfaceField< scalar > &, const SurfaceField< Vec3 > &, const dsl::Coeff)
 
template void addDivCorrectionToRhs (la::LinearSystem< scalar, Vec3 > &, const SurfaceField< scalar > &, const SurfaceField< Vec3 > &, const dsl::Coeff)
 
template<typename FieldValueType , typename AssemblyType = FieldValueType>
void computeLaplacianNonOrthCorrImpl (la::LinearSystem< AssemblyType, FieldValueType > &ls, const SurfaceField< scalar > &gamma, const VolumeField< FieldValueType > &phi, const dsl::Coeff coeff, const FaceNormalGradient< FieldValueType > &faceNormalGradient)
 
VolumeField< Vec3reconstruct (const SurfaceField< scalar > &ssf)
 
template<typename ValueType >
void surfaceIntegrate (const Executor &exec, localIdx nInternalFaces, View< const label > internalFaceNeighbors, View< const label > internalFaceOwners, View< const label > boundaryFaceOwners, View< const ValueType > flux, View< const ValueType > bFlux, View< const scalar > v, View< ValueType > res, const dsl::Coeff operatorScaling)
 

Typedef Documentation

◆ CreateFunction

A function type for creating a VectorDocument.

This function type is used to create a VectorDocument and creates a registered VectorType

Parameters
dbThe database to create the VectorDocument in.
Returns
The created VectorDocument.

Definition at line 201 of file fieldCollection.hpp.

◆ SurfScalarField

Definition at line 18 of file ddtFluxCorr.hpp.

◆ VolVectorField

Definition at line 17 of file ddtFluxCorr.hpp.

Enumeration Type Documentation

◆ DdtScheme

Enumerator
None 
SteadyState 
BDF1 
BDF2 

Definition at line 19 of file ddtOperator.hpp.

Function Documentation

◆ addDivCorrectionToRhs() [1/4]

template<typename FieldValueType , typename AssemblyType >
void NeoN::finiteVolume::cellCentred::addDivCorrectionToRhs ( la::LinearSystem< AssemblyType, FieldValueType > &  ls,
const SurfaceField< scalar > &  faceFlux,
const SurfaceField< FieldValueType > &  correction,
const dsl::Coeff  operatorScaling 
)

◆ addDivCorrectionToRhs() [2/4]

template void NeoN::finiteVolume::cellCentred::addDivCorrectionToRhs ( la::LinearSystem< scalar, scalar > &  ,
const SurfaceField< scalar > &  ,
const SurfaceField< scalar > &  ,
const dsl::Coeff   
)
extern

◆ addDivCorrectionToRhs() [3/4]

template void NeoN::finiteVolume::cellCentred::addDivCorrectionToRhs ( la::LinearSystem< scalar, Vec3 > &  ,
const SurfaceField< scalar > &  ,
const SurfaceField< Vec3 > &  ,
const dsl::Coeff   
)
extern

◆ addDivCorrectionToRhs() [4/4]

template void NeoN::finiteVolume::cellCentred::addDivCorrectionToRhs ( la::LinearSystem< Vec3, Vec3 > &  ,
const SurfaceField< scalar > &  ,
const SurfaceField< Vec3 > &  ,
const dsl::Coeff   
)
extern

◆ applyBoundedDivDiagonal()

template<typename FieldValueType , typename AssemblyType = FieldValueType>
void NeoN::finiteVolume::cellCentred::applyBoundedDivDiagonal ( la::LinearSystem< AssemblyType, FieldValueType > &  ls,
const SurfaceField< scalar > &  faceFlux,
const UnstructuredMesh mesh,
const dsl::Coeff  scaling 
)

◆ computeCoNum()

std::pair< scalar, scalar > NeoN::finiteVolume::cellCentred::computeCoNum ( const SurfaceField< scalar > &  faceFlux,
const scalar  dt 
)

◆ computeCorrectedFaceNormalGrad()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeCorrectedFaceNormalGrad ( const VolumeField< ValueType > &  volField,
const std::shared_ptr< GeometryScheme geometryScheme,
SurfaceField< ValueType > &  surfaceField 
)

◆ computeCorrectionTerm()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeCorrectionTerm ( const VolumeField< ValueType > &  volField,
const std::shared_ptr< GeometryScheme geometryScheme,
SurfaceField< ValueType > &  corrField 
)

◆ computeFaceNormalGrad()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeFaceNormalGrad ( const VolumeField< ValueType > &  volVector,
const std::shared_ptr< GeometryScheme geometryScheme,
SurfaceField< ValueType > &  surfaceVector 
)

◆ computeLaplacianNonOrthCorrImpl()

template<typename FieldValueType , typename AssemblyType = FieldValueType>
void NeoN::finiteVolume::cellCentred::computeLaplacianNonOrthCorrImpl ( la::LinearSystem< AssemblyType, FieldValueType > &  ls,
const SurfaceField< scalar > &  gamma,
const VolumeField< FieldValueType > &  phi,
const dsl::Coeff  coeff,
const FaceNormalGradient< FieldValueType > &  faceNormalGradient 
)

◆ computeLimitedCorrectedFaceNormalGrad()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeLimitedCorrectedFaceNormalGrad ( const VolumeField< ValueType > &  volField,
const std::shared_ptr< GeometryScheme geometryScheme,
scalar  limitCoeff,
SurfaceField< ValueType > &  surfaceField 
)

◆ computeLimitedCorrectionTerm()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeLimitedCorrectionTerm ( const VolumeField< ValueType > &  volField,
const std::shared_ptr< GeometryScheme geometryScheme,
scalar  limitCoeff,
SurfaceField< ValueType > &  corrField 
)

◆ computeLinearInterpolation()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeLinearInterpolation ( const VolumeField< ValueType > &  src,
const SurfaceField< scalar > &  weights,
SurfaceField< ValueType > &  dst 
)

◆ computeLinearUpwindCorrection()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeLinearUpwindCorrection ( const VolumeField< ValueType > &  src,
const SurfaceField< scalar > &  flux,
const SurfaceField< Vec3 > &  faceDeltaOwner,
const SurfaceField< Vec3 > &  faceDeltaNeighbour,
SurfaceField< ValueType > &  dst,
const bool  cellLimitedGradient = false 
)

◆ computeLinearUpwindInterpolation()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeLinearUpwindInterpolation ( const VolumeField< ValueType > &  src,
const SurfaceField< scalar > &  flux,
const SurfaceField< Vec3 > &  faceDeltaOwner,
const SurfaceField< Vec3 > &  faceDeltaNeighbour,
SurfaceField< ValueType > &  dst,
const bool  cellLimitedGradient = false 
)

◆ computeUpwindInterpolation()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeUpwindInterpolation ( const VolumeField< ValueType > &  src,
const SurfaceField< scalar > &  flux,
const SurfaceField< scalar > &  weights,
SurfaceField< ValueType > &  dst 
)

◆ computeUpwindInterpolationWeights()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::computeUpwindInterpolationWeights ( const SurfaceField< scalar > &  flux,
const VolumeField< ValueType > &  src,
SurfaceField< scalar > &  weights 
)

◆ createCalculatedBCs()

template<typename BoundaryType >
std::vector< BoundaryType > NeoN::finiteVolume::cellCentred::createCalculatedBCs ( const UnstructuredMesh mesh)

Definition at line 35 of file boundary.hpp.

◆ createCalculatedProcBCs()

template<typename BoundaryType >
std::vector< BoundaryType > NeoN::finiteVolume::cellCentred::createCalculatedProcBCs ( const UnstructuredMesh mesh)

Definition at line 49 of file boundary.hpp.

◆ createExtrapolatedBCs()

template<typename BoundaryType >
std::vector< BoundaryType > NeoN::finiteVolume::cellCentred::createExtrapolatedBCs ( const UnstructuredMesh mesh)

Definition at line 76 of file boundary.hpp.

◆ createFluxCorrBCsFromU()

std::vector< SurfaceBoundary< scalar > > NeoN::finiteVolume::cellCentred::createFluxCorrBCsFromU ( const UnstructuredMesh mesh,
const VolumeField< Vec3 > &  u 
)
inline

Boundary condition to apply to ddtFluxCorr surfaceScalarField. It sets the flux correction to zero for all fixedValue velocity boundaries by calling .correctBoundaryConditions().

Parameters
meshThe mesh the boundary is registered on.
uThe velocity field to check the boundary conditions on.
Returns
bcs The surface boundary vector with updated BC types.

Definition at line 23 of file ddtFluxCorrBoundary.hpp.

◆ cross()

VolumeField< Vec3 > NeoN::finiteVolume::cellCentred::cross ( const VolumeField< Vec3 > &  lhs,
const VolumeField< Vec3 > &  rhs 
)
inline

Element-wise cross product of two Vec3 volume fields.

Applied to the internal vector and to the boundary values alike, so the result is usable wherever the operands were — matching the scalar SurfaceField operators. Right-handed: cross(a, b)[i] == a[i] ^ b[i].

Definition at line 172 of file volumeField.hpp.

◆ ddtFluxCorr()

SurfScalarField NeoN::finiteVolume::cellCentred::ddtFluxCorr ( const VolVectorField u,
const SurfScalarField phi,
scalar  dt,
DdtScheme  scheme 
)
inline

Definition at line 178 of file ddtFluxCorr.hpp.

◆ oldTime() [1/2]

template<typename VectorType >
const VectorType & NeoN::finiteVolume::cellCentred::oldTime ( const VectorType &  field)

Retrieves the old time field of a given field (const version).

This function retrieves the old time field of a given field

Parameters
fieldThe field to retrieve the old time field from.
Returns
The old time field.

Definition at line 175 of file oldTimeCollection.hpp.

◆ oldTime() [2/2]

template<typename VectorType >
VectorType & NeoN::finiteVolume::cellCentred::oldTime ( VectorType &  field)

Retrieves the old time field of a given field.

This function retrieves the old time field of a given field

Parameters
fieldThe field to retrieve the old time field from.
Returns
The old time field.

Definition at line 159 of file oldTimeCollection.hpp.

◆ oldTimeLevel()

template<typename VectorType >
int NeoN::finiteVolume::cellCentred::oldTimeLevel ( const VectorType &  field)
inline

Helper function to retrieve the history depth of a field in oldTimeCollection.

Parameters
fieldThe field to retrieve the old time field from.
Returns
History depth of the old time field.

Definition at line 189 of file oldTimeCollection.hpp.

◆ operator*() [1/2]

SurfaceField< scalar > NeoN::finiteVolume::cellCentred::operator* ( const SurfaceField< scalar > &  lhs,
const SurfaceField< scalar > &  rhs 
)
inline

Definition at line 177 of file surfaceField.hpp.

◆ operator*() [2/2]

SurfaceField< scalar > NeoN::finiteVolume::cellCentred::operator* ( scalar  s,
const SurfaceField< scalar > &  fld 
)
inline

Definition at line 203 of file surfaceField.hpp.

◆ operator+()

SurfaceField< scalar > NeoN::finiteVolume::cellCentred::operator+ ( const SurfaceField< scalar > &  lhs,
const SurfaceField< scalar > &  rhs 
)
inline

Definition at line 186 of file surfaceField.hpp.

◆ operator-()

SurfaceField< scalar > NeoN::finiteVolume::cellCentred::operator- ( const SurfaceField< scalar > &  lhs,
const SurfaceField< scalar > &  rhs 
)
inline

Definition at line 195 of file surfaceField.hpp.

◆ reconstruct()

VolumeField< Vec3 > NeoN::finiteVolume::cellCentred::reconstruct ( const SurfaceField< scalar > &  ssf)

◆ rotateOldTimes()

template<typename VectorType >
void NeoN::finiteVolume::cellCentred::rotateOldTimes ( VectorType &  field)

Rotate time levels for a field. Meaning of level (computed via oldTimeLevel(field)): level == 0 : no history exists yet level == 1 : φ^{n} exists (one oldTime buffer) level >= 2 : φ^{n} and φ^{n-1} exist (old and oldOld)

Startup sequence when rotate() is called at the BEGINNING of each time step:

Initial state (t = t0, before first rotate): field = φ^{0} no oldTime buffers exist

First rotateOldTimes() call (entering t1):

  • level == 0
  • φ^{n} buffer is allocated via oldTime(field)
  • data rotated: φ^{n} ← φ^{0} → history depth = 1 (BDF1 startup)

Second rotateOldTimes() call (entering t2):

  • level == 1
  • φ^{n-1} buffer is allocated via oldTime(oldTime(field))
  • data rotated: φ^{n-1} ← φ^{n} = φ^{0}, φ^{n} ← φ^{1} → history depth = 2 (BDF2 becomes active)

Subsequent rotate() calls:

  • level >= 2
  • buffers reused (no further allocation)
  • data rotated each step: φ^{n-1} ← φ^{n}, φ^{n} ← φ^{current}

Only two historical states are kept (φ^{n}, φ^{n-1}).

Parameters
fieldThe field to retrieve the old time field from.

◆ surfaceIntegrate()

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::surfaceIntegrate ( const Executor exec,
localIdx  nInternalFaces,
View< const label internalFaceNeighbors,
View< const label internalFaceOwners,
View< const label boundaryFaceOwners,
View< const ValueType >  flux,
View< const ValueType >  bFlux,
View< const scalar v,
View< ValueType >  res,
const dsl::Coeff  operatorScaling 
)

◆ validateVectorDoc()

bool NeoN::finiteVolume::cellCentred::validateVectorDoc ( const Document doc)

Validates a VectorDocument.

This function validates a VectorDocument by checking if it contains the required fields.

Parameters
docThe Document to validate.
Returns
true if the Document is valid, false otherwise.