15 #if defined(__clang__) 16 #pragma clang diagnostic push 17 #pragma clang diagnostic ignored "-Woverloaded-virtual" 18 #elif defined(__GNUC__) || defined(__GNUG__) 19 #pragma GCC diagnostic push 20 #pragma GCC diagnostic ignored "-Woverloaded-virtual" 98 template <
typename Derived>
100 KOKKOS_FUNCTION
void operator()(ElementInit,
const ThreadID tid,
const Derived & material)
const;
101 template <
typename Derived>
102 KOKKOS_FUNCTION
void operator()(SideInit,
const ThreadID tid,
const Derived & material)
const;
103 template <
typename Derived>
104 KOKKOS_FUNCTION
void operator()(NeighborInit,
const ThreadID tid,
const Derived & material)
const;
105 template <
typename Derived>
108 template <
typename Derived>
109 KOKKOS_FUNCTION
void operator()(SideCompute,
const ThreadID tid,
const Derived & material)
const;
110 template <
typename Derived>
124 template <
typename T,
unsigned int dimension = 0,
unsigned int state = 0>
133 template <
typename T,
unsigned int dimension = 0>
136 return getKokkosMaterialPropertyByName<T, dimension, 1>(prop_name);
145 template <
typename T,
unsigned int dimension = 0>
148 return getKokkosMaterialPropertyByName<T, dimension, 2>(prop_name);
158 template <
typename T,
unsigned int dimension = 0,
unsigned int state = 0>
170 template <
typename T,
unsigned int dimension = 0>
182 template <
typename T,
unsigned int dimension = 0>
219 const QBase *
const &
_qrule;
225 template <
typename Derived>
233 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
236 material.initQpStatefulProperties(qp, datum);
240 template <
typename Derived>
248 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
251 material.initQpStatefulProperties(qp, datum);
255 template <
typename Derived>
263 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
266 material.initQpStatefulProperties(qp, datum);
270 template <
typename Derived>
278 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
281 material.computeQpProperties(qp, datum);
285 template <
typename Derived>
293 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
296 material.computeQpProperties(qp, datum);
300 template <
typename Derived>
308 for (
unsigned int qp = 0; qp < datum.
n_qps(); qp++)
311 material.computeQpProperties(qp, datum);
315 template <
typename T,
unsigned int dimension,
unsigned int state>
321 const auto prop_name =
326 if constexpr (state == 0)
330 MaterialPropertyInterface::getKokkosMaterialPropertyByName<T, dimension, state>(prop_name);
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const
Retrieve the set of material properties that this object depends on.
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
virtual void checkMaterialProperty(const std::string &name, const unsigned int state)
A helper method for checking material properties This method was required to avoid a compiler problem...
virtual void initStatefulProperties(unsigned int) override
Dispatch stateful material property initialization.
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
virtual MaterialDataType materialDataType() override
const unsigned int invalid_uint
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
virtual void checkMaterialProperty(const std::string &name, const unsigned int state) override
A helper method for checking material properties This method was required to avoid a compiler problem...
virtual bool boundaryRestricted() const
Returns true if this object has been restricted to a boundary.
MaterialProperty< T, dimension > getKokkosMaterialPropertyOld(const std::string &name)
Get an old material property.
const InputParameters & parameters() const
Get the parameters of the object.
MaterialDataType
MaterialData types.
static auto defaultInitStateful()
Get the function pointer of the default initQpStatefulProperties()
KOKKOS_FUNCTION ContiguousElementID kokkosElementID(ThreadID tid) const
Get the contiguous element ID for a thread.
MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName(const std::string &prop_name)
Get an old material property by property name.
static InputParameters validParams()
MaterialPropertyName getMaterialPropertyName(const std::string &name) const
MaterialData & _material_data
The material data class that stores properties.
KOKKOS_FUNCTION void operator()(ElementInit, const ThreadID tid, const Derived &material) const
The parallel computation entry functions called by Kokkos.
KOKKOS_FUNCTION void initQpStatefulProperties(const unsigned int, Datum &) const
Default methods to prevent compile errors even when these methods were not defined in the derived cla...
const std::string & name() const
Get the name of the class.
std::set< std::string > _requested_props
Set of properties accessed via get method.
virtual const QBase & qRule() const override
void checkExecutionStage()
Check and throw an error if the execution has progressed past the construction stage.
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
KOKKOS_FUNCTION auto kokkosElementSideID(ThreadID tid) const
Get the contiguous element ID - side index pair for a thread.
const MaterialPropertyName _get_suffix
virtual void computeProperties() override
Dispatch material property evaluation.
Material(const InputParameters ¶meters)
Constructor.
Interface for objects that needs coupling capabilities.
The base class for a user to derive their own Kokkos materials.
virtual const std::unordered_set< unsigned int > & getMatPropDependencies() const override
Retrieve the set of material properties that this object depends on.
An interface for accessing Materials.
MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder(const std::string &name)
Get an older material property.
const QBase *const & _qrule
Dummy members unused for Kokkos materials.
virtual MaterialData & materialData() override
Proxy for accessing MaterialPropertyStorage.
virtual bool isBoundaryMaterial() const override
Returns true of the MaterialData type is not associated with volume data.
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...
const bool _neighbor
Flag whether the material is on neighbor faces.
virtual const MaterialData & materialData() const override
const Moose::MaterialDataType _material_data_type
The type of data.
The Kokkos material property class.
MaterialProperty< T, dimension > getKokkosMaterialPropertyByName(const std::string &prop_name_in)
Get a material property by property name for any state.
MaterialProperty< T, dimension > getKokkosMaterialProperty(const std::string &name)
Get a material property for any state.
The base class for Kokkos materials.
MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName(const std::string &prop_name)
Get an older material property by property name.
KOKKOS_FUNCTION void reinit()
Reset the reinit flag.
const bool _bnd
Flag whether the material is on faces.
KOKKOS_FUNCTION const Array< System > & kokkosSystems() const
Get the const reference of the Kokkos systems.
virtual void initQpStatefulProperties() override final
Initialize stateful properties at quadrature points.