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 unsigned int /* qp */, ResidualDatum & /* datum */) const
25  {
26  return _value;
27  }
28 
29 protected:
31 };
32 
33 template <typename DirichletBC>
36 {
38  params.addRequiredParam<Real>("value", "Value of the BC");
39  params.declareControllable("value");
40  return params;
41 }
42 
43 template <typename DirichletBC>
45  : Moose::Kokkos::DirichletBCBase<DirichletBC>(parameters),
46  _value(this->template getParam<Real>("value"))
47 {
48 }
49 
50 class KokkosDirichletBCWrapper final : public KokkosDirichletBC<KokkosDirichletBCWrapper>
51 {
52 public:
54 
56 };
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...
static InputParameters validParams()
Boundary condition of a Dirichlet type.
Definition: DirichletBC.h:19
KOKKOS_FUNCTION Real computeValue(const unsigned int, ResidualDatum &) const
usingKokkosDirichletBCBaseMembers(DirichletBC)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KokkosDirichletBCWrapper(const InputParameters &parameters)
static InputParameters validParams()
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...
The Kokkos object that holds thread-private data in the parallel operations of Kokkos residual object...
Definition: KokkosDatum.h:245
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.