7#include <Kokkos_Core.hpp>
20template<
typename ValueType>
22 Field<ValueType>& domainVector, std::pair<size_t, size_t> range, ValueType fixedValue
25 auto refValue = domainVector.
boundaryData().refValue().view();
32 refValue[i] = fixedValue;
33 value[i] = fixedValue;
35 "setFixedValueSurface"
40template<
typename ValueType>
49 : Base(mesh, dict, patchID), fixedValue_(dict.get<ValueType>(
"fixedValue"))
57 static std::string
name() {
return "fixedValue"; }
59 static std::string
doc() {
return "Set a fixed value on the boundary"; }
61 static std::string
schema() {
return "none"; }
63 virtual std::unique_ptr<SurfaceBoundaryFactory<ValueType>>
clone()
const override
65 return std::make_unique<FixedValue>(*
this);
70 ValueType fixedValue_;
A class representing a dictionary that stores key-value pairs.
Represents the domain fields for a computational domain.
const BoundaryData< ValueType > & boundaryData() const
const Executor & exec() const
Represents an unstructured mesh in NeoN.
virtual std::unique_ptr< SurfaceBoundaryFactory< ValueType > > clone() const override
FixedValue(const UnstructuredMesh &mesh, const Dictionary &dict, localIdx patchID)
virtual void correctBoundaryCondition(Field< ValueType > &domainVector) override
static std::string schema()
static std::string name()
A template class for registering derived classes with a base class.
void setFixedValue(Field< ValueType > &domainVector, std::pair< size_t, size_t > range, ValueType fixedValue)
void parallelFor(const ExecutorType &, std::pair< localIdx, localIdx > range, const Kernel &kernel, std::string name)