NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NeoN::finiteVolume::cellCentred::VolumeField< ValueType > Class Template Reference

Represents a volume field in a finite volume method. More...

#include <volumeField.hpp>

Inheritance diagram for NeoN::finiteVolume::cellCentred::VolumeField< ValueType >:
NeoN::finiteVolume::cellCentred::DomainMixin< ValueType > NeoN::finiteVolume::cellCentred::FieldDatabaseMixin

Public Types

using VectorValueType = ValueType
 
- Public Types inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
typedef ValueType ElementType
 

Public Member Functions

 VolumeField (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const std::vector< VolumeBoundary< ValueType > > &boundaryConditions)
 Constructor for a uninitialized VolumeField.
 
 VolumeField (const Executor &exec, std::string name, const UnstructuredMesh &mesh, const Vector< ValueType > &internalVector, const std::vector< VolumeBoundary< ValueType > > &boundaryConditions)
 Constructor for a VolumeField with a given internal field.
 
 VolumeField (const Executor &exec, std::string name, const UnstructuredMesh &mesh, const Vector< ValueType > &internalVector, const BoundaryData< ValueType > &boundaryVectors, const std::vector< VolumeBoundary< ValueType > > &boundaryConditions)
 Constructor for a VolumeField with a given internal and boundary field.
 
 VolumeField (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const Field< ValueType > &domainVector, const std::vector< VolumeBoundary< ValueType > > &boundaryConditions, Database &db, std::string dbKey, std::string collectionName)
 Constructor for a VolumeField with a given internal field and database.
 
 VolumeField (const VolumeField &other)
 
VolumeField< ValueType > & operator-= (const ValueType rhs)
 
VolumeField< ValueType > & operator+= (const ValueType rhs)
 
void correctBoundaryConditions ()
 Corrects the boundary conditions of the surface field.
 
void correctBoundaryConditions (const BoundaryContext &ctx)
 
std::vector< VolumeBoundary< ValueType > > boundaryConditions () const
 
- Public Member Functions inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
 DomainMixin (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const Field< ValueType > &field)
 Constructor for DomainMixin.
 
 DomainMixin (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const Vector< ValueType > &internalVector, const BoundaryData< ValueType > &boundaryVectors)
 Constructor for DomainMixin.
 
const Vector< ValueType > & internalVector () const
 Returns a const reference to the internal field.
 
Vector< ValueType > & internalVector ()
 Returns a reference to the internal field.
 
localIdx size () const
 Returns the size of the internal field.
 
const BoundaryData< ValueType > & boundaryData () const
 Returns a const reference to the boundary field.
 
BoundaryData< ValueType > & boundaryData ()
 Returns a reference to the boundary field.
 
const Executorexec () const
 Returns a const reference to the executor object.
 
const UnstructuredMeshmesh () const
 Returns a const reference to the unstructured mesh object.
 
- Public Member Functions inherited from NeoN::finiteVolume::cellCentred::FieldDatabaseMixin
 FieldDatabaseMixin ()=default
 
 FieldDatabaseMixin (Database &db, std::string keyIn, std::string collectionName)
 
bool hasDatabase () const
 
Databasedb ()
 
const Databasedb () const
 
bool registered () const
 

Additional Inherited Members

- Public Attributes inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
std::string name
 
- Public Attributes inherited from NeoN::finiteVolume::cellCentred::FieldDatabaseMixin
std::string key
 
std::string fieldCollectionName
 
- Protected Attributes inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
Executor exec_
 
const UnstructuredMeshmesh_
 
Field< ValueType > field_
 
- Protected Attributes inherited from NeoN::finiteVolume::cellCentred::FieldDatabaseMixin
std::optional< Database * > db_
 

Detailed Description

template<typename ValueType>
class NeoN::finiteVolume::cellCentred::VolumeField< ValueType >

Represents a volume field in a finite volume method.

The VolumeField class is a template class that represents a cell-centered field in a finite volume method. It inherits from the DomainMixin class and provides methods for correcting boundary conditions.

Template Parameters
ValueTypeThe value type of the field.

Definition at line 30 of file volumeField.hpp.

Member Typedef Documentation

◆ VectorValueType

template<typename ValueType >
using NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VectorValueType = ValueType

Definition at line 35 of file volumeField.hpp.

Constructor & Destructor Documentation

◆ VolumeField() [1/5]

template<typename ValueType >
NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  fieldName,
const UnstructuredMesh mesh,
const std::vector< VolumeBoundary< ValueType > > &  boundaryConditions 
)

Constructor for a uninitialized VolumeField.

Parameters
execThe executor
fieldNameThe name of the field
meshThe underlying mesh
boundaryConditionsa vector of boundary conditions

◆ VolumeField() [2/5]

template<typename ValueType >
NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  name,
const UnstructuredMesh mesh,
const Vector< ValueType > &  internalVector,
const std::vector< VolumeBoundary< ValueType > > &  boundaryConditions 
)

Constructor for a VolumeField with a given internal field.

Parameters
execThe executor
nameThe name of the field
meshThe underlying mesh
internalVectorthe underlying internal field
boundaryConditionsa vector of boundary conditions

◆ VolumeField() [3/5]

template<typename ValueType >
NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  name,
const UnstructuredMesh mesh,
const Vector< ValueType > &  internalVector,
const BoundaryData< ValueType > &  boundaryVectors,
const std::vector< VolumeBoundary< ValueType > > &  boundaryConditions 
)

Constructor for a VolumeField with a given internal and boundary field.

Parameters
nameThe name of the field
meshThe underlying mesh
internalVectorthe underlying internal field
boundaryVectorsthe underlying boundary data fields
boundaryConditionsa vector of boundary conditions

◆ VolumeField() [4/5]

template<typename ValueType >
NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  fieldName,
const UnstructuredMesh mesh,
const Field< ValueType > &  domainVector,
const std::vector< VolumeBoundary< ValueType > > &  boundaryConditions,
Database db,
std::string  dbKey,
std::string  collectionName 
)

Constructor for a VolumeField with a given internal field and database.

Parameters
execThe executor
fieldNameThe name of the field
meshThe underlying mesh
internalVectorthe underlying internal field
boundaryConditionsa vector of boundary conditions
dbThe database
dbKeyThe key of the field in the database
collectionNameThe name of the field collection in the database

◆ VolumeField() [5/5]

template<typename ValueType >
NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const VolumeField< ValueType > &  other)

Member Function Documentation

◆ boundaryConditions()

template<typename ValueType >
std::vector< VolumeBoundary< ValueType > > NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::boundaryConditions ( ) const
inline

Definition at line 128 of file volumeField.hpp.

◆ correctBoundaryConditions() [1/2]

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::correctBoundaryConditions ( )

Corrects the boundary conditions of the surface field.

This function applies the correctBoundaryConditions() method to each boundary condition in the field.

◆ correctBoundaryConditions() [2/2]

template<typename ValueType >
void NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::correctBoundaryConditions ( const BoundaryContext ctx)

◆ operator+=()

template<typename ValueType >
VolumeField< ValueType > & NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::operator+= ( const ValueType  rhs)

◆ operator-=()

template<typename ValueType >
VolumeField< ValueType > & NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::operator-= ( const ValueType  rhs)

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