6#include <Kokkos_Core.hpp>
19template<
typename ValueType>
23 std::pair<size_t, size_t> range,
36 refValue[i] = fixedValue;
37 value[i] = fixedValue;
38 internalValues[nInternalFaces + i] = fixedValue;
44template<
typename ValueType>
53 : Base(mesh, dict, patchID), mesh_(mesh), fixedValue_(dict.get<ValueType>(
"fixedValue"))
61 static std::string
name() {
return "fixedValue"; }
63 static std::string
doc() {
return "Set a fixed value on the boundary"; }
65 static std::string
schema() {
return "none"; }
67 virtual std::unique_ptr<SurfaceBoundaryFactory<ValueType>>
clone()
const override
69 return std::make_unique<FixedValue>(*
this);
75 ValueType fixedValue_;
const Vector< T > & refValue() const
Get the view storing the Dirichlet boundary values.
const Vector< T > & value() const
Get the view storing the computed values from the boundary condition.
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
const Vector< ValueType > & internalVector() const
Represents an unstructured mesh in NeoN.
localIdx nInternalFaces() const
Get the number of internal faces in the mesh.
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, const UnstructuredMesh &mesh, std::pair< size_t, size_t > range, ValueType fixedValue)
void parallelFor(const Executor &exec, std::pair< localIdx, localIdx > range, Kernel kernel, std::string name="parallelFor")