https://mooseframework.inl.gov
Public Member Functions | Protected Attributes | List of all members
Moose::Kokkos::AssemblyDatum Class Reference

The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels. More...

#include <KokkosDatum.h>

Inheritance diagram for Moose::Kokkos::AssemblyDatum:
[legend]

Public Member Functions

KOKKOS_FUNCTION AssemblyDatum (const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< System > &systems, const Variable &ivar, const unsigned int jvar, const unsigned int comp=0)
 Constructor for element and side data. More...
 
KOKKOS_FUNCTION AssemblyDatum (const ContiguousNodeID node, const Assembly &assembly, const Array< System > &systems, const Variable &ivar, const unsigned int jvar, const unsigned int comp=0)
 Constructor for node data. More...
 
KOKKOS_FUNCTION unsigned int n_dofs () const
 Get the number of local DOFs. More...
 
KOKKOS_FUNCTION unsigned int n_idofs () const
 Get the number of local DOFs. More...
 
KOKKOS_FUNCTION unsigned int n_jdofs () const
 Get the number of local DOFs for the coupled variable. More...
 
KOKKOS_FUNCTION unsigned int sys () const
 Get the system number of variable. More...
 
KOKKOS_FUNCTION unsigned int var () const
 Get the variable number. More...
 
KOKKOS_FUNCTION unsigned int ivar () const
 Get the variable number. More...
 
KOKKOS_FUNCTION unsigned int jvar () const
 Get the coupled variable number. More...
 
KOKKOS_FUNCTION unsigned int fe () const
 Get the variable FE type ID. More...
 
KOKKOS_FUNCTION unsigned int ife () const
 Get the variable FE type ID. More...
 
KOKKOS_FUNCTION unsigned int jfe () const
 Get the coupled variable FE type ID. More...
 
KOKKOS_FUNCTION void do_derivatives (const bool flag)
 Set whether to compute derivatives for automatic differentiation (AD) More...
 
KOKKOS_FUNCTION bool do_derivatives () const
 Get whether to compute derivatives for automatic differentiation (AD) More...
 
KOKKOS_FUNCTION const Assemblyassembly () const
 Get the Kokkos assembly. More...
 
KOKKOS_FUNCTION const Systemsystem (unsigned int sys) const
 Get the Kokkos system. More...
 
KOKKOS_FUNCTION const Meshmesh () const
 Get the Kokkos mesh. More...
 
KOKKOS_FUNCTION const ElementInfoelem () const
 Get the element information object. More...
 
KOKKOS_FUNCTION ContiguousElementID elemID () const
 Get the contiguous element ID. More...
 
KOKKOS_FUNCTION dof_id_type extraElemID (unsigned int index) const
 Get the extra element ID. More...
 
KOKKOS_FUNCTION ContiguousSubdomainID subdomain () const
 Get the contiguous subdomain ID. More...
 
KOKKOS_FUNCTION unsigned int side () const
 Get the side index. More...
 
KOKKOS_FUNCTION ContiguousNodeID node () const
 Get the contiguous node ID. More...
 
KOKKOS_FUNCTION unsigned int n_qps () const
 Get the number of local quadrature points. More...
 
KOKKOS_FUNCTION dof_id_type qpOffset () const
 Get the starting offset into the global quadrature point index. More...
 
KOKKOS_FUNCTION dof_id_type propertyIdx (const PropertyConstantOption constant_option, const unsigned int qp) const
 Get the index into the property data storage. More...
 
KOKKOS_FUNCTION bool hasNeighbor () const
 Get whether the current side has a neighbor. More...
 
KOKKOS_FUNCTION bool isSide () const
 Get whether the current datum is on a side. More...
 
KOKKOS_FUNCTION bool isNodal () const
 Get whether the current datum is on a node. More...
 
KOKKOS_FUNCTION bool isNodalDefined (const Variable &var) const
 Get whether the a variable is defined on the current node. More...
 
KOKKOS_FUNCTION const Real33J (const unsigned int qp)
 Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz deta/dz dzeta/dz |. More...
 
KOKKOS_FUNCTION Real JxW (const unsigned int qp)
 Get the transformed Jacobian weight. More...
 
