5#include <Kokkos_Core.hpp>
42 : exec_(rhs.exec_), value_(rhs.value_), refValue_(rhs.refValue_),
43 valueFraction_(rhs.valueFraction_), refGrad_(rhs.refGrad_),
44 boundaryTypes_(rhs.boundaryTypes_), offset_(rhs.offset_), nBoundaries_(rhs.nBoundaries_),
45 nBoundaryFaces_(rhs.nBoundaryFaces_)
54 : exec_(rhs.exec_), value_(
exec, rhs.value_), refValue_(
exec, rhs.refValue_),
55 valueFraction_(
exec, rhs.valueFraction_), refGrad_(
exec, rhs.refGrad_),
56 boundaryTypes_(
exec, rhs.boundaryTypes_), offset_(
exec, rhs.offset_),
57 nBoundaries_(rhs.nBoundaries_), nBoundaryFaces_(rhs.nBoundaryFaces_)
70 boundaryTypes_(
exec, nBoundaryTypes), offset_(
exec, nBoundaryTypes + 1),
155 nBoundaries_ = rhs.nBoundaries_;
156 nBoundaryFaces_ = rhs.nBoundaryFaces_;
159 refValue_ = rhs.refValue_;
160 valueFraction_ = rhs.valueFraction_;
161 refGrad_ = rhs.refGrad_;
162 boundaryTypes_ = rhs.boundaryTypes_;
163 offset_ = rhs.offset_;
172 nBoundaries_ = rhs.nBoundaries_;
173 nBoundaryFaces_ = rhs.nBoundaryFaces_;
175 value_ = std::move(rhs.value_);
176 refValue_ = std::move(rhs.refValue_);
177 valueFraction_ = std::move(rhs.valueFraction_);
178 refGrad_ = std::move(rhs.refGrad_);
179 boundaryTypes_ = std::move(rhs.boundaryTypes_);
180 offset_ = std::move(rhs.offset_);
190 return {offset_.
data()[patchId], offset_.
data()[patchId + 1]};
Represents the boundary fields for a computational domain.
Vector< T > & refValue()
Get the view storing the Dirichlet boundary values.
const Vector< T > & refGrad() const
Get the view storing the Neumann boundary values.
BoundaryData(const BoundaryData< T > &rhs)
Copy constructor.
BoundaryData(const Executor &exec, localIdx nBoundaryFaces, localIdx nBoundaryTypes)
constructor with default initialized Vectors from sizes.
Vector< T > & refGrad()
Get the view storing the Neumann boundary values.
Vector< scalar > & valueFraction()
Get the view storing the fraction of the boundary value.
localIdx nBoundaries() const
Get the number of boundaries.
std::pair< localIdx, localIdx > range(localIdx patchId) const
Get the range for a given patchId.
BoundaryData(const Executor &exec, const BoundaryData< T > &rhs)
Copy constructor.
const Vector< int > & boundaryTypes() const
Get the view storing the boundary types.
BoundaryData< T > & operator=(const BoundaryData< T > &rhs)
const Vector< localIdx > & offset() const
Get the view storing the offsets of each boundary.
BoundaryData(const Executor &exec, const std::vector< localIdx > &offsets)
constructor from a given offsets vector @warn all members except offsets are default constructed
const Vector< T > & refValue() const
Get the view storing the Dirichlet boundary values.
BoundaryData< T > & operator=(const BoundaryData< T > &&rhs)
const Vector< T > & value() const
Get the view storing the computed values from the boundary condition.
localIdx nBoundaryFaces() const
Get the number of boundary faces.
Vector< T > & value()
Get the view storing the computed values from the boundary condition.
const Vector< scalar > & valueFraction() const
Get the view storing the fraction of the boundary value.
A class to contain the data and executors for a field and define some basic operations.
ValueType * data()
Direct access to the underlying field data.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor