25template<
typename ValueType>
40 std::string fieldName,
58 std::string fieldName,
67 NF_ERROR_EXIT(
"Inconsistent size of mesh and internal field detected");
90 size_t size()
const {
return field_.internalField().size(); }
Represents the boundary fields for a computational domain.
Represents the domain fields for a computational domain.
A class to contain the data and executors for a field and define some basic operations.
Represents an unstructured mesh in NeoFOAM.
size_t nCells() const
Get the number of cells in the mesh.
This class represents a mixin for a geometric field.
const UnstructuredMesh & mesh() const
Returns a const reference to the unstructured mesh object.
GeometricFieldMixin(const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const Field< ValueType > &internalField, const BoundaryFields< ValueType > &boundaryFields)
Constructor for GeometricFieldMixin.
GeometricFieldMixin(const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const DomainField< ValueType > &field)
Constructor for GeometricFieldMixin.
const Executor & exec() const
Returns a const reference to the executor object.
const Field< ValueType > & internalField() const
Returns a const reference to 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 UnstructuredMesh & mesh_
size_t size() const
Returns the size of the internal field.
Field< ValueType > & internalField()
Returns a reference to the internal field.
DomainField< ValueType > field_
#define NF_ERROR_EXIT(message)
Macro for printing an error message and aborting the program.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor