https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
KokkosDirichletBCTempl< is_ad > Class Template Reference

#include <KokkosDirichletBC.h>

Inheritance diagram for KokkosDirichletBCTempl< is_ad >:
[legend]

Public Types

using Base = std::conditional_t< is_ad, ADNodalBC, NodalBC >
 

Public Member Functions

 KokkosDirichletBCTempl (const InputParameters &parameters)
 
KOKKOS_FUNCTION Real computeValue (const unsigned int, AssemblyDatum &) const
 
virtual bool preset () const override
 Get whether the value is to be preset. More...
 
virtual void presetSolution (TagID tag) override
 Dispatch solution vector preset. More...
 
template<typename Derived >
KOKKOS_FUNCTION void operator() (PresetLoop, const ThreadID tid, const Derived &bc) const
 The preset function called by Kokkos. More...
 
template<typename Derived >
KOKKOS_FUNCTION auto computeQpResidual (const unsigned int qp, AssemblyDatum &datum) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Attributes

const Moose::Kokkos::Scalar< const Real_value
 

Detailed Description

template<bool is_ad>
class KokkosDirichletBCTempl< is_ad >

Definition at line 15 of file KokkosDirichletBC.h.

Member Typedef Documentation

◆ Base

template<bool is_ad>
using Moose::Kokkos::DirichletBCBaseTempl< is_ad >::Base = std::conditional_t<is_ad, ADNodalBC, NodalBC>
inherited

Definition at line 62 of file KokkosDirichletBCBase.h.

Constructor & Destructor Documentation

◆ KokkosDirichletBCTempl()

template<bool is_ad>
KokkosDirichletBCTempl< is_ad >::KokkosDirichletBCTempl ( const InputParameters parameters)

Member Function Documentation

◆ computeQpResidual()

template<bool is_ad>
template<typename Derived >
KOKKOS_FUNCTION auto Moose::Kokkos::DirichletBCBaseTempl< is_ad >::computeQpResidual ( const unsigned int  qp,
AssemblyDatum datum 
) const
inherited

Definition at line 105 of file KokkosDirichletBCBase.h.

106 {
107  auto bc = static_cast<const Derived *>(this);
108 
109  return _u(datum, qp) - real_type(bc->computeValue(qp, datum));
110 }
std::conditional_t< is_ad, ADReal, Real > real_type

◆ computeValue()

template<bool is_ad>
KOKKOS_FUNCTION Real KokkosDirichletBCTempl< is_ad >::computeValue ( const unsigned  int,
AssemblyDatum  
) const
inline

Definition at line 22 of file KokkosDirichletBC.h.

23  {
24  return _value;
25  }
const Moose::Kokkos::Scalar< const Real > _value

◆ operator()()

template<bool is_ad>
template<typename Derived >
KOKKOS_FUNCTION void Moose::Kokkos::DirichletBCBaseTempl< is_ad >::operator() ( PresetLoop  ,
const ThreadID  tid,
const Derived &  bc 
) const
inherited

The preset function called by Kokkos.

Definition at line 88 of file KokkosDirichletBCBase.h.

89 {
90  auto node = kokkosBoundaryNodeID(tid);
91  auto & sys = kokkosSystem(_kokkos_var.sys());
92  auto dof = sys.getNodeLocalDofIndex(node, 0, _kokkos_var.var());
93 
95  return;
96 
97  AssemblyDatum datum(node, kokkosAssembly(), kokkosSystems(), _kokkos_var, _kokkos_var.var());
98 
99  sys.getVectorDofValue(dof, _solution_tag) = bc.computeValue(0, datum);
100 }
TagID _solution_tag
Tag associated with the solution vector to be preset.
static constexpr dof_id_type invalid_id
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
Definition: KokkosDatum.h:364

◆ preset()

template<bool is_ad>
virtual bool Moose::Kokkos::DirichletBCBaseTempl< is_ad >::preset ( ) const
inlineoverridevirtualinherited

Get whether the value is to be preset.

Returns
Whether the value is to be preset

Definition at line 38 of file KokkosDirichletBCBase.h.

38 { return _preset; }
const bool _preset
Flag whether the value is to be preset.

◆ presetSolution()

template<bool is_ad>
virtual void Moose::Kokkos::DirichletBCBaseTempl< is_ad >::presetSolution ( TagID  tag)
overridevirtualinherited

Dispatch solution vector preset.

Parameters
tagThe tag associated with the solution vector to be preset

◆ validParams()

template<bool is_ad>
static InputParameters KokkosDirichletBCTempl< is_ad >::validParams ( )
static

Member Data Documentation

◆ _value

template<bool is_ad>
const Moose::Kokkos::Scalar<const Real> KokkosDirichletBCTempl< is_ad >::_value
protected

Definition at line 28 of file KokkosDirichletBC.h.

Referenced by KokkosDirichletBCTempl< is_ad >::computeValue().


The documentation for this class was generated from the following file: