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>

Inheritance diagram for Moose::Kokkos::MaterialPropertyValueBase< T, dimension >:
[legend]

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 _idx
 Index into the property data storage. 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 28 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 21 of file KokkosMaterialPropertyValue.h.

23  : _idx(property._default ? libMesh::invalid_uint
24  : datum.propertyIdx(property._constant_option[datum.subdomain()], qp)),
25  _data(property._default ? nullptr : &property._data[datum.subdomain()]),
26  _value(property._value)
27 {
28 }
const unsigned int invalid_uint
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:103
KOKKOS_FUNCTION dof_id_type propertyIdx(const PropertyConstantOption constant_option, const unsigned int qp) const
Get the index into the property data storage.
Definition: KokkosDatum.h:278
MooseArray< Moose::GenericType< T, is_ad > > _value
Stored parameter value.
const dof_id_type _idx
Index into the property data storage.

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 52 of file KokkosMaterialPropertyValueDecl.h.

52 { return _data->n(dim); }
KOKKOS_FUNCTION index_type n(unsigned int dim) const
Get the size of a dimension.
Definition: KokkosArray.h:211
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:163
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

◆ _idx

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

◆ _value

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

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