https://mooseframework.inl.gov
KokkosDirichletBC.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "KokkosDirichletBCBase.h"
13 
14 template <typename DirichletBC>
16 {
18 
19 public:
21 
23 
24  KOKKOS_FUNCTION Real computeValue(const ContiguousNodeID /* node */) const { return _value; }
25 
26 protected:
28 };
29 
30 template <typename DirichletBC>
33 {
35  params.addRequiredParam<Real>("value", "Value of the BC");
36  params.declareControllable("value");
37  return params;
38 }
39 
40 template <typename DirichletBC>
42  : Moose::Kokkos::DirichletBCBase<DirichletBC>(parameters),
43  _value(this->template getParam<Real>("value"))
44 {
45 }
46 
47 class KokkosDirichletBCKernel final : public KokkosDirichletBC<KokkosDirichletBCKernel>
48 {
49 public:
51 
53 };
54 
55 #define usingKokkosDirichletBCMembers(T) \
56  usingKokkosDirichletBCBaseMembers(T); \
57  \
58 protected: \
59  using KokkosDirichletBC<T>::_value
KokkosDirichletBCKernel(const InputParameters &parameters)
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
KokkosDirichletBC(const InputParameters &parameters)
Base boundary condition of a Dirichlet type.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
dof_id_type ContiguousNodeID
Definition: KokkosMesh.h:21
KOKKOS_FUNCTION Real computeValue(const ContiguousNodeID) const
static InputParameters validParams()
Boundary condition of a Dirichlet type.
Definition: DirichletBC.h:19
usingKokkosDirichletBCBaseMembers(DirichletBC)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Moose::Kokkos::Scalar< const Real > _value
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.
The base Kokkos boundary condition of a Dirichlet type.