NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType > Class Template Reference

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

#include <volumeField.hpp>

Inheritance diagram for NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType >:
NeoFOAM::finiteVolume::cellCentred::GeometricFieldMixin< ValueType >

Public Types

using FieldValueType = ValueType
 

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 Field< ValueType > &internalField, 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 Field< ValueType > &internalField, const BoundaryFields< ValueType > &boundaryFields, 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 > &internalField, 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 NeoFOAM::finiteVolume::cellCentred::GeometricFieldMixin< ValueType >
 GeometricFieldMixin (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const DomainField< ValueType > &field)
 Constructor for GeometricFieldMixin.
 
 GeometricFieldMixin (const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const Field< ValueType > &internalField, const BoundaryFields< ValueType > &boundaryFields)
 Constructor for GeometricFieldMixin.
 
const Field< ValueType > & internalField () const
 Returns a const reference to the internal field.
 
Field< ValueType > & internalField ()
 Returns a reference to the internal field.
 
size_t size () const
 Returns the size of the internal field.
 
const BoundaryFields< ValueType > & boundaryField () const
 Returns a const reference to the boundary field.
 
BoundaryFields< ValueType > & boundaryField ()
 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 NeoFOAM::finiteVolume::cellCentred::GeometricFieldMixin< ValueType >
std::string name
 

Additional Inherited Members

- Protected Attributes inherited from NeoFOAM::finiteVolume::cellCentred::GeometricFieldMixin< ValueType >
Executor exec_
 
const UnstructuredMeshmesh_
 
DomainField< ValueType > field_
 

Detailed Description

template<typename ValueType>
class NeoFOAM::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 GeometricFieldMixin 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

◆ FieldValueType

template<typename ValueType >
using NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType >::FieldValueType = ValueType

Definition at line 31 of file volumeField.hpp.

Constructor & Destructor Documentation

◆ VolumeField() [1/5]

template<typename ValueType >
NeoFOAM::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 >
NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  name,
const UnstructuredMesh mesh,
const Field< ValueType > &  internalField,
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
internalFieldthe underlying internal field
boundaryConditionsa vector of boundary conditions

Definition at line 68 of file volumeField.hpp.

◆ VolumeField() [3/5]

template<typename ValueType >
NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  name,
const UnstructuredMesh mesh,
const Field< ValueType > &  internalField,
const BoundaryFields< ValueType > &  boundaryFields,
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
internalFieldthe underlying internal field
boundaryFieldsthe underlying boundary data fields
boundaryConditionsa vector of boundary conditions

Definition at line 94 of file volumeField.hpp.

◆ VolumeField() [4/5]

template<typename ValueType >
NeoFOAM::finiteVolume::cellCentred::VolumeField< ValueType >::VolumeField ( const Executor exec,
std::string  fieldName,
const UnstructuredMesh mesh,
const Field< ValueType > &  internalField,
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
internalFieldthe 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 118 of file volumeField.hpp.

◆ VolumeField() [5/5]

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

Definition at line 138 of file volumeField.hpp.

Member Function Documentation

◆ boundaryConditions()

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

Definition at line 204 of file volumeField.hpp.

◆ correctBoundaryConditions()

template<typename ValueType >
void NeoFOAM::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 150 of file volumeField.hpp.

◆ db() [1/2]

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

Retrieves the database.

Returns
Database& A reference to the database.

Definition at line 170 of file volumeField.hpp.

◆ db() [2/2]

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

Retrieves the database.

Returns
const Database& A const reference to the database.

Definition at line 186 of file volumeField.hpp.

◆ hasDatabase()

template<typename ValueType >
bool NeoFOAM::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 163 of file volumeField.hpp.

◆ registered()

template<typename ValueType >
bool NeoFOAM::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 202 of file volumeField.hpp.

Member Data Documentation

◆ fieldCollectionName

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

Definition at line 210 of file volumeField.hpp.

◆ key

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

Definition at line 209 of file volumeField.hpp.


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