KOKKOS_FUNCTION Real3 q_point (const unsigned int qp)
 Get the physical quadrature point coordinate. More...
 
KOKKOS_FUNCTION Real3 normals (const unsigned int qp)
 Get the normal vector on surface. More...
 
KOKKOS_FUNCTION void set_local_parallel (const unsigned int local_thread_id, const unsigned int num_local_threads)
 Set local parallelization option. More...
 
KOKKOS_FUNCTION unsigned int local_thread_id () const
 Get the current local thread ID. More...
 
KOKKOS_FUNCTION unsigned int num_local_threads () const
 Get the number of local threads. More...
 

Protected Attributes

const TagID _tag
 Solution tag ID. More...
 
const unsigned int _sys
 System number. More...
 
const unsigned int _ivar
 Variable numbers. More...
 
const unsigned int _jvar
 
const unsigned int _ife
 FE type IDs of variables. More...
 
const unsigned int _jfe
 
const unsigned int _n_idofs = 1
 Number of local DOFs. More...
 
const unsigned int _n_jdofs = 1
 
bool _do_derivatives = true
 Whether to compute derivatives for automatic differentiation (AD) More...
 
const Assembly_assembly
 Reference of the Kokkos assembly. More...
 
const Array< System > & _systems
 Reference of the Kokkos systems. More...
 
const Mesh_mesh
 Reference of the Kokkos mesh. More...
 
const ElementInfo _elem
 Current element information object. More...
 
const unsigned int _side = libMesh::invalid_uint
 Current side index. More...
 
const ContiguousNodeID _node = libMesh::DofObject::invalid_id
 Current contiguous node ID. More...
 
const ContiguousElementID _neighbor = libMesh::DofObject::invalid_id
 Current contiguous element ID of neighbor. More...
 
const unsigned int _n_qps = 1
 Number of local quadrature points. More...
 
const dof_id_type _qp_offset = libMesh::DofObject::invalid_id
 Starting offset into the global quadrature point index. More...
 
const dof_id_type _elem_property_idx = libMesh::DofObject::invalid_id
 Index for element-constant material properties. More...
 

Detailed Description

The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels.

Definition at line 364 of file KokkosDatum.h.

Constructor & Destructor Documentation

◆ AssemblyDatum() [1/2]

KOKKOS_FUNCTION Moose::Kokkos::AssemblyDatum::AssemblyDatum ( const ContiguousElementID  elem,
const unsigned int  side,
const Assembly assembly,
const Array< System > &  systems,
const Variable ivar,
const unsigned int  jvar,
const unsigned int  comp = 0 
)
inline

Constructor for element and side data.

Parameters
elemThe contiguous element ID of the current thread
sideThe side index of the current thread
assemblyThe Kokkos assembly
systemsThe Kokkos systems
ivarThe Kokkos variable
jvarThe coupled variable number
compThe variable component

Definition at line 378 of file KokkosDatum.h.

385  : Datum(elem, side, assembly, systems),
386  _tag(ivar.tag()),
387  _sys(ivar.sys(comp)),
388  _ivar(ivar.var(comp)),
389  _jvar(jvar),
390  _ife(systems[ivar.sys(comp)].getFETypeID(_ivar)),
391  _jfe(systems[ivar.sys(comp)].getFETypeID(_jvar)),
394  {
395  }
const unsigned int _sys
System number.
Definition: KokkosDatum.h:491
const unsigned int _n_jdofs
Definition: KokkosDatum.h:503
const unsigned int _jvar
Definition: KokkosDatum.h:495
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
Definition: KokkosDatum.h:456
KOKKOS_FUNCTION unsigned int getNumDofs(unsigned int elem_type, unsigned int fe_type) const
Get the number of DOFs of a FE type for an element type.
KOKKOS_FUNCTION unsigned int ivar() const
Get the variable number.
Definition: KokkosDatum.h:451
const ElementInfo _elem
Current element information object.
Definition: KokkosDatum.h:220
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
Definition: KokkosDatum.h:108
const unsigned int _jfe
Definition: KokkosDatum.h:499
const unsigned int _n_idofs
Number of local DOFs.
Definition: KokkosDatum.h:503
unsigned int type
Element type ID.
Definition: KokkosMesh.h:38
KOKKOS_FUNCTION const Assembly & assembly() const
Get the Kokkos assembly.
Definition: KokkosDatum.h:67
const TagID _tag
Solution tag ID.
Definition: KokkosDatum.h:487
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
Definition: KokkosDatum.h:84
KOKKOS_FUNCTION Datum(const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< System > &systems)
Constructor for element and side data.
Definition: KokkosDatum.h:34
const unsigned int _ivar
Variable numbers.
Definition: KokkosDatum.h:495
const unsigned int _ife
FE type IDs of variables.
Definition: KokkosDatum.h:499

