https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
Moose::Kokkos::MaterialPropertyValue< T, dimension > Class Template Reference

#include <KokkosMaterialPropertyValueDecl.h>

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

Public Member Functions

KOKKOS_FUNCTION MaterialPropertyValue (const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
 Constructor.
 
template<typename... index_type>
KOKKOS_FUNCTION T & operator() (index_type... i)
 Get the writeable reference of a property value.
 
template<typename... index_type>
KOKKOS_FUNCTION const T & operator() (index_type... i) const
 Get the const reference of a property value.
 
KOKKOS_FUNCTION dof_id_type n (unsigned int dim) const
 Get the size of a dimension.
 

Protected Attributes

const dof_id_type _idx
 Index into the property data storage.
 
Array< T, dimension+1 > const * _data
 Pointer to the property data storage.
 
const T & _value
 Default value.
 

Private Member Functions

 usingKokkosMaterialPropertyValueBaseMembers (T, dimension)
 

Detailed Description

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

Definition at line 70 of file KokkosMaterialPropertyValueDecl.h.

Constructor & Destructor Documentation

◆ MaterialPropertyValue()

template<typename T , unsigned int dimension>
KOKKOS_FUNCTION Moose::Kokkos::MaterialPropertyValue< T, dimension >::MaterialPropertyValue ( 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 32 of file KokkosMaterialPropertyValue.h.

34 : MaterialPropertyValueBase<T, dimension>(property, datum, qp)
35{
36}

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
inlineinherited

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.
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition Moose.h:165

◆ operator()() [1/2]

template<typename T , unsigned int dimension>
template<typename... index_type>
KOKKOS_FUNCTION T & Moose::Kokkos::MaterialPropertyValue< T, dimension >::operator() ( index_type...  i)
inline

Get the writeable reference of a property value.

Parameters
iThe index of each dimension
Returns
The writeable reference of the property value

Definition at line 91 of file KokkosMaterialPropertyValueDecl.h.

92 {
93 static_assert(sizeof...(i) == dimension,
94 "Number of arguments should match material property dimension");
95
96 return (*_data)(i..., _idx);
97 }
const dof_id_type _idx
Index into the property data storage.

◆ operator()() [2/2]

template<typename T , unsigned int dimension>
template<typename... index_type>
KOKKOS_FUNCTION const T & Moose::Kokkos::MaterialPropertyValue< T, dimension >::operator() ( index_type...  i) const
inline

Get the const reference of a property value.

Parameters
iThe index of each dimension
Returns
The const reference of the property value

Definition at line 104 of file KokkosMaterialPropertyValueDecl.h.

105 {
106 static_assert(sizeof...(i) == dimension,
107 "Number of arguments should match material property dimension");
108
109 return _data ? (*_data)(i..., _idx) : _value;
110 }

◆ usingKokkosMaterialPropertyValueBaseMembers()

template<typename T , unsigned int dimension>
Moose::Kokkos::MaterialPropertyValue< T, dimension >::usingKokkosMaterialPropertyValueBaseMembers ( ,
dimension   
)
private

Member Data Documentation

◆ _data

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

◆ _idx

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

◆ _value

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

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