14 #define usingKokkosMaterialPropertyValueBaseMembers(T, dimension) \ 15 using MaterialPropertyValueBase<T, dimension>::_qp; \ 16 using MaterialPropertyValueBase<T, dimension>::_data; \ 17 using MaterialPropertyValueBase<T, dimension>::_value 24 template <
typename T,
unsigned int dimension>
34 template <
typename T,
unsigned int dimension>
36 class MaterialPropertyValueBase
47 const unsigned int qp);
71 template <
typename T,
unsigned int dimension>
77 usingKokkosMaterialPropertyValueBaseMembers(T, 0);
95 KOKKOS_FUNCTION
operator const T &()
const {
return _data ? (*_data)(_qp) : _value; }
100 KOKKOS_FUNCTION
auto &
operator=(
const T & value);
108 template <
typename T>
111 usingKokkosMaterialPropertyValueBaseMembers(T, 1);
130 KOKKOS_FUNCTION T &
operator()(
unsigned int i0) {
return (*_data)(i0, _qp); }
138 return _data ? (*_data)(i0, _qp) : _value;
142 template <
typename T>
145 usingKokkosMaterialPropertyValueBaseMembers(T, 2);
165 KOKKOS_FUNCTION T &
operator()(
unsigned int i0,
unsigned int i1) {
return (*_data)(i0, i1, _qp); }
172 KOKKOS_FUNCTION
const T &
operator()(
unsigned int i0,
unsigned int i1)
const 174 return _data ? (*_data)(i0, i1, _qp) : _value;
178 template <
typename T>
181 usingKokkosMaterialPropertyValueBaseMembers(T, 3);
202 KOKKOS_FUNCTION T &
operator()(
unsigned int i0,
unsigned int i1,
unsigned int i2)
204 return (*_data)(i0, i1, i2, _qp);
213 KOKKOS_FUNCTION
const T &
operator()(
unsigned int i0,
unsigned int i1,
unsigned int i2)
const 215 return _data ? (*_data)(i0, i1, i2, _qp) : _value;
219 template <
typename T>
222 usingKokkosMaterialPropertyValueBaseMembers(T, 4);
244 KOKKOS_FUNCTION T &
operator()(
unsigned int i0,
unsigned int i1,
unsigned int i2,
unsigned int i3)
246 return (*_data)(i0, i1, i2, i3, _qp);
256 KOKKOS_FUNCTION
const T &
257 operator()(
unsigned int i0,
unsigned int i1,
unsigned int i2,
unsigned int i3)
const 259 return _data ? (*_data)(i0, i1, i2, i3, _qp) : _value;
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
KOKKOS_FUNCTION const T & operator()(unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3) const
Get the const reference of a property value.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
KOKKOS_FUNCTION const T & operator()(unsigned int i0, unsigned int i1) const
Get the const reference of a property value.
KOKKOS_FUNCTION MaterialPropertyValueBase(const MaterialProperty< T, dimension > &property, const Datum &datum, const unsigned int qp)
Constructor.
KOKKOS_FUNCTION T & operator()(unsigned int i0)
Get the writeable reference of a property value.
The Kokkos wrapper class for accessing the material property values of a single quadrature point...
KOKKOS_FUNCTION const T & operator()(unsigned int i0) const
Get the const reference of a property value.
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
KOKKOS_FUNCTION const T & operator()(unsigned int i0, unsigned int i1, unsigned int i2) const
Get the const reference of a property value.
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()(unsigned int i0, unsigned int i1)
Get the writeable reference of a property value.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
MaterialPropertyValueTempl< false > MaterialPropertyValue
The Kokkos material property class.
const dof_id_type _qp
Global quadrature point index.
KOKKOS_FUNCTION T & operator()(unsigned int i0, unsigned int i1, unsigned int i2, unsigned int i3)
Get the writeable reference of a property value.
KOKKOS_FUNCTION T & operator()(unsigned int i0, unsigned int i1, unsigned int i2)
Get the writeable reference of a property value.