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

#include <KokkosMaterialPropertyValueDecl.h>

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

Public Member Functions

KOKKOS_FUNCTION MaterialPropertyValue (const MaterialProperty< T, 0 > &property, const Datum &datum, unsigned int qp)
 Constructor. More...
 
KOKKOS_FUNCTION operator const T & () const
 Get the const reference of a property value. More...
 
KOKKOS_FUNCTION auto & operator= (const T &value)
 Assign a value to the underlying property. More...
 
KOKKOS_FUNCTION auto & operator= (const MaterialPropertyValue< T, 0 > &value)
 Copy a value from another property. More...
 
KOKKOS_FUNCTION dof_id_type n (unsigned int dim) const
 Get the size of a dimension. More...
 

Protected Attributes

const dof_id_type _qp
 Global quadrature point index. More...
 
Array< T, dimension+1 > const * _data
 Pointer to the property data storage. More...
 
const T & _value
 Default value. More...
 

Private Member Functions

 usingKokkosMaterialPropertyValueBaseMembers (T, 0)
 

Detailed Description

template<typename T>
class Moose::Kokkos::MaterialPropertyValue< T, 0 >

Definition at line 75 of file KokkosMaterialPropertyValueDecl.h.

Constructor & Destructor Documentation

◆ MaterialPropertyValue()

template<typename T >
Moose::Kokkos::MaterialPropertyValue< T, 0 >::MaterialPropertyValue ( const MaterialProperty< T, 0 > &  property,
const Datum datum,
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.

35  : MaterialPropertyValueBase<T, 0>(property, datum, qp)
36 {
37 }

Member Function Documentation

◆ n()

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

54 { return _data->n(dim); }
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:159
Array< T, dimension+1 > const * _data
Pointer to the property data storage.

◆ operator const T &()

template<typename T >
KOKKOS_FUNCTION Moose::Kokkos::MaterialPropertyValue< T, 0 >::operator const T & ( ) const
inline

Get the const reference of a property value.

Returns
The const reference of the property value

Definition at line 95 of file KokkosMaterialPropertyValueDecl.h.

95 { return _data ? (*_data)(_qp) : _value; }
Array< T, dimension+1 > const * _data
Pointer to the property data storage.
const dof_id_type _qp
Global quadrature point index.

◆ operator=() [1/2]

template<typename T >
KOKKOS_FUNCTION auto & Moose::Kokkos::MaterialPropertyValue< T, 0 >::operator= ( const T &  value)

Assign a value to the underlying property.

Parameters
valueThe value to assign

Definition at line 73 of file KokkosMaterialPropertyValue.h.

74 {
75  (*_data)(_qp) = value;
76 
77  return *this;
78 }
const dof_id_type _qp
Global quadrature point index.

◆ operator=() [2/2]

template<typename T >
KOKKOS_FUNCTION auto & Moose::Kokkos::MaterialPropertyValue< T, 0 >::operator= ( const MaterialPropertyValue< T, 0 > &  value)

Copy a value from another property.

Parameters
valueThe property to copy

Definition at line 82 of file KokkosMaterialPropertyValue.h.

83 {
84  (*_data)(_qp) = static_cast<T>(value);
85 
86  return *this;
87 }
const dof_id_type _qp
Global quadrature point index.

◆ usingKokkosMaterialPropertyValueBaseMembers()

template<typename T >
Moose::Kokkos::MaterialPropertyValue< T, 0 >::usingKokkosMaterialPropertyValueBaseMembers ( ,
 
)
private

Member Data Documentation

◆ _data

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

Pointer to the property data storage.

Definition at line 64 of file KokkosMaterialPropertyValueDecl.h.

◆ _qp

const dof_id_type Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::_qp
protectedinherited

Global quadrature point index.

Definition at line 60 of file KokkosMaterialPropertyValueDecl.h.

◆ _value

const T& Moose::Kokkos::MaterialPropertyValueBase< T, dimension >::_value
protectedinherited

Default value.

Definition at line 68 of file KokkosMaterialPropertyValueDecl.h.


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