https://mooseframework.inl.gov
Public Member Functions | Protected Attributes | List of all members
Moose::Kokkos::MaterialPropertyValueBase< T, dimension > Class Template Reference

The Kokkos wrapper class for accessing the material property values of a single quadrature point. More...

#include <KokkosMaterialPropertyDecl.h>

Public Member Functions

KOKKOS_FUNCTION MaterialPropertyValueBase (const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
 Constructor. More...
 
KOKKOS_FUNCTION dof_id_type n (unsigned int dim) const
 Get the size of a dimension. More...
 

Protected Attributes

const dof_id_type _qp
 Global quadrature point index. More...
 
Array< T, dimension+1 > const * _data
 Pointer to the property data storage. More...
 
const T & _value
 Default value. More...
 

Detailed Description

template<typename T, unsigned int dimension>
class Moose::Kokkos::MaterialPropertyValueBase< T, dimension >

The Kokkos wrapper class for accessing the material property values of a single quadrature point.

The instances of this class are expected to be only created by the Kokkos material properties as temporary objects.

Definition at line 31 of file KokkosMaterialPropertyDecl.h.

Constructor & Destructor Documentation

◆ MaterialPropertyValueBase()

template<typename T, unsigned int dimension>
KOKKOS_FUNCTION Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::MaterialPropertyValueBase ( const MaterialProperty< T, dimension > &  property,
const Datum datum,
const unsigned int  qp 
)

Constructor.

Parameters
propertyThe material property constructing this object
datumThe Datum object of the current thread
qpThe local quadrature point index

Definition at line 23 of file KokkosMaterialPropertyValue.h.

25  : _qp(datum.qpOffset() + qp),
26  _data(property._default ? nullptr : &property._data[datum.subdomain()]),
27  _value(property._value)
28 {
29 }
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
KOKKOS_FUNCTION ContiguousSubdomainID subdomain() const
Get the contiguous subdomain ID.
Definition: KokkosDatum.h:85
MooseArray< Moose::GenericType< T, is_ad > > _value
Stored parameter value.
KOKKOS_FUNCTION dof_id_type qpOffset() const
Get the starting offset into the global quadrature point index.
Definition: KokkosDatum.h:100
const dof_id_type _qp
Global quadrature point index.

Member Function Documentation

◆ n()

template<typename T, unsigned int dimension>
KOKKOS_FUNCTION dof_id_type Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::n ( unsigned int  dim) const
inline

Get the size of a dimension.

Parameters
dimThe dimension index
Returns
The size of the dimension

Definition at line 54 of file KokkosMaterialPropertyValueDecl.h.

54 { return _data->n(dim); }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
Array< T, dimension+1 > const * _data
Pointer to the property data storage.

Member Data Documentation

◆ _data

template<typename T, unsigned int dimension>
Array<T, dimension + 1> const* Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::_data
protected

Pointer to the property data storage.

Definition at line 64 of file KokkosMaterialPropertyValueDecl.h.

Referenced by Moose::Kokkos::MaterialPropertyValueBase< T, 4 >::n().

◆ _qp

template<typename T, unsigned int dimension>
const dof_id_type Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::_qp
protected

Global quadrature point index.

Definition at line 60 of file KokkosMaterialPropertyValueDecl.h.

◆ _value

template<typename T, unsigned int dimension>
const T& Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::_value
protected

Default value.

Definition at line 68 of file KokkosMaterialPropertyValueDecl.h.


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