◆ AssemblyDatum() [2/2]

KOKKOS_FUNCTION Moose::Kokkos::AssemblyDatum::AssemblyDatum ( const ContiguousNodeID  node,
const Assembly assembly,
const Array< System > &  systems,
const Variable ivar,
const unsigned int  jvar,
const unsigned int  comp = 0 
)
inline

Constructor for node data.

Parameters
elemThe contiguous element ID of the current thread
assemblyThe Kokkos assembly
systemsThe Kokkos systems
ivarThe Kokkos variable
jvarThe coupled variable number
compThe variable component

Definition at line 406 of file KokkosDatum.h.

412  : Datum(node, assembly, systems),
413  _tag(ivar.tag()),
414  _sys(ivar.sys(comp)),
415  _ivar(ivar.var(comp)),
416  _jvar(jvar),
417  _ife(systems[ivar.sys(comp)].getFETypeID(_ivar)),
418  _jfe(systems[ivar.sys(comp)].getFETypeID(_jvar))
419  {
420  }
const unsigned int _sys
System number.
Definition: KokkosDatum.h:491
const unsigned int _jvar
Definition: KokkosDatum.h:495
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
Definition: KokkosDatum.h:456
KOKKOS_FUNCTION unsigned int ivar() const
Get the variable number.
Definition: KokkosDatum.h:451
const unsigned int _jfe
Definition: KokkosDatum.h:499
KOKKOS_FUNCTION const Assembly & assembly() const
Get the Kokkos assembly.
Definition: KokkosDatum.h:67
const TagID _tag
Solution tag ID.
Definition: KokkosDatum.h:487
KOKKOS_FUNCTION ContiguousNodeID node() const
Get the contiguous node ID.
Definition: KokkosDatum.h:113
KOKKOS_FUNCTION Datum(const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< System > &systems)
Constructor for element and side data.
Definition: KokkosDatum.h:34
const unsigned int _ivar
Variable numbers.
Definition: KokkosDatum.h:495
const unsigned int _ife
FE type IDs of variables.
Definition: KokkosDatum.h:499

Member Function Documentation

◆ assembly()

KOKKOS_FUNCTION const Assembly& Moose::Kokkos::Datum::assembly ( ) const
inlineinherited

Get the Kokkos assembly.

Returns
The Kokkos assembly

Definition at line 67 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariablePhiValue::operator()(), Moose::Kokkos::VariablePhiGradient::operator()(), Moose::Kokkos::VariableTestValue::operator()(), and Moose::Kokkos::VariableTestGradient::operator()().

67 { return _assembly; }
const Assembly & _assembly
Reference of the Kokkos assembly.
Definition: KokkosDatum.h:208

◆ do_derivatives() [1/2]

KOKKOS_FUNCTION void Moose::Kokkos::AssemblyDatum::do_derivatives ( const bool  flag)
inline

Set whether to compute derivatives for automatic differentiation (AD)

Parameters
flagWhether to compute derivatives

Definition at line 476 of file KokkosDatum.h.

Referenced by Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::VariableValueTempl< is_ad >::operator()(), and Moose::Kokkos::VariableGradientTempl< is_ad >::operator()().

476 { _do_derivatives = flag; }
bool _do_derivatives
Whether to compute derivatives for automatic differentiation (AD)
Definition: KokkosDatum.h:507

◆ do_derivatives() [2/2]

KOKKOS_FUNCTION bool Moose::Kokkos::AssemblyDatum::do_derivatives ( ) const
inline

