83 template <
typename T,
unsigned int dimension = 0>
85 const std::vector<unsigned int> & dims = {})
87 std::string prop_name =
name;
91 return declareKokkosPropertyByName<T, dimension>(prop_name, dims);
101 template <
typename T,
unsigned int dimension = 0>
104 const std::vector<unsigned int> & dims = {});
174 template <
typename T,
unsigned int dimension>
177 const std::vector<unsigned int> & dims)
179 static_assert(dimension <= 4,
"Up to four-dimensional Kokkos material properties are allowed.");
181 if (dims.size() != dimension)
182 mooseError(
"The declared Kokkos material property '",
184 "'\nhas a different dimension (",
186 ") with the provided dimension (",
190 const auto prop_name_modified =
const MaterialPropertyName _declare_suffix
Suffix to append to the name of the material property/ies when declaring it/them. ...
Scalar< int > _t_step
The number of the time step.
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
const InputParameters & _pars
The object's parameters.
MaterialProperty< T, dimension > declareKokkosPropertyByName(const std::string &prop_name, const std::vector< unsigned int > &dims={})
Declare a material property by property name.
dof_id_type ContiguousElementID
virtual void initialSetup() override
Setup block and boundary restrictions.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void computeQpProperties() override final
Users must override this method.
KOKKOS_FUNCTION dof_id_type numKokkosElementSides() const
Get the number of sides this material is operating on for face material property evaluation.
MaterialProperty< T, dimension > declareKokkosProperty(const std::string &name, const std::vector< unsigned int > &dims={})
Declare a material property.
KOKKOS_FUNCTION ContiguousElementID kokkosElementID(ThreadID tid) const
Get the contiguous element ID for a thread.
The Kokkos interface that holds the host reference of the Kokkos systems and copies it to device duri...
The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during ...
Moose::Kokkos::MaterialProperty< T, dimension > declareKokkosProperty(const std::string &prop_name, const std::vector< unsigned int > &dims, const MaterialBase *declarer, const bool bnd)
Declare a Kokkos material property.
MaterialBase(const InputParameters ¶meters)
Constructor.
const std::string & name() const
Get the name of the class.
static InputParameters validParams()
KOKKOS_FUNCTION auto kokkosElementSideID(ThreadID tid) const
Get the contiguous element ID - side index pair for a thread.
The Kokkos interface that holds the host reference of the Kokkos assembly and copies it to device dur...
Array< ContiguousElementID > _element_ids
Contiguous element IDs this material operates on for element material property evaluation.
Scalar< Real > _t
TODO: Move to TransientInterface.
Scalar< Real > _dt_old
Size of the old time step.
virtual void subdomainSetup() override final
Subdomain setup evaluating material properties when required.
Scalar< Real > _dt
Time step size.
KOKKOS_FUNCTION dof_id_type numKokkosElements() const
Get the number of elements this material operates on for element material property evaluation...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Array< Pair< ContiguousElementID, unsigned int > > _element_side_ids
Contiguous element ID - side index pairs this material operates on for face material property evaluat...
Scalar< const Real > _t_old
Old time.
void registerPropName(const std::string &prop_name, bool is_get, const unsigned int state)
Small helper function to call store{Subdomain,Boundary}MatPropName.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
The Kokkos material property class.
The base class for Kokkos materials.
virtual const MaterialData & materialData() const =0
virtual bool isBoundaryMaterial() const =0
Returns true of the MaterialData type is not associated with volume data.
virtual void initQpStatefulProperties() override final
Initialize stateful properties at quadrature points.