14 #define usingKokkosMaterialPropertyValueBaseMembers(T, dimension) \ 15 using MaterialPropertyValueBase<T, dimension>::_idx; \ 16 using MaterialPropertyValueBase<T, dimension>::_data; \ 17 using MaterialPropertyValueBase<T, dimension>::_value 22 template <
typename T,
unsigned int dimension>
32 template <
typename T,
unsigned int dimension>
34 class MaterialPropertyValueBase
45 const unsigned int qp);
69 template <
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");
113 template <
typename T>
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.
KOKKOS_FUNCTION MaterialPropertyValue(const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
Constructor.
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
KOKKOS_FUNCTION const T & operator()(index_type... i) const
Get the const reference of a property value.
usingKokkosMaterialPropertyValueBaseMembers(T, dimension)
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
KOKKOS_FUNCTION MaterialPropertyValueBase(const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
Constructor.
The Kokkos wrapper class for accessing the material property values of a single quadrature point...
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
const T & _value
Default value.
infix_ostream_iterator< T, charT, traits > & operator=(T const &item)
KOKKOS_FUNCTION dof_id_type n(unsigned int dim) const
Get the size of a dimension.
KOKKOS_FUNCTION T & operator()(index_type... i)
Get the writeable reference of a property value.
const dof_id_type _idx
Index into the property data storage.
The Kokkos material property class.