47 using ::MaterialPropertyStorage::addConsumer;
48 using ::MaterialPropertyStorage::getConsumers;
49 using ::MaterialPropertyStorage::getMaterialData;
50 using ::MaterialPropertyStorage::getMaterialPropertyRegistry;
51 using ::MaterialPropertyStorage::hasStatefulProperties;
52 using ::MaterialPropertyStorage::setRecovering;
54 #ifdef MOOSE_KOKKOS_SCOPE 66 const std::type_info & type,
67 const unsigned int state,
68 const ::MaterialBase * declarer,
69 std::shared_ptr<MaterialPropertyBase> shell);
78 const unsigned int state,
79 std::shared_ptr<MaterialPropertyBase> shell);
91 const std::type_info & type,
92 const ::MaterialBase * declarer,
93 const std::vector<unsigned int> & dims,
95 std::shared_ptr<MaterialPropertyBase> shell);
136 std::unordered_map<std::string, std::shared_ptr<MaterialPropertyBase>>
The base class for Kokkos material properties.
MaterialPropertyBase & addKokkosPropertyState(const std::string &prop_name, const unsigned int state, std::shared_ptr< MaterialPropertyBase > shell)
Add an old/older material property.
static std::unordered_map< std::type_index, PropertyLoad > _load_functions
static MaterialPropertyStorage & cast(::MaterialPropertyStorage &storage)
Cast the reference of a Kokkos material property storage from the base type to the actual type...
void shift()
Shift current, old, and older material property data storages.
Registry class for material property IDs and names.
static Moose::ParameterRegistry & registry
void allocateKokkosProperties()
Allocate all the material property data storages.
MaterialPropertyBase & declareKokkosProperty(const std::string &prop_name, const std::type_info &type, const ::MaterialBase *declarer, const std::vector< unsigned int > &dims, const bool bnd, std::shared_ptr< MaterialPropertyBase > shell)
Declare a material property.
static std::unordered_map< std::type_index, PropertyStore > _store_functions
Function pointer maps for load/store.
std::function< void(std::istream &, void *)> PropertyLoad
MaterialPropertyBase & addKokkosProperty(const std::string &prop_name, const std::type_info &type, const unsigned int state, const ::MaterialBase *declarer, std::shared_ptr< MaterialPropertyBase > shell)
Add a material property.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void dataLoad(std::istream &stream, Moose::Kokkos::MaterialPropertyStorage &storage, void *context)
std::unordered_map< std::string, std::shared_ptr< MaterialPropertyBase > > _kokkos_props[MaterialData::max_state+1]
Material properties.
std::function< void(std::ostream &, void *)> PropertyStore
MaterialPropertyBase & getKokkosProperty(std::string prop_name, unsigned int state=0)
Get a material property.
The Kokkos class responsible for allocating and storing Kokkos material properties.
static constexpr unsigned int max_state
The max time state supported (2 = older)
void dataStore(std::ostream &stream, Moose::Kokkos::MaterialPropertyStorage &storage, void *context)
bool haveKokkosProperty(std::string prop_name, unsigned int state=0)
Get whether a material property exists.
void registerLoadStore(std::type_index type, PropertyStore store, PropertyLoad load)
Register the load/store functions.
MaterialPropertyStorage(MaterialPropertyRegistry ®istry, FEProblemBase &problem)
Constructor.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::unordered_map< std::string, Moose::Kokkos::PropRecord > _kokkos_prop_records
Record of each material property.
void copy()
Copy current material properties to old and older.