14#define usingKokkosMaterialPropertyValueBaseMembers(T, dimension) \
15 using MaterialPropertyValueBase<T, dimension>::_idx; \
16 using MaterialPropertyValueBase<T, dimension>::_data; \
17 using MaterialPropertyValueBase<T, dimension>::_value
22template <
typename T,
unsigned int dimension>
33template <
typename T,
unsigned int dimension>
45 const unsigned int qp);
52 KOKKOS_FUNCTION dof_id_type
n(
unsigned int dim)
const {
return _data->
n(
dim); }
69template <
typename T,
unsigned int dimension>
83 const unsigned int qp);
90 template <
typename... index_type>
93 static_assert(
sizeof...(i) == dimension,
94 "Number of arguments should match material property dimension");
103 template <
typename... index_type>
106 static_assert(
sizeof...(i) == dimension,
107 "Number of arguments should match material property dimension");
128 const unsigned int qp);
134 KOKKOS_FUNCTION
operator const T &()
const {
return _data ? (*_data)(
_idx) :
_value; }
139 KOKKOS_FUNCTION
auto & operator=(
const T & value);
KOKKOS_FUNCTION index_type n(unsigned int dim) const
Get the size of a dimension.
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.
The Kokkos wrapper class for accessing the material property values of a single quadrature point.
const dof_id_type _idx
Index into the property data storage.
const T & _value
Default value.
KOKKOS_FUNCTION dof_id_type n(unsigned int dim) const
Get the size of a dimension.
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
usingKokkosMaterialPropertyValueBaseMembers(T, 0)
KOKKOS_FUNCTION const T & operator()(index_type... i) const
Get the const reference of a property value.
KOKKOS_FUNCTION T & operator()(index_type... i)
Get the writeable reference of a property value.
usingKokkosMaterialPropertyValueBaseMembers(T, dimension)
The Kokkos material property class.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.