https://mooseframework.inl.gov
Public Member Functions | List of all members
Moose::Kokkos::VariableShapeGradient< is_test > Class Template Reference

#include <KokkosVariableValue.h>

Public Member Functions

KOKKOS_FUNCTION Real3 operator() (AssemblyDatum &datum, unsigned int i, unsigned int qp) const
 Get the gradient of the current shape function. More...
 
KOKKOS_FUNCTION const Real3reference (AssemblyDatum &datum, unsigned int i, unsigned int qp) const
 Get the gradient of the current shape function in reference space. More...
 

Detailed Description

template<bool is_test>
class Moose::Kokkos::VariableShapeGradient< is_test >

Definition at line 63 of file KokkosVariableValue.h.

Member Function Documentation

◆ operator()()

template<bool is_test>
KOKKOS_FUNCTION Real3 Moose::Kokkos::VariableShapeGradient< is_test >::operator() ( AssemblyDatum datum,
unsigned int  i,
unsigned int  qp 
) const
inline

Get the gradient of the current shape function.

Parameters
datumThe AssemblyDatum object of the current thread
iThe element-local DOF index
qpThe local quadrature point index
Returns
The gradient of the shape function

Definition at line 83 of file KokkosVariableValue.h.

84  {
85  return datum.J(qp) * reference(datum, i, qp);
86  }
KOKKOS_FUNCTION const Real33 & J(const unsigned int qp)
Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz d...
Definition: KokkosDatum.h:495
KOKKOS_FUNCTION const Real3 & reference(AssemblyDatum &datum, unsigned int i, unsigned int qp) const
Get the gradient of the current shape function in reference space.

◆ reference()

template<bool is_test>
KOKKOS_FUNCTION const Real3 & Moose::Kokkos::VariableShapeGradient< is_test >::reference ( AssemblyDatum datum,
unsigned int  i,
unsigned int  qp 
) const

Get the gradient of the current shape function in reference space.

Parameters
datumThe AssemblyDatum object of the current thread
iThe element-local DOF index
qpThe local quadrature point index
Returns
The reference-space gradient of the shape function

Definition at line 91 of file KokkosVariableValue.h.

Referenced by Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), and Moose::Kokkos::VariableShapeGradient< is_test >::operator()().

94 {
95  auto & elem = datum.elem();
96  auto side = datum.side();
97  auto fe = is_test ? datum.ife() : datum.jfe();
98 
99  return side == libMesh::invalid_uint
100  ? datum.assembly().getGradPhi(elem.subdomain, elem.type, fe)(i, qp)
101  : datum.assembly().getGradPhiFace(elem.subdomain, elem.type, fe)(side)(i, qp);
102 }
const unsigned int invalid_uint
KOKKOS_FUNCTION const auto & getGradPhiFace(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of face shape functions of a FE type for an element type and subdomain.
KOKKOS_FUNCTION const auto & getGradPhi(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of shape functions of a FE type for an element type and subdomain.
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
Definition: KokkosDatum.h:79
KOKKOS_FUNCTION unsigned int jfe() const
Get the coupled variable FE type ID.
Definition: KokkosDatum.h:666
KOKKOS_FUNCTION const Assembly & assembly() const
Get the Kokkos assembly.
Definition: KokkosDatum.h:274
KOKKOS_FUNCTION unsigned int ife() const
Get the variable FE type ID.
Definition: KokkosDatum.h:661
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
Definition: KokkosDatum.h:46

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