45 using ::MaterialPropertyStorage::addConsumer;
46 using ::MaterialPropertyStorage::getConsumers;
47 using ::MaterialPropertyStorage::getMaterialData;
48 using ::MaterialPropertyStorage::getMaterialPropertyRegistry;
49 using ::MaterialPropertyStorage::hasStatefulProperties;
50 using ::MaterialPropertyStorage::setRecovering;
52#ifdef MOOSE_KOKKOS_SCOPE
64 const std::type_info & type,
65 const unsigned int state,
66 const ::MaterialBase * declarer,
67 std::shared_ptr<MaterialPropertyBase> shell);
76 const unsigned int state,
77 std::shared_ptr<MaterialPropertyBase> shell);
91 const std::type_info & type,
92 const ::MaterialBase * declarer,
93 const std::vector<unsigned int> & dims,
97 std::shared_ptr<MaterialPropertyBase> shell);
138 std::unordered_map<std::string, std::shared_ptr<MaterialPropertyBase>>
void dataStore(std::ostream &stream, Moose::Kokkos::MaterialPropertyStorage &storage, void *context)
void dataLoad(std::istream &stream, Moose::Kokkos::MaterialPropertyStorage &storage, void *context)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
static constexpr unsigned int max_state
The max time state supported (2 = older)
Registry class for material property IDs and names.
Stores the stateful material properties computed by materials.
The base class for Kokkos material properties.
The Kokkos class responsible for allocating and storing Kokkos material properties.
void allocateKokkosProperties()
Allocate all the material property data storages.
void shift()
Shift current, old, and older material property data storages.
MaterialPropertyStorage(MaterialPropertyRegistry ®istry, FEProblemBase &problem)
Constructor.
static std::unordered_map< std::type_index, PropertyStore > _store_functions
Function pointer maps for load/store.
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.
MaterialPropertyBase & declareKokkosProperty(const std::string &prop_name, const std::type_info &type, const ::MaterialBase *declarer, const std::vector< unsigned int > &dims, const bool bnd, const bool on_demand, const PropertyConstantOption constant_option, std::shared_ptr< MaterialPropertyBase > shell)
Declare a material property.
void copy()
Copy current material properties to old and older.
static std::unordered_map< std::type_index, PropertyLoad > _load_functions
bool haveKokkosProperty(std::string prop_name, unsigned int state=0)
Get whether a material property exists.
static MaterialPropertyStorage & cast(::MaterialPropertyStorage &storage)
Cast the reference of a Kokkos material property storage from the base type to the actual type.
std::unordered_map< std::string, std::shared_ptr< MaterialPropertyBase > > _kokkos_props[MaterialData::max_state+1]
Material properties.
MaterialPropertyBase & getKokkosProperty(std::string prop_name, unsigned int state=0)
Get a material property.
std::unordered_map< std::string, Moose::Kokkos::PropRecord > _kokkos_prop_records
Record of each material property.
void registerLoadStore(std::type_index type, PropertyStore store, PropertyLoad load)
Register the load/store functions.
MaterialPropertyBase & addKokkosPropertyState(const std::string &prop_name, const unsigned int state, std::shared_ptr< MaterialPropertyBase > shell)
Add an old/older material property.
std::function< void(std::istream &, void *)> PropertyLoad
std::function< void(std::ostream &, void *)> PropertyStore
PropertyConstantOption
Property constant options.