Get whether to compute derivatives for automatic differentiation (AD)

Returns
Whether to compute derivatives

Definition at line 481 of file KokkosDatum.h.

481 { return _do_derivatives; }
bool _do_derivatives
Whether to compute derivatives for automatic differentiation (AD)
Definition: KokkosDatum.h:507

◆ elem()

KOKKOS_FUNCTION const ElementInfo& Moose::Kokkos::Datum::elem ( ) const
inlineinherited

◆ elemID()

KOKKOS_FUNCTION ContiguousElementID Moose::Kokkos::Datum::elemID ( ) const
inlineinherited

Get the contiguous element ID.

Returns
The contiguous element ID

Definition at line 89 of file KokkosDatum.h.

Referenced by KokkosExtraIDIntegralVectorPostprocessor::execute(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

89 { return _elem.id; }
const ElementInfo _elem
Current element information object.
Definition: KokkosDatum.h:220
ContiguousElementID id
Contiguous element ID.
Definition: KokkosMesh.h:42

◆ extraElemID()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::extraElemID ( unsigned int  index) const
inlineinherited

Get the extra element ID.

Parameters
indexThe extra element ID index
Returns
The extra element ID

Definition at line 95 of file KokkosDatum.h.

Referenced by KokkosExtraElementIDAux::computeValue().

96  {
98  }
const ElementInfo _elem
Current element information object.
Definition: KokkosDatum.h:220
const Mesh & _mesh
Reference of the Kokkos mesh.
Definition: KokkosDatum.h:216
static constexpr dof_id_type invalid_id
KOKKOS_FUNCTION dof_id_type getExtraElementID(ContiguousElementID elem, unsigned int index) const
Get the extra element ID of an element.
Definition: KokkosMesh.h:228
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:146
ContiguousElementID id
Contiguous element ID.
Definition: KokkosMesh.h:42

◆ fe()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::fe ( ) const
inline

Get the variable FE type ID.

Returns
The variable FE type ID

Definition at line 461 of file KokkosDatum.h.

461 { return _ife; }
const unsigned int _ife
FE type IDs of variables.
Definition: KokkosDatum.h:499

◆ hasNeighbor()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::hasNeighbor ( ) const
inlineinherited

Get whether the current side has a neighbor.

Returns
Whether the current side has a neighbor

Definition at line 136 of file KokkosDatum.h.

static constexpr dof_id_type invalid_id
const ContiguousElementID _neighbor
Current contiguous element ID of neighbor.
Definition: KokkosDatum.h:232

◆ ife()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::ife ( ) const
inline

Get the variable FE type ID.

Returns
The variable FE type ID

Definition at line 466 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariableTestValue::operator()(), and Moose::Kokkos::VariableTestGradient::operator()().

466 { return _ife; }
const unsigned int _ife
FE type IDs of variables.
Definition: KokkosDatum.h:499

◆ isNodal()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::isNodal ( ) const
inlineinherited

Get whether the current datum is on a node.

Returns
Whether the current datum is on a node

Definition at line 146 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::extraElemID(), Moose::Kokkos::VariableValueTempl< is_ad >::get(), Moose::Kokkos::VariableGradientTempl< is_ad >::get(), Moose::Kokkos::Datum::isNodalDefined(), Moose::Kokkos::Datum::J(), Moose::Kokkos::Datum::JxW(), and Moose::Kokkos::Datum::q_point().

static constexpr dof_id_type invalid_id
const ContiguousNodeID _node
Current contiguous node ID.
Definition: KokkosDatum.h:228

◆ isNodalDefined()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::isNodalDefined ( const Variable var) const
inlineinherited

Get whether the a variable is defined on the current node.

Parameters
varThe variable
Returns
Whether the variable is defined on the current node

Definition at line 291 of file KokkosDatum.h.

Referenced by KokkosNodalExtremeValue::reduce(), KokkosNodalSum::reduce(), and KokkosNodalMaxValueId::reduce().

292 {
293  if (!isNodal() || !var.nodal())
294  return false;
295 
296  return _systems[var.sys()].isNodalDefined(_node, var.var());
297 }
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:146
const Array< System > & _systems
Reference of the Kokkos systems.
Definition: KokkosDatum.h:212
const ContiguousNodeID _node
Current contiguous node ID.
Definition: KokkosDatum.h:228

◆ isSide()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::isSide ( ) const
inlineinherited

Get whether the current datum is on a side.

Returns
Whether the current datum is on a side

Definition at line 141 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::normals(), and Moose::Kokkos::Datum::reinitTransform().

141 { return _side != libMesh::invalid_uint; }
const unsigned int invalid_uint
const unsigned int _side
Current side index.
Definition: KokkosDatum.h:224

◆ ivar()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::ivar ( ) const
inline

Get the variable number.

Returns
The variable number

Definition at line 451 of file KokkosDatum.h.

451 { return _ivar; }
const unsigned int _ivar
Variable numbers.
Definition: KokkosDatum.h:495

◆ J()

KOKKOS_FUNCTION const Real33 & Moose::Kokkos::Datum::J ( const unsigned int  qp)
inlineinherited

Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz deta/dz dzeta/dz |.

Parameters
qpThe local quadrature point index
Returns
The Jacobian matrix

Definition at line 300 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariableGradientTempl< is_ad >::get(), Moose::Kokkos::VariablePhiGradient::operator()(), and Moose::Kokkos::VariableTestGradient::operator()().

301 {
302  if (!isNodal())
303  reinitTransform(qp);
304  else
306 
307  return _J;
308 }
const Assembly & _assembly
Reference of the Kokkos assembly.
Definition: KokkosDatum.h:208
KOKKOS_INLINE_FUNCTION void identity(const unsigned int dim=3)
Definition: KokkosTypes.h:352
KOKKOS_FUNCTION unsigned int getDimension() const
Get the mesh dimension.
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
Definition: KokkosDatum.h:344
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:146
Real33 _J
Cached physical transformation data.
Definition: KokkosDatum.h:262

◆ jfe()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::jfe ( ) const
inline

Get the coupled variable FE type ID.

Returns
The variable FE type ID

Definition at line 471 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariablePhiValue::operator()(), and Moose::Kokkos::VariablePhiGradient::operator()().

471 { return _jfe; }
const unsigned int _jfe
Definition: KokkosDatum.h:499

◆ jvar()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::jvar ( ) const
inline

◆ JxW()

KOKKOS_FUNCTION Real Moose::Kokkos::Datum::JxW ( const unsigned int  qp)
inlineinherited

Get the transformed Jacobian weight.

Parameters
qpThe local quadrature point index
Returns
The transformed Jacobian weights

Definition at line 311 of file KokkosDatum.h.

Referenced by Moose::Kokkos::AuxKernel::computeElementInternal(), KokkosTimeDerivative::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::IntegratedBC::computeJacobianInternal(), Moose::Kokkos::Kernel::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::Kernel::computeOffDiagJacobianInternal(), KokkosTimeDerivative::computeResidualInternal(), Moose::Kokkos::TimeKernel::computeResidualInternal(), Moose::Kokkos::ADKernel::computeResidualInternal(), Moose::Kokkos::ADIntegratedBC::computeResidualInternal(), Moose::Kokkos::KernelValue::computeResidualInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), Moose::Kokkos::IntegratedBCValue::computeResidualInternal(), Moose::Kokkos::Kernel::computeResidualInternal(), Moose::Kokkos::IntegratedBC::computeResidualInternal(), KokkosElementVariableStatistics::computeValue(), KokkosExtraIDIntegralVectorPostprocessor::execute(), KokkosIntegralPostprocessor< Base >::reduce(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

312 {
313  if (!isNodal())
314  reinitTransform(qp);
315  else
316  _JxW = 1;
317 
318  return _JxW;
319 }
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
Definition: KokkosDatum.h:344
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:146

◆ local_thread_id()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::local_thread_id ( ) const
inlineinherited

◆ mesh()

KOKKOS_FUNCTION const Mesh& Moose::Kokkos::Datum::mesh ( ) const
inlineinherited

Get the Kokkos mesh.

Returns
The Kokkos mesh

Definition at line 78 of file KokkosDatum.h.

78 { return _mesh; }
const Mesh & _mesh
Reference of the Kokkos mesh.
Definition: KokkosDatum.h:216

◆ n_dofs()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::n_dofs ( ) const
inline

◆ n_idofs()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::n_idofs ( ) const
inline

Get the number of local DOFs.

Returns
The number of local DOFs

Definition at line 431 of file KokkosDatum.h.

Referenced by KokkosTimeDerivative::computeJacobianInternal(), and Moose::Kokkos::ResidualObject::computeJacobianInternal().

431 { return _n_idofs; }
const unsigned int _n_idofs
Number of local DOFs.
Definition: KokkosDatum.h:503

◆ n_jdofs()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::n_jdofs ( ) const
inline

Get the number of local DOFs for the coupled variable.

Returns
The number of local DOFs

Definition at line 436 of file KokkosDatum.h.

Referenced by KokkosTimeDerivative::computeJacobianInternal(), and Moose::Kokkos::ResidualObject::computeJacobianInternal().

436 { return _n_jdofs; }
const unsigned int _n_jdofs
Definition: KokkosDatum.h:503

◆ n_qps()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::n_qps ( ) const
inlineinherited

Get the number of local quadrature points.

Returns
The number of local quadrature points

Definition at line 118 of file KokkosDatum.h.

Referenced by Moose::Kokkos::AuxKernel::computeElementInternal(), KokkosTimeDerivative::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::IntegratedBC::computeJacobianInternal(), Moose::Kokkos::Kernel::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::Kernel::computeOffDiagJacobianInternal(), KokkosTimeDerivative::computeResidualInternal(), Moose::Kokkos::TimeKernel::computeResidualInternal(), Moose::Kokkos::ADKernel::computeResidualInternal(), Moose::Kokkos::ADIntegratedBC::computeResidualInternal(), Moose::Kokkos::KernelValue::computeResidualInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), Moose::Kokkos::IntegratedBCValue::computeResidualInternal(), Moose::Kokkos::Kernel::computeResidualInternal(), Moose::Kokkos::IntegratedBC::computeResidualInternal(), KokkosElementVariableStatistics::computeValue(), KokkosExtraIDIntegralVectorPostprocessor::execute(), Moose::Kokkos::Material::operator()(), KokkosSideExtremeValue::reduce(), KokkosElementExtremeValue::reduce(), KokkosIntegralPostprocessor< Base >::reduce(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

118 { return _n_qps; }
const unsigned int _n_qps
Number of local quadrature points.
Definition: KokkosDatum.h:236

◆ node()

KOKKOS_FUNCTION ContiguousNodeID Moose::Kokkos::Datum::node ( ) const
inlineinherited

◆ normals()

KOKKOS_FUNCTION Real3 Moose::Kokkos::Datum::normals ( const unsigned int  qp)
inlineinherited

Get the normal vector on surface.

Parameters
qpThe local quadrature point index
Returns
The normal vector

Definition at line 333 of file KokkosDatum.h.

Referenced by KokkosDirectionalNeumannBC::computeQpResidual().

334 {
335  KOKKOS_ASSERT(isSide());
336 
337  if (isSide())
338  reinitTransform(qp);
339 
340  return _normal;
341 }
KOKKOS_FUNCTION bool isSide() const
Get whether the current datum is on a side.
Definition: KokkosDatum.h:141
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
Definition: KokkosDatum.h:344

◆ num_local_threads()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::num_local_threads ( ) const
inlineinherited

◆ propertyIdx()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::propertyIdx ( const PropertyConstantOption  constant_option,
const unsigned int  qp 
) const
inlineinherited

Get the index into the property data storage.

Parameters
constant_optionThe property constant option
qpThe local quadrature point index
Returns
The index

Definition at line 278 of file KokkosDatum.h.

279 {
280  dof_id_type idx = 0;
281 
282  if (constant_option == PropertyConstantOption::NONE)
283  idx = _qp_offset + qp;
284  else if (constant_option == PropertyConstantOption::ELEMENT)
286 
287  return idx;
288 }
const dof_id_type _elem_property_idx
Index for element-constant material properties.
Definition: KokkosDatum.h:244
const dof_id_type _qp_offset
Starting offset into the global quadrature point index.
Definition: KokkosDatum.h:240
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
uint8_t dof_id_type

◆ q_point()

KOKKOS_FUNCTION Real3 Moose::Kokkos::Datum::q_point ( const unsigned int  qp)
inlineinherited

Get the physical quadrature point coordinate.

Parameters
qpThe local quadrature point index
Returns
The physical quadrature point coordinate

Definition at line 322 of file KokkosDatum.h.

Referenced by KokkosParsedMaterial::computeQpProperties(), KokkosFunctionAux::computeValue(), and KokkosParsedAux::computeValue().

323 {
324  if (!isNodal())
325  reinitTransform(qp);
326  else
328 
329  return _xyz;
330 }
const Assembly & _assembly
Reference of the Kokkos assembly.
Definition: KokkosDatum.h:208
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
Definition: KokkosDatum.h:344
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
Definition: KokkosMesh.h:272
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
Definition: KokkosMesh.h:452
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:146
const ContiguousNodeID _node
Current contiguous node ID.
Definition: KokkosDatum.h:228

◆ qpOffset()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::qpOffset ( ) const
inlineinherited

Get the starting offset into the global quadrature point index.

Returns
The starting offset

Definition at line 123 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariableValueTempl< is_ad >::get(), and Moose::Kokkos::VariableGradientTempl< is_ad >::get().

123 { return _qp_offset; }
const dof_id_type _qp_offset
Starting offset into the global quadrature point index.
Definition: KokkosDatum.h:240

◆ set_local_parallel()

KOKKOS_FUNCTION void Moose::Kokkos::Datum::set_local_parallel ( const unsigned int  local_thread_id,
const unsigned int  num_local_threads 
)
inlineinherited

Set local parallelization option.

Parameters
local_thread_idThe current local thread ID
num_local_threadsThe number of local threads

Definition at line 187 of file KokkosDatum.h.

Referenced by Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::Kernel::operator()(), and Moose::Kokkos::IntegratedBC::operator()().

189  {
192  }
unsigned int _local_thread_id
Thread ID for local parallelization.
Definition: KokkosDatum.h:270
unsigned int _num_local_threads
Number of threads for local parallelization.
Definition: KokkosDatum.h:274
KOKKOS_FUNCTION unsigned int num_local_threads() const
Get the number of local threads.
Definition: KokkosDatum.h:202
KOKKOS_FUNCTION unsigned int local_thread_id() const
Get the current local thread ID.
Definition: KokkosDatum.h:197

◆ side()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::side ( ) const
inlineinherited

◆ subdomain()

KOKKOS_FUNCTION ContiguousSubdomainID Moose::Kokkos::Datum::subdomain ( ) const
inlineinherited

Get the contiguous subdomain ID.

Returns
The contiguous subdomain ID

Definition at line 103 of file KokkosDatum.h.

Referenced by KokkosExtraIDIntegralVectorPostprocessor::execute(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

103 { return _elem.subdomain; }
const ElementInfo _elem
Current element information object.
Definition: KokkosDatum.h:220
ContiguousSubdomainID subdomain
Contiguous subdomain ID.
Definition: KokkosMesh.h:46

◆ sys()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::sys ( ) const
inline

Get the system number of variable.

Returns
The system number of variable

Definition at line 441 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariableValueTempl< is_ad >::operator()(), and Moose::Kokkos::VariableGradientTempl< is_ad >::operator()().

441 { return _sys; }
const unsigned int _sys
System number.
Definition: KokkosDatum.h:491

◆ system()

KOKKOS_FUNCTION const System& Moose::Kokkos::Datum::system ( unsigned int  sys) const
inlineinherited

Get the Kokkos system.

Parameters
sysThe system number
Returns
The Kokkos system

Definition at line 73 of file KokkosDatum.h.

Referenced by Moose::Kokkos::VariableValueTempl< is_ad >::get(), and Moose::Kokkos::VariableGradientTempl< is_ad >::get().

73 { return _systems[sys]; }
const Array< System > & _systems
Reference of the Kokkos systems.
Definition: KokkosDatum.h:212

◆ var()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::AssemblyDatum::var ( ) const
inline

Get the variable number.

Returns
The variable number

Definition at line 446 of file KokkosDatum.h.

446 { return _ivar; }
const unsigned int _ivar
Variable numbers.
Definition: KokkosDatum.h:495

Member Data Documentation

◆ _assembly

const Assembly& Moose::Kokkos::Datum::_assembly
protectedinherited

◆ _do_derivatives

bool Moose::Kokkos::AssemblyDatum::_do_derivatives = true
protected

Whether to compute derivatives for automatic differentiation (AD)

Definition at line 507 of file KokkosDatum.h.

Referenced by do_derivatives().

◆ _elem

const ElementInfo Moose::Kokkos::Datum::_elem
protectedinherited

◆ _elem_property_idx

const dof_id_type Moose::Kokkos::Datum::_elem_property_idx = libMesh::DofObject::invalid_id
protectedinherited

Index for element-constant material properties.

Definition at line 244 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::propertyIdx().

◆ _ife

const unsigned int Moose::Kokkos::AssemblyDatum::_ife
protected

FE type IDs of variables.

Definition at line 499 of file KokkosDatum.h.

Referenced by fe(), and ife().

◆ _ivar

const unsigned int Moose::Kokkos::AssemblyDatum::_ivar
protected

Variable numbers.

Definition at line 495 of file KokkosDatum.h.

Referenced by ivar(), and var().

◆ _jfe

const unsigned int Moose::Kokkos::AssemblyDatum::_jfe
protected

Definition at line 499 of file KokkosDatum.h.

Referenced by jfe().

◆ _jvar

const unsigned int Moose::Kokkos::AssemblyDatum::_jvar
protected

Definition at line 495 of file KokkosDatum.h.

Referenced by jvar().

◆ _mesh

const Mesh& Moose::Kokkos::Datum::_mesh
protectedinherited

Reference of the Kokkos mesh.

Definition at line 216 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::extraElemID(), and Moose::Kokkos::Datum::mesh().

◆ _n_idofs

const unsigned int Moose::Kokkos::AssemblyDatum::_n_idofs = 1
protected

Number of local DOFs.

Definition at line 503 of file KokkosDatum.h.

Referenced by n_dofs(), and n_idofs().

◆ _n_jdofs

const unsigned int Moose::Kokkos::AssemblyDatum::_n_jdofs = 1
protected

Definition at line 503 of file KokkosDatum.h.

Referenced by n_jdofs().

◆ _n_qps

const unsigned int Moose::Kokkos::Datum::_n_qps = 1
protectedinherited

Number of local quadrature points.

Definition at line 236 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::n_qps().

◆ _neighbor

const ContiguousElementID Moose::Kokkos::Datum::_neighbor = libMesh::DofObject::invalid_id
protectedinherited

Current contiguous element ID of neighbor.

Definition at line 232 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::hasNeighbor().

◆ _node

const ContiguousNodeID Moose::Kokkos::Datum::_node = libMesh::DofObject::invalid_id
protectedinherited

◆ _qp_offset

const dof_id_type Moose::Kokkos::Datum::_qp_offset = libMesh::DofObject::invalid_id
protectedinherited

Starting offset into the global quadrature point index.

Definition at line 240 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::propertyIdx(), and Moose::Kokkos::Datum::qpOffset().

◆ _side

const unsigned int Moose::Kokkos::Datum::_side = libMesh::invalid_uint
protectedinherited

◆ _sys

const unsigned int Moose::Kokkos::AssemblyDatum::_sys
protected

System number.

Definition at line 491 of file KokkosDatum.h.

Referenced by sys().

◆ _systems

const Array<System>& Moose::Kokkos::Datum::_systems
protectedinherited

Reference of the Kokkos systems.

Definition at line 212 of file KokkosDatum.h.

Referenced by Moose::Kokkos::Datum::isNodalDefined(), and Moose::Kokkos::Datum::system().

◆ _tag

const TagID Moose::Kokkos::AssemblyDatum::_tag
protected

Solution tag ID.

Definition at line 487 of file KokkosDatum.h.


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