NeoN
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | 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 >

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 name, 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)
 
void correctBoundaryConditions ()
 Corrects the boundary conditions of the surface field.
 
bool hasDatabase () const
 Returns true if the field has a database, false otherwise.
 
Databasedb ()
 Retrieves the database.
 
const Databasedb () const
 Retrieves the database.
 
bool registered () const
 Returns true if the field is registered in the database, false otherwise.
 
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 Attributes

std::string key
 
std::string fieldCollectionName
 
- Public Attributes inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
std::string name
 

Additional Inherited Members

- Protected Attributes inherited from NeoN::finiteVolume::cellCentred::DomainMixin< ValueType >
Executor exec_
 
const UnstructuredMeshmesh_
 
Field< ValueType > field_
 

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 26 of file volumeField.hpp.

Member Typedef Documentation

◆ VectorValueType

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

Definition at line 31 of file volumeField.hpp.

Constructor & Destructor Documentation

◆ VolumeField() [1/5]

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

Constructor for a uninitialized VolumeField.

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

Definition at line 42 of file volumeField.hpp.

◆ 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 
)
inline

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

Definition at line 65 of file volumeField.hpp.

◆ 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 
)
inline

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

Definition at line 88 of file volumeField.hpp.

◆ 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 
)
inline

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

Definition at line 112 of file volumeField.hpp.

◆ VolumeField() [5/5]

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

Definition at line 126 of file volumeField.hpp.

Member Function Documentation

◆ boundaryConditions()

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

Definition at line 192 of file volumeField.hpp.

◆ correctBoundaryConditions()

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

Corrects the boundary conditions of the surface field.

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

Definition at line 138 of file volumeField.hpp.

◆ db() [1/2]

template<typename ValueType >
Database & NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::db ( )
inline

Retrieves the database.

Returns
Database& A reference to the database.

Definition at line 158 of file volumeField.hpp.

◆ db() [2/2]

template<typename ValueType >
const Database & NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::db ( ) const
inline

Retrieves the database.

Returns
const Database& A const reference to the database.

Definition at line 174 of file volumeField.hpp.

◆ hasDatabase()

template<typename ValueType >
bool NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::hasDatabase ( ) const
inline

Returns true if the field has a database, false otherwise.

Returns
true if the field has a database, false otherwise.

Definition at line 151 of file volumeField.hpp.

◆ registered()

template<typename ValueType >
bool NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::registered ( ) const
inline

Returns true if the field is registered in the database, false otherwise.

Returns
true if the field is registered in the database, false otherwise.

Definition at line 190 of file volumeField.hpp.

Member Data Documentation

◆ fieldCollectionName

template<typename ValueType >
std::string NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::fieldCollectionName

Definition at line 198 of file volumeField.hpp.

◆ key

template<typename ValueType >
std::string NeoN::finiteVolume::cellCentred::VolumeField< ValueType >::key

Definition at line 197 of file volumeField.hpp.


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