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_),
57 nBoundaries_(rhs.nBoundaries_), nBoundaryFaces_(rhs.nBoundaryFaces_)
154 return offset_.
data()[patchId + 1] - offset_.
data()[patchId];
164 nBoundaries_ = rhs.nBoundaries_;
165 nBoundaryFaces_ = rhs.nBoundaryFaces_;
168 refValue_ = rhs.refValue_;
169 valueFraction_ = rhs.valueFraction_;
170 refGrad_ = rhs.refGrad_;
171 boundaryTypes_ = rhs.boundaryTypes_;
172 offset_ = rhs.offset_;
181 nBoundaries_ = rhs.nBoundaries_;
182 nBoundaryFaces_ = rhs.nBoundaryFaces_;
184 value_ = std::move(rhs.value_);
185 refValue_ = std::move(rhs.refValue_);
186 valueFraction_ = std::move(rhs.valueFraction_);
187 refGrad_ = std::move(rhs.refGrad_);
188 boundaryTypes_ = std::move(rhs.boundaryTypes_);
189 offset_ = std::move(rhs.offset_);
199 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
localIdx nBoundaryFaces(localIdx patchId) const
Get the number of boundary faces for this patch.
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.
Reference executor for serial CPU execution.
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