29template<
typename ValueType>
48 std::string fieldName,
103 std::string fieldName,
109 std::string collectionName
136 return boundaryConditions_;
141 std::vector<VolumeBoundary<ValueType>> boundaryConditions_;
142 std::optional<Database*>
db_;
147 bool boundaryConditionsSet_ {
false};
159 auto out = target.
view();
160 auto rhs = other.
view();
164 KOKKOS_LAMBDA(
const localIdx i) { out[i] = out[i] ^ rhs[i]; },
Represents the boundary fields for a computational domain.
Represents the domain fields for a computational domain.
Represents an unstructured mesh in NeoN.
An executor-aware contiguous container for numerical data with vector-style arithmetic semantics.
View< ValueType > view() &&=delete
Prevents creating a View from a temporary Vector.
Carries named field references for context-aware boundary conditions.
DomainMixin(const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, Field< ValueType > field)
Constructor for DomainMixin.
const UnstructuredMesh & mesh() const
Returns a const reference to the unstructured mesh object.
const BoundaryData< ValueType > & boundaryData() const
Returns a const reference to the boundary field.
const Executor & exec() const
Returns a const reference to the executor object.
const Vector< ValueType > & internalVector() const
Returns a const reference to the internal field.
FieldDatabaseMixin()=default
std::optional< Database * > db_
Represents a volume boundary field for a cell-centered finite volume method.
Represents a volume field in a finite volume method.
VolumeField(const VolumeField &other)
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(VolumeField &&other)
Move constructor. Without it, moving a VolumeField would copy its data, since the user-declared copy ...
VolumeField< ValueType > & operator+=(const ValueType rhs)
void correctBoundaryConditions()
Corrects the boundary conditions of the surface field.
std::vector< VolumeBoundary< Vec3 > > boundaryConditions() const
ValueType VectorValueType
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< ValueType > & operator-=(const ValueType rhs)
void correctBoundaryConditions(const BoundaryContext &ctx)
VolumeField(const Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, 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 Executor &exec, std::string fieldName, const UnstructuredMesh &mesh, const std::vector< VolumeBoundary< ValueType > > &boundaryConditions)
Constructor for a uninitialized VolumeField.
void crossInto(const Executor &exec, Vector< Vec3 > &target, const Vector< Vec3 > &other)
in-place element-wise cross product, target = target ^ other
VolumeField< Vec3 > cross(const VolumeField< Vec3 > &lhs, const VolumeField< Vec3 > &rhs)
Element-wise cross product of two Vec3 volume fields.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor
void parallelFor(const ExecutorType &, std::pair< localIdx, localIdx > range, const Kernel &kernel, std::string name)