https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
MaterialPropertyInterface Class Reference

An interface for accessing Materials. More...

#include <MaterialPropertyInterface.h>

Inheritance diagram for MaterialPropertyInterface:
[legend]

Public Member Functions

 MaterialPropertyInterface (const MooseObject *moose_object, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
 
 MaterialPropertyInterface (const MaterialPropertyInterface &object, const Moose::Kokkos::FunctorCopy &key)
 Special constructor used for Kokkos functor copy during parallel dispatch. More...
 
template<typename T , unsigned int dimension = 0, unsigned int state = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyByName (const std::string &prop_name)
 Get a Kokkos material property by property name for any state. More...
 
template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOldByName (const std::string &prop_name)
 Get an old Kokkos material property by property name. More...
 
template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlderByName (const std::string &prop_name)
 Get an older Kokkos material property by property name. More...
 
template<typename T , unsigned int dimension = 0, unsigned int state = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialProperty (const std::string &name)
 Get a Kokkos material property for any state. More...
 
template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOld (const std::string &name)
 Get an old Kokkos material property. More...
 
template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosMaterialPropertyOlder (const std::string &name)
 Get an older Kokkos material property. More...
 
template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 Return a constant zero anonymous material property. More...
 
template<typename T , typename... Ts>
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 for backwards compatibility More...
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 Retrieve the block ids that the material property is defined. More...
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 Retrieve the block names that the material property is defined. More...
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 Retrieve the boundary ids that the material property is defined. More...
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 Retrieve the boundary namess that the material property is defined. More...
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 Check if block and boundary restrictions of a given material are compatible with the current material. More...
 
std::unordered_map< SubdomainID, std::vector< MaterialBase * > > buildRequiredMaterials (bool allow_stateful=true)
 get a map of MaterialBase pointers for all material objects that this object depends on for each block More...
 
void statefulPropertiesAllowed (bool)
 Derived classes can declare whether or not they work with stateful material properties. More...
 
bool getMaterialPropertyCalled () const
 Returns true if getMaterialProperty() has been called, false otherwise. More...
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 Retrieve the set of material properties that this object depends on. More...
 
virtual void resolveOptionalProperties ()
 resolve all optional properties More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 Retrieve the generic property named "name" for the specified material_data at state state. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 Retrieve the property named "name" for the specified material_data. More...
 
template<typename T >
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 Retrieve the AD property named "name" for the specified material_data. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 Retrieve the generic property named "name" without any deduction for the specified material_data for state state. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 Retrieve the generic property named "prop_name" without any deduction for the specified material_data for state state. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 Retrieve the property named "name" without any deduction for the specified material_data. More...
 
template<typename T >
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 Retrieve the AD property named "name" without any deduction for the specified material_data. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 Retrieve the old property deduced from the name name for the specified material_data. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 Retrieve the older property deduced from the name name for the specified material_data. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 Retrieve the old property named name without any deduction for the specified material_data. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 Retrieve the older property named name without any deduction for the specified material_data. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 Retrieve reference to material property or one of it's old or older values. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
template<typename T >
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file. More...
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
template<typename T >
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
template<typename T >
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
template<typename T , bool is_ad>
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
template<typename T >
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
template<typename T >
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
template<typename T >
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
template<typename T >
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 Return a MaterialBase reference - usable for computing directly. More...
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
template<typename T >
bool hasMaterialProperty (const std::string &name)
 Check if the material property exists. More...
 
template<typename T >
bool hasMaterialPropertyByName (const std::string &name)
 
template<typename T >
bool hasADMaterialProperty (const std::string &name)
 
template<typename T >
bool hasADMaterialPropertyByName (const std::string &name)
 
template<typename T , unsigned int dimension = 0>
bool hasKokkosMaterialProperty (const std::string &name)
 
template<typename T , unsigned int dimension = 0>
bool hasKokkosMaterialPropertyByName (const std::string &name)
 
template<typename T , bool is_ad>
bool hasGenericMaterialProperty (const std::string &name)
 generic hasMaterialProperty helper More...
 
template<typename T , bool is_ad>
bool hasGenericMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

static InputParameters validParams ()
 

Static Public Attributes

static constexpr PropertyValue::id_type default_property_id
 The material property ID for a default (parsed from input) property. More...
 
static constexpr PropertyValue::id_type zero_property_id = PropertyValue::invalid_property_id - 2
 The material property ID for a zero property. More...
 

Protected Member Functions

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 with the template getMaterialProperty method. More...
 
void markMatPropRequested (const std::string &)
 A proxy method for _mi_feproblem.markMatPropRequested(name) More...
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 Check and throw an error if the execution has progressed past the construction stage. More...
 
template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
template<typename T >
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
template<typename T >
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Protected Attributes

const InputParameters_mi_params
 Parameters of the object with this interface. More...
 
const std::string _mi_name
 The name of the object that this interface belongs to. More...
 
const MooseObjectName _mi_moose_object_name
 The "complete" name of the object that this interface belongs for material property output. More...
 
FEProblemBase_mi_feproblem
 Reference to the FEProblemBase class. More...
 
SubProblem_mi_subproblem
 Reference to the subproblem. More...
 
const THREAD_ID _mi_tid
 Current threaded it. More...
 
const bool _is_kokkos_object
 Whether the MOOSE object is a Kokkos object. More...
 
const Moose::MaterialDataType _material_data_type
 The type of data. More...
 
MaterialData_material_data
 The material data class that stores properties. More...
 
bool _stateful_allowed
 True by default. More...
 
bool _get_material_property_called
 Initialized to false. More...
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 Storage vector for default properties. More...
 
std::unordered_set< unsigned int_material_property_dependencies
 The set of material properties (as given by their IDs) that this object depends on. More...
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 Use the interpolated state set up through the ProjectedStatefulMaterialStorageAction. More...
 

Static Protected Attributes

static const std::string _interpolated_old = "_interpolated_old"
 name suffixes for interpolated old and older properties More...
 
static const std::string _interpolated_older = "_interpolated_older"
 

Private Member Functions

Moose::MaterialDataType getMaterialDataType (const std::set< BoundaryID > &boundary_ids) const
 
unsigned int getMaxQps () const
 
void addConsumedPropertyName (const MooseObjectName &obj_name, const std::string &prop_name)
 

Private Attributes

const MooseObject_mi_moose_object
 The MooseObject creating the MaterialPropertyInterface. More...
 
const bool _mi_boundary_restricted
 BoundaryRestricted flag. More...
 
const std::set< SubdomainID > & _mi_block_ids
 Storage for the block ids created by BlockRestrictable. More...
 
const std::set< BoundaryID > & _mi_boundary_ids
 Storage for the boundary ids created by BoundaryRestrictable. More...
 
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
 optional material properties More...
 

Detailed Description

An interface for accessing Materials.

Any object that needs material properties should inherit this interface. If your object is also restricted to blocks and/or boundaries via the BlockRestrictable and/or BoundaryRestrictable class, then MaterialPropertyInterface must be inherited following these two classes for the material property checks to operate correctly.

Definition at line 69 of file MaterialPropertyInterface.h.

Constructor & Destructor Documentation

◆ MaterialPropertyInterface() [1/2]

MaterialPropertyInterface::MaterialPropertyInterface ( const MooseObject moose_object,
const std::set< SubdomainID > &  block_ids,
const std::set< BoundaryID > &  boundary_ids 
)

Definition at line 53 of file MaterialPropertyInterface.C.

56  : _mi_moose_object(*moose_object),
58  _mi_name(moose_object->name()),
62  _mi_tid(_mi_params.get<THREAD_ID>("_tid")),
63 #ifdef MOOSE_KOKKOS_ENABLED
65 #else
66  _is_kokkos_object(false),
67 #endif
70 #ifdef MOOSE_KOKKOS_ENABLED
73  :
74 #endif
76  _stateful_allowed(true),
78  _get_suffix(_mi_params.get<MaterialPropertyName>("prop_getter_suffix")),
79  _use_interpolated_state(_mi_params.get<bool>("use_interpolated_state")),
81  _mi_block_ids(block_ids),
82  _mi_boundary_ids(boundary_ids)
83 {
84  moose_object->getMooseApp().registerInterfaceObject(*this);
85 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const THREAD_ID _mi_tid
Current threaded it.
const MooseObjectName _mi_moose_object_name
The "complete" name of the object that this interface belongs for material property output...
const bool _is_kokkos_object
Whether the MOOSE object is a Kokkos object.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
T getCheckedPointerParam(const std::string &name, const std::string &error_string="") const
Verifies that the requested parameter exists and is not NULL and returns it to the caller...
const bool _mi_boundary_restricted
BoundaryRestricted flag.
SubProblem & _mi_subproblem
Reference to the subproblem.
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
MooseApp & getMooseApp() const
Get the MooseApp this class is associated with.
Definition: MooseBase.h:87
MaterialData & _material_data
The material data class that stores properties.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
Moose::MaterialDataType getMaterialDataType(const std::set< BoundaryID > &boundary_ids) const
bool isKokkosObject(IsKokkosObjectKey &&) const
Get whether this object is a Kokkos functor The parameter is set by the Kokkos base classes: ...
Definition: MooseObject.h:72
const MaterialPropertyName _get_suffix
const InputParameters & _mi_params
Parameters of the object with this interface.
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
MaterialData & getKokkosMaterialData(Moose::MaterialDataType type, const MooseObject *object=nullptr) const
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:78
const bool _use_interpolated_state
Use the interpolated state set up through the ProjectedStatefulMaterialStorageAction.
bool _get_material_property_called
Initialized to false.
const std::string & getBase() const
Definition: MooseBase.h:147
const Moose::MaterialDataType _material_data_type
The type of data.
bool _stateful_allowed
True by default.
const MooseObject & _mi_moose_object
The MooseObject creating the MaterialPropertyInterface.
bool boundaryRestricted(const std::set< BoundaryID > &boundary_ids)
void registerInterfaceObject(T &interface)
Registers an interface object for accessing with getInterfaceObjects.
Definition: MooseApp.h:1656
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ MaterialPropertyInterface() [2/2]

MaterialPropertyInterface::MaterialPropertyInterface ( const MaterialPropertyInterface object,
const Moose::Kokkos::FunctorCopy key 
)

Special constructor used for Kokkos functor copy during parallel dispatch.

Definition at line 88 of file MaterialPropertyInterface.C.

91  _mi_params(object._mi_params),
92  _mi_name(object._mi_name),
96  _mi_tid(object._mi_tid),
102  _get_suffix(object._get_suffix),
107 {
108 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const THREAD_ID _mi_tid
Current threaded it.
const MooseObjectName _mi_moose_object_name
The "complete" name of the object that this interface belongs for material property output...
const bool _is_kokkos_object
Whether the MOOSE object is a Kokkos object.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
const bool _mi_boundary_restricted
BoundaryRestricted flag.
SubProblem & _mi_subproblem
Reference to the subproblem.
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.
MaterialData & _material_data
The material data class that stores properties.
const MaterialPropertyName _get_suffix
const InputParameters & _mi_params
Parameters of the object with this interface.
const bool _use_interpolated_state
Use the interpolated state set up through the ProjectedStatefulMaterialStorageAction.
bool _get_material_property_called
Initialized to false.
const Moose::MaterialDataType _material_data_type
The type of data.
bool _stateful_allowed
True by default.
const MooseObject & _mi_moose_object
The MooseObject creating the MaterialPropertyInterface.

Member Function Documentation

◆ addConsumedPropertyName()

void MaterialPropertyInterface::addConsumedPropertyName ( const MooseObjectName obj_name,
const std::string &  prop_name 
)
private

Definition at line 150 of file MaterialPropertyInterface.C.

Referenced by getBlockMaterialProperty(), getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

152 {
153  return _mi_feproblem.addConsumedPropertyName(obj_name, prop_name);
154 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
void addConsumedPropertyName(const MooseObjectName &obj_name, const std::string &prop_name)
Helper for tracking the object that is consuming a property for MaterialPropertyDebugOutput.
Definition: SubProblem.C:736

◆ buildRequiredMaterials()

std::unordered_map< SubdomainID, std::vector< MaterialBase * > > MaterialPropertyInterface::buildRequiredMaterials ( bool  allow_stateful = true)

get a map of MaterialBase pointers for all material objects that this object depends on for each block

Definition at line 245 of file MaterialPropertyInterface.C.

246 {
247  std::unordered_map<SubdomainID, std::vector<MaterialBase *>> required_mats;
248  const auto & mwh = _mi_feproblem.getMaterialWarehouse();
249  for (const auto id : _mi_block_ids)
250  {
251  const auto & mats = mwh[_material_data_type].getActiveBlockObjects(id, _mi_tid);
252  std::array<const MaterialPropertyInterface *, 1> consumers = {{this}};
253  const auto block_required =
254  MaterialBase::buildRequiredMaterials(consumers, mats, allow_stateful);
255  required_mats[id].insert(
256  required_mats[id].begin(), block_required.begin(), block_required.end());
257  }
258  return required_mats;
259 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const THREAD_ID _mi_tid
Current threaded it.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
const MaterialWarehouse & getMaterialWarehouse() const
static std::deque< MaterialBase * > buildRequiredMaterials(const Consumers &mat_consumers, const std::vector< std::shared_ptr< MaterialBase >> &mats, const bool allow_stateful)
Build the materials required by a set of consumer objects.
Definition: MaterialBase.h:535
const Moose::MaterialDataType _material_data_type
The type of data.

◆ checkBlockAndBoundaryCompatibility()

void MaterialPropertyInterface::checkBlockAndBoundaryCompatibility ( std::shared_ptr< MaterialBase discrete)

Check if block and boundary restrictions of a given material are compatible with the current material.

Error out otherwise.

Definition at line 186 of file MaterialPropertyInterface.C.

Referenced by getMaterialByName().

188 {
189  // Check block compatibility
190  if (!discrete->hasBlocks(_mi_block_ids))
191  {
192  std::ostringstream oss;
193  oss << "Incompatible material and object blocks:";
194 
195  oss << "\n " << discrete->parameters().paramLocationPrefix("block")
196  << " material defined on blocks ";
197  for (const auto & sbd_id : discrete->blockIDs())
198  oss << sbd_id << ", ";
199 
200  oss << "\n " << _mi_params.paramLocationPrefix("block")
201  << " object needs material on blocks ";
202  for (const auto & block_id : _mi_block_ids)
203  oss << block_id << ", ";
204 
205  mooseError(oss.str());
206  }
207 
208  // Check boundary compatibility
209  if (!discrete->hasBoundary(_mi_boundary_ids))
210  {
211  std::ostringstream oss;
212  oss << "Incompatible material and object boundaries:";
213 
214  oss << "\n " << discrete->parameters().paramLocationPrefix("boundary")
215  << " material defined on boundaries ";
216  for (const auto & bnd_id : discrete->boundaryIDs())
217  oss << bnd_id << ", ";
218 
219  oss << "\n " << _mi_params.paramLocationPrefix("boundary")
220  << " object needs material on boundaries ";
221  for (const auto & bnd_id : _mi_boundary_ids)
222  oss << bnd_id << ", ";
223 
224  mooseError(oss.str());
225  }
226 }
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const InputParameters & _mi_params
Parameters of the object with this interface.
std::string paramLocationPrefix(const std::string &param) const
Returns a prefix containing the parameter name and location (if available)

◆ checkExecutionStage()

void MaterialPropertyInterface::checkExecutionStage ( )
protected

Check and throw an error if the execution has progressed past the construction stage.

Definition at line 262 of file MaterialPropertyInterface.C.

Referenced by getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

263 {
265  mooseError("Material properties must be retrieved during object construction. This is a code "
266  "problem.");
267 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
virtual bool startedInitialSetup()
Returns true if we are in or beyond the initialSetup stage.

◆ checkMaterialProperty()

void MaterialPropertyInterface::checkMaterialProperty ( const std::string &  name,
const unsigned int  state 
)
protectedvirtual

A helper method for checking material properties This method was required to avoid a compiler problem with the template getMaterialProperty method.

Reimplemented in Material, Moose::Kokkos::Material< Derived >, and Moose::Kokkos::Material< KokkosGenericConstantMaterial >.

Definition at line 157 of file MaterialPropertyInterface.C.

Referenced by Moose::Kokkos::Material< KokkosGenericConstantMaterial >::checkMaterialProperty(), Material::checkMaterialProperty(), getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

158 {
159  if (state == 0)
160  {
161  // If the material property is boundary restrictable, add to the list of materials to check
163  for (const auto & bnd_id : _mi_boundary_ids)
165 
166  // The default is to assume block restrictions
167  else
168  for (const auto & blk_ids : _mi_block_ids)
170  }
171 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
virtual void storeSubdomainDelayedCheckMatProp(const std::string &requestor, SubdomainID block_id, const std::string &name)
Adds to a map based on block ids of material properties to validate.
Definition: SubProblem.C:607
const bool _mi_boundary_restricted
BoundaryRestricted flag.
virtual void storeBoundaryDelayedCheckMatProp(const std::string &requestor, BoundaryID boundary_id, const std::string &name)
Adds to a map based on boundary ids of material properties to validate.
Definition: SubProblem.C:615
const std::set< BoundaryID > & _mi_boundary_ids
Storage for the boundary ids created by BoundaryRestrictable.
const std::string _mi_name
The name of the object that this interface belongs to.

◆ defaultADMaterialProperty()

template<typename T >
const ADMaterialProperty<T>* MaterialPropertyInterface::defaultADMaterialProperty ( const std::string &  name)
inlineprotected

Definition at line 621 of file MaterialPropertyInterface.h.

622  {
623  return defaultGenericMaterialProperty<T, true>(name);
624  }
std::string name(const ElemQuality q)

◆ defaultGenericMaterialProperty()

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > * MaterialPropertyInterface::defaultGenericMaterialProperty ( const std::string &  name)
protected
Returns
The default material property with the name name, if any.

"Default" properties are properties whose default values are set from within the name. That is, if we can cast name to a Real, and the prop type is a Real or RealVectorValue, we'll return said value.

Definition at line 718 of file MaterialPropertyInterface.h.

719 {
720  if constexpr (std::is_same_v<T, Real> || std::is_same_v<T, RealVectorValue>)
721  {
722  std::istringstream ss(name);
723  Real real_value;
724 
725  // check if the string parsed cleanly into a Real number
726  if (ss >> real_value && ss.eof())
727  {
728  using prop_type = GenericMaterialProperty<T, is_ad>;
729 
730  const auto nqp = Moose::constMaxQpsPerElem;
731  auto & property =
732  _default_properties.emplace_back(std::make_unique<prop_type>(default_property_id));
733  auto & T_property = static_cast<prop_type &>(*property);
734 
735  T_property.resize(nqp);
736  for (const auto qp : make_range(nqp))
737  T_property[qp] = real_value;
738 
739  return &T_property;
740  }
741  }
742 
743  return nullptr;
744 }
static constexpr PropertyValue::id_type default_property_id
The material property ID for a default (parsed from input) property.
constexpr std::size_t constMaxQpsPerElem
This is used for places where we initialize some qp-sized data structures that would end up being siz...
Definition: MooseTypes.h:230
std::vector< std::unique_ptr< PropertyValue > > _default_properties
Storage vector for default properties.
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)

◆ defaultMaterialProperty()

template<typename T >
const MaterialProperty<T>* MaterialPropertyInterface::defaultMaterialProperty ( const std::string &  name)
inlineprotected

Definition at line 616 of file MaterialPropertyInterface.h.

617  {
618  return defaultGenericMaterialProperty<T, false>(name);
619  }
std::string name(const ElemQuality q)

◆ getADMaterialProperty() [1/2]

template<typename T >
const ADMaterialProperty<T>& MaterialPropertyInterface::getADMaterialProperty ( const std::string &  name)
inline

Definition at line 115 of file MaterialPropertyInterface.h.

116  {
117  return getGenericMaterialProperty<T, true>(name, 0);
118  }
std::string name(const ElemQuality q)

◆ getADMaterialProperty() [2/2]

template<typename T >
const ADMaterialProperty<T>& MaterialPropertyInterface::getADMaterialProperty ( const std::string &  name,
MaterialData material_data 
)
inline

Retrieve the AD property named "name" for the specified material_data.

state is the property state; 0 = current, 1 = old, 2 = older, etc.

Definition at line 459 of file MaterialPropertyInterface.h.

461  {
462  return getGenericMaterialProperty<T, true>(name, material_data, 0);
463  }
std::string name(const ElemQuality q)

◆ getADMaterialPropertyByName() [1/2]

template<typename T >
const ADMaterialProperty<T>& MaterialPropertyInterface::getADMaterialPropertyByName ( const MaterialPropertyName &  name)
inline

Definition at line 152 of file MaterialPropertyInterface.h.

153  {
154  return getGenericMaterialPropertyByName<T, true>(name, 0);
155  }
std::string name(const ElemQuality q)

◆ getADMaterialPropertyByName() [2/2]

template<typename T >
const ADMaterialProperty<T>& MaterialPropertyInterface::getADMaterialPropertyByName ( const MaterialPropertyName &  name,
MaterialData material_data 
)
inline

Retrieve the AD property named "name" without any deduction for the specified material_data.

Definition at line 502 of file MaterialPropertyInterface.h.

504  {
505  return getGenericMaterialPropertyByName<T, true>(name, material_data, 0);
506  }
std::string name(const ElemQuality q)

◆ getBlockMaterialProperty()

template<typename T >
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > MaterialPropertyInterface::getBlockMaterialProperty ( const MaterialPropertyName &  name)

Retrieve pointer to a material property with the mesh blocks where it is defined The name required by this method is the name defined in the input file.

This function can be thought as the combination of getMaterialPropertyByName and getMaterialPropertyBlocks. It can be called after the action of all actions.

Parameters
nameThe name of the material property to retrieve
Returns
Pointer to the material property with the name 'name' and the set of blocks where the property is valid

Definition at line 748 of file MaterialPropertyInterface.h.

749 {
750  const auto name = _get_suffix.empty()
751  ? static_cast<const std::string &>(name_in)
752  : MooseUtils::join(std::vector<std::string>({name_in, _get_suffix}), "_");
753 
754  if (_mi_block_ids.empty())
755  mooseError("getBlockMaterialProperty must be called by a block restrictable object");
756 
757  using pair_type = std::pair<const MaterialProperty<T> *, std::set<SubdomainID>>;
758 
759  if (!hasMaterialPropertyByName<T>(name))
760  return pair_type(nullptr, {});
761 
762  // Call first so that the ID gets registered
763  const auto & prop = _material_data.getProperty<T, false>(name, 0, _mi_moose_object);
764  auto blocks = getMaterialPropertyBlocks(name);
765  auto prop_blocks_pair = pair_type(&prop, std::move(blocks));
766 
768 
769  // Update consumed properties in MaterialPropertyDebugOutput
771 
772  return prop_blocks_pair;
773 }
std::string name(const ElemQuality q)
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
const MooseObjectName _mi_moose_object_name
The "complete" name of the object that this interface belongs for material property output...
const std::set< SubdomainID > & _mi_block_ids
Storage for the block ids created by BlockRestrictable.
char ** blocks
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
unsigned int getPropertyId(const std::string &prop_name) const
Wrapper for MaterialStorage::getPropertyId.
Definition: MaterialData.C:80
MaterialData & _material_data
The material data class that stores properties.
std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &name)
Retrieve the block ids that the material property is defined.
const MaterialPropertyName _get_suffix
GenericMaterialProperty< T, is_ad > & getProperty(const std::string &prop_name, const unsigned int state, const MooseObject &requestor)
Retrieves a material property.
Definition: MaterialData.h:127
void addConsumedPropertyName(const MooseObjectName &obj_name, const std::string &prop_name)
const MooseObject & _mi_moose_object
The MooseObject creating the MaterialPropertyInterface.
std::unordered_set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.

◆ getGenericMaterialProperty() [1/2]

template<typename T , bool is_ad>
const GenericMaterialProperty<T, is_ad>& MaterialPropertyInterface::getGenericMaterialProperty ( const std::string &  name,
const unsigned int  state = 0 
)
inline

Retrieve reference to material property or one of it's old or older values.

The name required by this method is the name that is hard-coded into your source code as the input parameter key. If no input parameter is found this behaves like the getMaterialPropertyByName family as a fall back.

Parameters
nameThe name of the parameter key of the material property to retrieve
stateThe state (current = 0, old = 1, older = 2)
Returns
Reference to the desired material property

Definition at line 103 of file MaterialPropertyInterface.h.

105  {
106  return getGenericMaterialProperty<T, is_ad>(name, _material_data, state);
107  }
std::string name(const ElemQuality q)
MaterialData & _material_data
The material data class that stores properties.

◆ getGenericMaterialProperty() [2/2]

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericMaterialProperty ( const std::string &  name,
MaterialData material_data,
const unsigned int  state = 0 
)

Retrieve the generic property named "name" for the specified material_data at state state.

Definition at line 886 of file MaterialPropertyInterface.h.

889 {
890  // Check if the supplied parameter is a valid input parameter key
891  const auto prop_name = getMaterialPropertyName(name);
892 
893  return getPossiblyConstantGenericMaterialPropertyByName<T, is_ad>(
894  prop_name, material_data, state);
895 }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ getGenericMaterialPropertyByName() [1/2]

template<typename T , bool is_ad>
const GenericMaterialProperty<T, is_ad>& MaterialPropertyInterface::getGenericMaterialPropertyByName ( const MaterialPropertyName &  name,
const unsigned int  state = 0 
)
inline

Retrieve reference to material property or its old or older value The name required by this method is the name defined in the input file.

Parameters
nameThe name of the material property to retrieve
stateThe state (current = 0, old = 1, older = 2)
Returns
Reference to the material property with the name 'name'

Definition at line 141 of file MaterialPropertyInterface.h.

142  {
143  return getGenericMaterialPropertyByName<T, is_ad>(name, _material_data, state);
144  }
std::string name(const ElemQuality q)
MaterialData & _material_data
The material data class that stores properties.

◆ getGenericMaterialPropertyByName() [2/2]

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericMaterialPropertyByName ( const MaterialPropertyName &  name,
MaterialData material_data,
const unsigned int  state 
)

Retrieve the generic property named "name" without any deduction for the specified material_data for state state.

Definition at line 899 of file MaterialPropertyInterface.h.

902 {
903  if (_is_kokkos_object)
904  mooseError("Attempted to retrieve a standard MOOSE material property from a Kokkos object.");
905 
907  {
908  if (state == 1)
909  return getGenericMaterialPropertyByName<T, is_ad>(
910  name_in + _interpolated_old, material_data, 0);
911  if (state == 2)
912  return getGenericMaterialPropertyByName<T, is_ad>(
913  name_in + _interpolated_older, material_data, 0);
914  }
915 
916  const auto name = _get_suffix.empty()
917  ? static_cast<const std::string &>(name_in)
918  : MooseUtils::join(std::vector<std::string>({name_in, _get_suffix}), "_");
919 
921  checkMaterialProperty(name, state);
922 
923  // mark property as requested
924  markMatPropRequested(name);
925 
926  // Update the boolean flag.
928 
929  // Call first so that the ID gets registered
930  auto & prop = material_data.getProperty<T, is_ad>(name, state, _mi_moose_object);
931 
932  // Does the material data used here matter?
933  _material_property_dependencies.insert(material_data.getPropertyId(name));
934 
935  if (state == 0)
937 
938  return prop;
939 }
std::string name(const ElemQuality q)
static const std::string _interpolated_old
name suffixes for interpolated old and older properties
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
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...
const MooseObjectName _mi_moose_object_name
The "complete" name of the object that this interface belongs for material property output...
const bool _is_kokkos_object
Whether the MOOSE object is a Kokkos object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
static const std::string _interpolated_older
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
const MaterialPropertyName _get_suffix
const bool _use_interpolated_state
Use the interpolated state set up through the ProjectedStatefulMaterialStorageAction.
void addConsumedPropertyName(const MooseObjectName &obj_name, const std::string &prop_name)
bool _get_material_property_called
Initialized to false.
void checkExecutionStage()
Check and throw an error if the execution has progressed past the construction stage.
const MooseObject & _mi_moose_object
The MooseObject creating the MaterialPropertyInterface.
std::unordered_set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.

◆ getGenericOptionalMaterialProperty()

template<typename T , bool is_ad>
const GenericOptionalMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericOptionalMaterialProperty ( const std::string &  name,
const unsigned int  state = 0 
)

Optional material property getters state is the property state; 0 = current, 1 = old, 2 = older, etc.

Definition at line 854 of file MaterialPropertyInterface.h.

856 {
857  auto proxy = std::make_unique<OptionalMaterialPropertyProxy<MaterialPropertyInterface, T, is_ad>>(
858  name, state);
859  auto & optional_property = proxy->value();
860  _optional_property_proxies.push_back(std::move(proxy));
861  return optional_property;
862 }
std::string name(const ElemQuality q)
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
optional material properties

◆ getGenericZeroMaterialProperty() [1/2]

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericZeroMaterialProperty ( const std::string &  name)

Return a material property that is initialized to zero by default and does not need to (but can) be declared by another material.

Definition at line 796 of file MaterialPropertyInterface.h.

797 {
798  const auto prop_name = getMaterialPropertyName(name);
799  return getGenericZeroMaterialPropertyByName<T, is_ad>(prop_name);
800 }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ getGenericZeroMaterialProperty() [2/2]

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericZeroMaterialProperty ( )

Return a constant zero anonymous material property.

Definition at line 815 of file MaterialPropertyInterface.h.

816 {
817  // static zero property storage
819 
820  // resize to accomodate maximum number of qpoints
821  // (in multiapp scenarios getMaxQps can return different values in each app; we need the max)
822  unsigned int nqp = getMaxQps();
823  if (nqp > zero.size())
824  zero.resize(nqp);
825 
826  // set values for all qpoints to zero
827  for (unsigned int qp = 0; qp < nqp; ++qp)
828  MathUtils::mooseSetToZero(zero[qp]);
829 
830  return zero;
831 }
void mooseSetToZero(T &v)
Helper function templates to set a variable to zero.
Definition: MathUtils.h:372
const Number zero
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
static constexpr PropertyValue::id_type zero_property_id
The material property ID for a zero property.

◆ getGenericZeroMaterialPropertyByName()

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getGenericZeroMaterialPropertyByName ( const std::string &  prop_name)

Definition at line 804 of file MaterialPropertyInterface.h.

805 {
806  // if found return the requested property
807  if (hasGenericMaterialPropertyByName<T, is_ad>(prop_name))
808  return getGenericMaterialPropertyByName<T, is_ad>(prop_name);
809 
810  return getGenericZeroMaterialProperty<T, is_ad>();
811 }

◆ getKokkosMaterialProperty()

template<typename T , unsigned int dimension = 0, unsigned int state = 0>
Moose::Kokkos::MaterialProperty<T, dimension> MaterialPropertyInterface::getKokkosMaterialProperty ( const std::string &  name)
inline

Get a Kokkos material property for any state.

Template Parameters
TThe property data type
dimensionThe property dimension
stateThe property state
Parameters
nameThe property name or the parameter name containing the property name
Returns
The Kokkos material property

Definition at line 215 of file MaterialPropertyInterface.h.

216  {
217  return getKokkosMaterialPropertyByName<T, dimension, state>(getMaterialPropertyName(name));
218  }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ getKokkosMaterialPropertyByName()

template<typename T , unsigned int dimension, unsigned int state>
Moose::Kokkos::MaterialProperty< T, dimension > MaterialPropertyInterface::getKokkosMaterialPropertyByName ( const std::string &  prop_name)

Get a Kokkos material property by property name for any state.

Template Parameters
TThe property data type
dimensionThe property dimension
stateThe property state
Parameters
prop_nameThe property name
Returns
The Kokkos material property

Definition at line 963 of file MaterialPropertyInterface.h.

964 {
965  if (!_is_kokkos_object)
966  mooseError("Attempted to retrieve a Kokkos material property from a standard MOOSE object.");
967 
968  if constexpr (std::is_same_v<T, Real>)
969  {
970  std::istringstream ss(prop_name);
971  Real value;
972 
973  // Check if the string parsed cleanly into a Real number
974  if (ss >> value && ss.eof())
976  }
977 
979  checkMaterialProperty(prop_name, state);
980 
981  // Mark property as requested
982  markMatPropRequested(prop_name);
983 
984  // Update the boolean flag
986 
987  // Call first so that the ID gets registered
988  auto prop = _material_data.getKokkosProperty<T, dimension, state>(prop_name);
989 
990  // Does the material data used here matter?
992 
993  if constexpr (state == 0)
995 
996  return prop;
997 }
Moose::Kokkos::MaterialProperty< T, dimension > getKokkosProperty(const std::string &prop_name)
Get a Kokkos material property.
Definition: MaterialData.h:455
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...
const MooseObjectName _mi_moose_object_name
The "complete" name of the object that this interface belongs for material property output...
const bool _is_kokkos_object
Whether the MOOSE object is a Kokkos object.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
unsigned int getPropertyId(const std::string &prop_name) const
Wrapper for MaterialStorage::getPropertyId.
Definition: MaterialData.C:80
void markMatPropRequested(const std::string &)
A proxy method for _mi_feproblem.markMatPropRequested(name)
MaterialData & _material_data
The material data class that stores properties.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addConsumedPropertyName(const MooseObjectName &obj_name, const std::string &prop_name)
bool _get_material_property_called
Initialized to false.
void checkExecutionStage()
Check and throw an error if the execution has progressed past the construction stage.
The Kokkos material property class.
std::unordered_set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.

◆ getKokkosMaterialPropertyOld()

template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty<T, dimension> MaterialPropertyInterface::getKokkosMaterialPropertyOld ( const std::string &  name)
inline

Get an old Kokkos material property.

Template Parameters
TThe property data type
dimensionThe property dimension
Parameters
nameThe property name or the parameter name containing the property name
Returns
The Kokkos material property

Definition at line 228 of file MaterialPropertyInterface.h.

229  {
230  return getKokkosMaterialPropertyByName<T, dimension, 1>(getMaterialPropertyName(name));
231  }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ getKokkosMaterialPropertyOldByName()

template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty<T, dimension> MaterialPropertyInterface::getKokkosMaterialPropertyOldByName ( const std::string &  prop_name)
inline

Get an old Kokkos material property by property name.

Template Parameters
TThe property data type
dimensionThe property dimension
Parameters
prop_nameThe property name
Returns
The Kokkos material property

Definition at line 189 of file MaterialPropertyInterface.h.

190  {
191  return getKokkosMaterialPropertyByName<T, dimension, 1>(prop_name);
192  }

◆ getKokkosMaterialPropertyOlder()

template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty<T, dimension> MaterialPropertyInterface::getKokkosMaterialPropertyOlder ( const std::string &  name)
inline

Get an older Kokkos material property.

Template Parameters
TThe property data type
dimensionThe property dimension
Parameters
nameThe property name or the parameter name containing the property name
Returns
The Kokkos material property

Definition at line 241 of file MaterialPropertyInterface.h.

242  {
243  return getKokkosMaterialPropertyByName<T, dimension, 2>(getMaterialPropertyName(name));
244  }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ getKokkosMaterialPropertyOlderByName()

template<typename T , unsigned int dimension = 0>
Moose::Kokkos::MaterialProperty<T, dimension> MaterialPropertyInterface::getKokkosMaterialPropertyOlderByName ( const std::string &  prop_name)
inline

Get an older Kokkos material property by property name.

Template Parameters
TThe property data type
dimensionThe property dimension
Parameters
prop_nameThe property name
Returns
The Kokkos material property

Definition at line 202 of file MaterialPropertyInterface.h.

203  {
204  return getKokkosMaterialPropertyByName<T, dimension, 2>(prop_name);
205  }

◆ getMaterial()

MaterialBase & MaterialPropertyInterface::getMaterial ( const std::string &  name)

Return a MaterialBase reference - usable for computing directly.

Parameters
nameThe name of the input parameter or explicit material name.
no_warnIf true, suppress warning about retrieving the material potentially during its calculation. If you don't know what this is/means, then you don't need it.

Definition at line 229 of file MaterialPropertyInterface.C.

230 {
231  return getMaterialByName(_mi_params.get<MaterialName>(name));
232 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _mi_params
Parameters of the object with this interface.
MaterialBase & getMaterialByName(const std::string &name, bool no_warn=false)

◆ getMaterialByName()

MaterialBase & MaterialPropertyInterface::getMaterialByName ( const std::string &  name,
bool  no_warn = false 
)

Definition at line 235 of file MaterialPropertyInterface.C.

Referenced by ElementMaterialSampler::ElementMaterialSampler(), getMaterial(), and Material::getMaterialByName().

236 {
237  std::shared_ptr<MaterialBase> discrete =
239 
241  return *discrete;
242 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
const THREAD_ID _mi_tid
Current threaded it.
std::shared_ptr< MaterialBase > getMaterial(std::string name, Moose::MaterialDataType type, const THREAD_ID tid=0, bool no_warn=false)
Return a pointer to a MaterialBase object.
void checkBlockAndBoundaryCompatibility(std::shared_ptr< MaterialBase > discrete)
Check if block and boundary restrictions of a given material are compatible with the current material...
const Moose::MaterialDataType _material_data_type
The type of data.

◆ getMaterialDataType()

Moose::MaterialDataType MaterialPropertyInterface::getMaterialDataType ( const std::set< BoundaryID > &  boundary_ids) const
private
Returns
The MaterialDataType given the interface's parameters

Definition at line 277 of file MaterialPropertyInterface.C.

278 {
279  if (_mi_params.isParamValid("_material_data_type"))
280  return _mi_params.get<Moose::MaterialDataType>("_material_data_type");
281  if (moose::internal::boundaryRestricted(boundary_ids))
284 }
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:692
const InputParameters & _mi_params
Parameters of the object with this interface.
bool boundaryRestricted(const std::set< BoundaryID > &boundary_ids)
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ getMaterialProperty() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialProperty ( const std::string &  name,
const unsigned int  state = 0 
)
inline

Definition at line 109 of file MaterialPropertyInterface.h.

111  {
112  return getGenericMaterialProperty<T, false>(name, state);
113  }
std::string name(const ElemQuality q)

◆ getMaterialProperty() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialProperty ( const std::string &  name,
MaterialData material_data,
const unsigned int  state = 0 
)
inline

Retrieve the property named "name" for the specified material_data.

state is the property state; 0 = current, 1 = old, 2 = older, etc.

Definition at line 446 of file MaterialPropertyInterface.h.

449  {
450  return getGenericMaterialProperty<T, false>(name, material_data, state);
451  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyBlockNames()

std::vector< SubdomainName > MaterialPropertyInterface::getMaterialPropertyBlockNames ( const std::string &  name)

Retrieve the block names that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the block names for the property

Definition at line 126 of file MaterialPropertyInterface.C.

127 {
129 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::vector< SubdomainName > getMaterialPropertyBlockNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:489

◆ getMaterialPropertyBlocks()

std::set< SubdomainID > MaterialPropertyInterface::getMaterialPropertyBlocks ( const std::string &  name)

Retrieve the block ids that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the block ids for the property

Definition at line 120 of file MaterialPropertyInterface.C.

Referenced by getBlockMaterialProperty().

121 {
123 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< SubdomainID > getMaterialPropertyBlocks(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:473

◆ getMaterialPropertyBoundaryIDs()

std::set< BoundaryID > MaterialPropertyInterface::getMaterialPropertyBoundaryIDs ( const std::string &  name)

Retrieve the boundary ids that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the boundary ids for the property

Definition at line 132 of file MaterialPropertyInterface.C.

133 {
135 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::set< BoundaryID > getMaterialPropertyBoundaryIDs(const std::string &prop_name)
Get a vector containing the block ids the material property is defined on.
Definition: SubProblem.C:525

◆ getMaterialPropertyBoundaryNames()

std::vector< BoundaryName > MaterialPropertyInterface::getMaterialPropertyBoundaryNames ( const std::string &  name)

Retrieve the boundary namess that the material property is defined.

Parameters
nameThe name of the material property
Returns
A vector the the boundary names for the property

Definition at line 138 of file MaterialPropertyInterface.C.

139 {
141 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual std::vector< BoundaryName > getMaterialPropertyBoundaryNames(const std::string &prop_name)
Get a vector of block id equivalences that the material property is defined on.
Definition: SubProblem.C:541

◆ getMaterialPropertyByName() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyByName ( const MaterialPropertyName &  name,
const unsigned int  state = 0 
)
inline

Definition at line 146 of file MaterialPropertyInterface.h.

148  {
149  return getGenericMaterialPropertyByName<T, false>(name, state);
150  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyByName() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyByName ( const MaterialPropertyName &  name,
MaterialData material_data,
const unsigned int  state = 0 
)
inline

Retrieve the property named "name" without any deduction for the specified material_data.

state is the property state; 0 = current, 1 = old, 2 = older, etc.

Definition at line 490 of file MaterialPropertyInterface.h.

493  {
494  return getGenericMaterialPropertyByName<T, false>(name, material_data, state);
495  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyCalled()

bool MaterialPropertyInterface::getMaterialPropertyCalled ( ) const
inline

Returns true if getMaterialProperty() has been called, false otherwise.

Definition at line 417 of file MaterialPropertyInterface.h.

bool _get_material_property_called
Initialized to false.

◆ getMaterialPropertyName()

MaterialPropertyName MaterialPropertyInterface::getMaterialPropertyName ( const std::string &  name) const
protected
Returns
The name of the material property associated with name name.

If name is the name of a material property parameter and the parameter is valid, this will return the value of said parameter. Otherwise, it will just return the name.

Definition at line 112 of file MaterialPropertyInterface.C.

Referenced by InterfaceMaterial::getGenericMaterialProperty(), Material::getGenericMaterialProperty(), getGenericMaterialProperty(), InterfaceMaterial::getGenericNeighborMaterialProperty(), getGenericZeroMaterialProperty(), Moose::Kokkos::Material< KokkosGenericConstantMaterial >::getKokkosMaterialProperty(), getKokkosMaterialProperty(), Moose::Kokkos::Material< KokkosGenericConstantMaterial >::getKokkosMaterialPropertyOld(), getKokkosMaterialPropertyOld(), Moose::Kokkos::Material< KokkosGenericConstantMaterial >::getKokkosMaterialPropertyOlder(), getKokkosMaterialPropertyOlder(), hasADMaterialProperty(), hasKokkosMaterialProperty(), and hasMaterialProperty().

113 {
114  if (_mi_params.have_parameter<MaterialPropertyName>(name) && _mi_params.isParamValid(name))
115  return _mi_params.get<MaterialPropertyName>(name);
116  return name;
117 }
std::string name(const ElemQuality q)
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
const InputParameters & _mi_params
Parameters of the object with this interface.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ getMaterialPropertyOld() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOld ( const std::string &  name)
inline

Definition at line 120 of file MaterialPropertyInterface.h.

121  {
122  return getMaterialProperty<T>(name, 1);
123  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOld() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOld ( const std::string &  name,
MaterialData material_data 
)
inline

Retrieve the old property deduced from the name name for the specified material_data.

Definition at line 512 of file MaterialPropertyInterface.h.

514  {
515  return getMaterialProperty<T>(name, material_data, 1);
516  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOldByName() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOldByName ( const MaterialPropertyName &  name)
inline

Definition at line 157 of file MaterialPropertyInterface.h.

158  {
159  return getMaterialPropertyByName<T>(name, 1);
160  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOldByName() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOldByName ( const MaterialPropertyName &  name,
MaterialData material_data 
)
inline

Retrieve the old property named name without any deduction for the specified material_data.

Definition at line 534 of file MaterialPropertyInterface.h.

536  {
537  return getMaterialPropertyByName<T>(name, material_data, 1);
538  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOlder() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOlder ( const std::string &  name)
inline

Definition at line 125 of file MaterialPropertyInterface.h.

126  {
127  return getMaterialProperty<T>(name, 2);
128  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOlder() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOlder ( const std::string &  name,
MaterialData material_data 
)
inline

Retrieve the older property deduced from the name name for the specified material_data.

Definition at line 523 of file MaterialPropertyInterface.h.

525  {
526  return getMaterialProperty<T>(name, material_data, 2);
527  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOlderByName() [1/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOlderByName ( const MaterialPropertyName &  name)
inline

Definition at line 162 of file MaterialPropertyInterface.h.

163  {
164  return getMaterialPropertyByName<T>(name, 2);
165  }
std::string name(const ElemQuality q)

◆ getMaterialPropertyOlderByName() [2/2]

template<typename T >
const MaterialProperty<T>& MaterialPropertyInterface::getMaterialPropertyOlderByName ( const MaterialPropertyName &  name,
MaterialData material_data 
)
inline

Retrieve the older property named name without any deduction for the specified material_data.

Definition at line 545 of file MaterialPropertyInterface.h.

547  {
548  return getMaterialPropertyByName<T>(name, material_data, 2);
549  }
std::string name(const ElemQuality q)

◆ getMatPropDependencies()

virtual const std::unordered_set<unsigned int>& MaterialPropertyInterface::getMatPropDependencies ( ) const
inlinevirtual

Retrieve the set of material properties that this object depends on.

Returns
The IDs corresponding to the material properties that MUST be reinited before evaluating this object

Reimplemented in Material, Moose::Kokkos::Material< Derived >, Moose::Kokkos::Material< KokkosGenericConstantMaterial >, InterfaceMaterial, IPHDGKernel, and IPHDGBC.

Definition at line 425 of file MaterialPropertyInterface.h.

Referenced by IPHDGBC::getMatPropDependencies(), IPHDGKernel::getMatPropDependencies(), InterfaceMaterial::getMatPropDependencies(), Moose::Kokkos::Material< KokkosGenericConstantMaterial >::getMatPropDependencies(), Material::getMatPropDependencies(), NodalPatchRecovery::reinitPatch(), ComputeUserObjectsThread::subdomainChanged(), and MooseObjectWarehouseBase< Indicator >::updateMatPropDependencyHelper().

426  {
428  }
std::unordered_set< unsigned int > _material_property_dependencies
The set of material properties (as given by their IDs) that this object depends on.

◆ getMaxQps()

unsigned int MaterialPropertyInterface::getMaxQps ( ) const
private

Definition at line 144 of file MaterialPropertyInterface.C.

Referenced by getGenericZeroMaterialProperty().

145 {
146  return _mi_feproblem.getMaxQps();
147 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
unsigned int getMaxQps() const

◆ getOptionalADMaterialProperty()

template<typename T >
const OptionalADMaterialProperty<T>& MaterialPropertyInterface::getOptionalADMaterialProperty ( const std::string &  name)
inline

Definition at line 260 of file MaterialPropertyInterface.h.

261  {
262  return getGenericOptionalMaterialProperty<T, true>(name);
263  }
std::string name(const ElemQuality q)

◆ getOptionalMaterialProperty()

template<typename T >
const OptionalMaterialProperty<T>& MaterialPropertyInterface::getOptionalMaterialProperty ( const std::string &  name,
const unsigned int  state = 0 
)
inline

Definition at line 254 of file MaterialPropertyInterface.h.

256  {
257  return getGenericOptionalMaterialProperty<T, false>(name, state);
258  }
std::string name(const ElemQuality q)

◆ getOptionalMaterialPropertyOld()

template<typename T >
const OptionalMaterialProperty<T>& MaterialPropertyInterface::getOptionalMaterialPropertyOld ( const std::string &  name)
inline

Definition at line 266 of file MaterialPropertyInterface.h.

267  {
268  return getOptionalMaterialProperty<T>(name, 1);
269  }
std::string name(const ElemQuality q)

◆ getOptionalMaterialPropertyOlder()

template<typename T >
const OptionalMaterialProperty<T>& MaterialPropertyInterface::getOptionalMaterialPropertyOlder ( const std::string &  name)
inline

Definition at line 271 of file MaterialPropertyInterface.h.

272  {
273  return getOptionalMaterialProperty<T>(name, 2);
274  }
std::string name(const ElemQuality q)

◆ getPossiblyConstantGenericMaterialPropertyByName()

template<typename T , bool is_ad>
const GenericMaterialProperty< T, is_ad > & MaterialPropertyInterface::getPossiblyConstantGenericMaterialPropertyByName ( const MaterialPropertyName &  prop_name,
MaterialData material_data,
const unsigned int  state 
)

Retrieve the generic property named "prop_name" without any deduction for the specified material_data for state state.

This API allows the prop_name to be a constant, e.g. it allows the possibility that prop_name is not a name at all

Definition at line 866 of file MaterialPropertyInterface.h.

868 {
869  // Check if it's just a constant
870  if (const auto * default_property = defaultGenericMaterialProperty<T, is_ad>(prop_name))
871  return *default_property;
872 
873  if (state > 0 && !_stateful_allowed)
874  mooseError("Stateful material properties not allowed for this object."
875  " State ",
876  state,
877  " property for \"",
878  prop_name,
879  "\" was requested.");
880 
881  return this->getGenericMaterialPropertyByName<T, is_ad>(prop_name, material_data, state);
882 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
bool _stateful_allowed
True by default.

◆ getZeroMaterialProperty()

template<typename T , typename... Ts>
const MaterialProperty<T>& MaterialPropertyInterface::getZeroMaterialProperty ( Ts...  args)
inline

for backwards compatibility

Definition at line 310 of file MaterialPropertyInterface.h.

311  {
312  return getGenericZeroMaterialProperty<T, false>(args...);
313  }

◆ hasADMaterialProperty()

template<typename T >
bool MaterialPropertyInterface::hasADMaterialProperty ( const std::string &  name)

Definition at line 835 of file MaterialPropertyInterface.h.

836 {
837  // Check if the supplied parameter is a valid input parameter key
838  const auto prop_name = getMaterialPropertyName(name);
839  return hasADMaterialPropertyByName<T>(prop_name);
840 }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ hasADMaterialPropertyByName()

template<typename T >
bool MaterialPropertyInterface::hasADMaterialPropertyByName ( const std::string &  name)

Definition at line 844 of file MaterialPropertyInterface.h.

845 {
846  const auto name = _get_suffix.empty()
847  ? name_in
848  : MooseUtils::join(std::vector<std::string>({name_in, _get_suffix}), "_");
850 }
std::string name(const ElemQuality q)
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
MaterialData & _material_data
The material data class that stores properties.
const MaterialPropertyName _get_suffix
bool haveADProperty(const std::string &prop_name) const
Returns true if the AD material property exists - defined by any material.
Definition: MaterialData.h:100

◆ hasGenericMaterialProperty()

template<typename T , bool is_ad>
bool MaterialPropertyInterface::hasGenericMaterialProperty ( const std::string &  name)
inline

generic hasMaterialProperty helper

Definition at line 390 of file MaterialPropertyInterface.h.

391  {
392  if constexpr (is_ad)
393  return hasADMaterialProperty<T>(name);
394  else
395  return hasMaterialProperty<T>(name);
396  }
std::string name(const ElemQuality q)

◆ hasGenericMaterialPropertyByName()

template<typename T , bool is_ad>
bool MaterialPropertyInterface::hasGenericMaterialPropertyByName ( const std::string &  name)
inline

Definition at line 398 of file MaterialPropertyInterface.h.

399  {
400  if constexpr (is_ad)
401  return hasADMaterialPropertyByName<T>(name);
402  else
403  return hasMaterialPropertyByName<T>(name);
404  }
std::string name(const ElemQuality q)

◆ hasKokkosMaterialProperty()

template<typename T , unsigned int dimension>
bool MaterialPropertyInterface::hasKokkosMaterialProperty ( const std::string &  name)

Definition at line 944 of file MaterialPropertyInterface.h.

945 {
946  // Check if the supplied parameter is a valid input parameter key
947  const auto prop_name = getMaterialPropertyName(name);
948  return hasKokkosMaterialPropertyByName<T, dimension>(prop_name);
949 }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ hasKokkosMaterialPropertyByName()

template<typename T , unsigned int dimension>
bool MaterialPropertyInterface::hasKokkosMaterialPropertyByName ( const std::string &  name)

Definition at line 953 of file MaterialPropertyInterface.h.

954 {
955  const auto name = _get_suffix.empty()
956  ? name_in
957  : MooseUtils::join(std::vector<std::string>({name_in, _get_suffix}), "_");
958  return _material_data.haveKokkosProperty<T, dimension>(name);
959 }
std::string name(const ElemQuality q)
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
MaterialData & _material_data
The material data class that stores properties.
const MaterialPropertyName _get_suffix
bool haveKokkosProperty(const std::string &prop_name) const
Get whether a Kokkos material property exists.
Definition: MaterialData.h:444

◆ hasMaterialProperty()

template<typename T >
bool MaterialPropertyInterface::hasMaterialProperty ( const std::string &  name)

Check if the material property exists.

Parameters
namethe name of the property to query
Returns
true if the property exists, otherwise false

Definition at line 777 of file MaterialPropertyInterface.h.

778 {
779  // Check if the supplied parameter is a valid input parameter key
780  const auto prop_name = getMaterialPropertyName(name);
781  return hasMaterialPropertyByName<T>(prop_name);
782 }
MaterialPropertyName getMaterialPropertyName(const std::string &name) const

◆ hasMaterialPropertyByName()

template<typename T >
bool MaterialPropertyInterface::hasMaterialPropertyByName ( const std::string &  name)

Definition at line 786 of file MaterialPropertyInterface.h.

787 {
788  const auto name = _get_suffix.empty()
789  ? name_in
790  : MooseUtils::join(std::vector<std::string>({name_in, _get_suffix}), "_");
791  return _material_data.haveProperty<T>(name);
792 }
std::string name(const ElemQuality q)
std::string join(Iterator begin, Iterator end, const std::string &delimiter)
Python-like join function for strings over an iterator range.
Definition: MooseUtils.h:142
bool haveProperty(const std::string &prop_name) const
Returns true if the regular material property exists - defined by any material.
Definition: MaterialData.h:93
MaterialData & _material_data
The material data class that stores properties.
const MaterialPropertyName _get_suffix

◆ markMatPropRequested()

void MaterialPropertyInterface::markMatPropRequested ( const std::string &  name)
protected

A proxy method for _mi_feproblem.markMatPropRequested(name)

Definition at line 174 of file MaterialPropertyInterface.C.

Referenced by getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

175 {
177 }
FEProblemBase & _mi_feproblem
Reference to the FEProblemBase class.
virtual void markMatPropRequested(const std::string &)
Helper method for adding a material property name to the _material_property_requested set...
Definition: SubProblem.C:724

◆ resolveOptionalProperties()

void MaterialPropertyInterface::resolveOptionalProperties ( )
virtual

resolve all optional properties

Reimplemented in Material.

Definition at line 270 of file MaterialPropertyInterface.C.

271 {
272  for (auto & proxy : _optional_property_proxies)
273  proxy->resolve(*this);
274 }
std::vector< std::unique_ptr< OptionalMaterialPropertyProxyBase< MaterialPropertyInterface > > > _optional_property_proxies
optional material properties

◆ statefulPropertiesAllowed()

void MaterialPropertyInterface::statefulPropertiesAllowed ( bool  stateful_allowed)

Derived classes can declare whether or not they work with stateful material properties.

See, for example, DiracKernel. By default, they are allowed.

Definition at line 180 of file MaterialPropertyInterface.C.

Referenced by DiracKernelBase::DiracKernelBase(), and DiracKernelTempl< T >::DiracKernelTempl().

181 {
182  _stateful_allowed = stateful_allowed;
183 }
bool _stateful_allowed
True by default.

◆ validParams()

InputParameters MaterialPropertyInterface::validParams ( )
static

Definition at line 20 of file MaterialPropertyInterface.C.

Referenced by QuadraturePointMarker::validParams(), IntegratedBCBase::validParams(), GeneralUserObject::validParams(), TwoMaterialPropertyInterface::validParams(), NodalDamper::validParams(), KernelBase::validParams(), FVElementalKernel::validParams(), DiracKernelBase::validParams(), ElementIndicator::validParams(), SideUserObject::validParams(), ElementDamper::validParams(), ElementUserObject::validParams(), Material::validParams(), Indicator::validParams(), InitialConditionBase::validParams(), Moose::Kokkos::Material< KokkosGenericConstantMaterial >::validParams(), and AuxKernelTempl< Real >::validParams().

21 {
24  "_material_data_type"); // optionally force the type of MaterialData to utilize
25  params.addParam<MaterialPropertyName>("prop_getter_suffix",
26  "",
27  "An optional suffix parameter that can be appended to any "
28  "attempt to retrieve/get material properties. The suffix "
29  "will be prepended with a '_' character.");
30  params.addParam<bool>(
31  "use_interpolated_state",
32  false,
33  "For the old and older state use projected material properties interpolated at the "
34  "quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.");
35  params.addParamNamesToGroup("use_interpolated_state prop_getter_suffix",
36  "Material property retrieval");
37 
38  return params;
39 }
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:692
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...

Member Data Documentation

◆ _default_properties

std::vector<std::unique_ptr<PropertyValue> > MaterialPropertyInterface::_default_properties
protected

Storage vector for default properties.

Definition at line 646 of file MaterialPropertyInterface.h.

Referenced by defaultGenericMaterialProperty().

◆ _get_material_property_called

bool MaterialPropertyInterface::_get_material_property_called
protected

Initialized to false.

Gets set to true when getMaterialProperty() is called. Clients of this class can inquire whether getMaterialProperty() has been called by calling getMaterialPropertyCalled().

Definition at line 643 of file MaterialPropertyInterface.h.

Referenced by getGenericMaterialPropertyByName(), getKokkosMaterialPropertyByName(), and getMaterialPropertyCalled().

◆ _get_suffix

const MaterialPropertyName MaterialPropertyInterface::_get_suffix
protected

◆ _interpolated_old

const std::string MaterialPropertyInterface::_interpolated_old = "_interpolated_old"
staticprotected

name suffixes for interpolated old and older properties

Definition at line 657 of file MaterialPropertyInterface.h.

Referenced by Material::getGenericMaterialPropertyByName(), and getGenericMaterialPropertyByName().

◆ _interpolated_older

const std::string MaterialPropertyInterface::_interpolated_older = "_interpolated_older"
staticprotected

◆ _is_kokkos_object

const bool MaterialPropertyInterface::_is_kokkos_object
protected

Whether the MOOSE object is a Kokkos object.

Definition at line 575 of file MaterialPropertyInterface.h.

Referenced by getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

◆ _material_data

MaterialData& MaterialPropertyInterface::_material_data
protected

◆ _material_data_type

const Moose::MaterialDataType MaterialPropertyInterface::_material_data_type
protected

◆ _material_property_dependencies

std::unordered_set<unsigned int> MaterialPropertyInterface::_material_property_dependencies
protected

The set of material properties (as given by their IDs) that this object depends on.

Definition at line 649 of file MaterialPropertyInterface.h.

Referenced by getBlockMaterialProperty(), getGenericMaterialPropertyByName(), getKokkosMaterialPropertyByName(), and getMatPropDependencies().

◆ _mi_block_ids

const std::set<SubdomainID>& MaterialPropertyInterface::_mi_block_ids
private

◆ _mi_boundary_ids

const std::set<BoundaryID>& MaterialPropertyInterface::_mi_boundary_ids
private

Storage for the boundary ids created by BoundaryRestrictable.

Definition at line 684 of file MaterialPropertyInterface.h.

Referenced by checkBlockAndBoundaryCompatibility(), and checkMaterialProperty().

◆ _mi_boundary_restricted

const bool MaterialPropertyInterface::_mi_boundary_restricted
private

BoundaryRestricted flag.

Definition at line 678 of file MaterialPropertyInterface.h.

Referenced by checkMaterialProperty().

◆ _mi_feproblem

FEProblemBase& MaterialPropertyInterface::_mi_feproblem
protected

◆ _mi_moose_object

const MooseObject& MaterialPropertyInterface::_mi_moose_object
private

◆ _mi_moose_object_name

const MooseObjectName MaterialPropertyInterface::_mi_moose_object_name
protected

The "complete" name of the object that this interface belongs for material property output.

Definition at line 563 of file MaterialPropertyInterface.h.

Referenced by getBlockMaterialProperty(), getGenericMaterialPropertyByName(), and getKokkosMaterialPropertyByName().

◆ _mi_name

const std::string MaterialPropertyInterface::_mi_name
protected

The name of the object that this interface belongs to.

Definition at line 560 of file MaterialPropertyInterface.h.

Referenced by checkMaterialProperty().

◆ _mi_params

const InputParameters& MaterialPropertyInterface::_mi_params
protected

Parameters of the object with this interface.

Definition at line 557 of file MaterialPropertyInterface.h.

Referenced by checkBlockAndBoundaryCompatibility(), getMaterial(), getMaterialDataType(), and getMaterialPropertyName().

◆ _mi_subproblem

SubProblem& MaterialPropertyInterface::_mi_subproblem
protected

Reference to the subproblem.

Definition at line 569 of file MaterialPropertyInterface.h.

◆ _mi_tid

const THREAD_ID MaterialPropertyInterface::_mi_tid
protected

Current threaded it.

Definition at line 572 of file MaterialPropertyInterface.h.

Referenced by buildRequiredMaterials(), and getMaterialByName().

◆ _optional_property_proxies

std::vector<std::unique_ptr<OptionalMaterialPropertyProxyBase<MaterialPropertyInterface> > > MaterialPropertyInterface::_optional_property_proxies
private

optional material properties

Definition at line 688 of file MaterialPropertyInterface.h.

Referenced by getGenericOptionalMaterialProperty(), and resolveOptionalProperties().

◆ _stateful_allowed

bool MaterialPropertyInterface::_stateful_allowed
protected

True by default.

If false, this class throws an error if any of the stateful material properties interfaces are used.

Definition at line 636 of file MaterialPropertyInterface.h.

Referenced by getPossiblyConstantGenericMaterialPropertyByName(), and statefulPropertiesAllowed().

◆ _use_interpolated_state

const bool MaterialPropertyInterface::_use_interpolated_state
protected

Use the interpolated state set up through the ProjectedStatefulMaterialStorageAction.

Definition at line 654 of file MaterialPropertyInterface.h.

Referenced by Material::getGenericMaterialPropertyByName(), and getGenericMaterialPropertyByName().

◆ default_property_id

constexpr PropertyValue::id_type MaterialPropertyInterface::default_property_id
static
Initial value:

The material property ID for a default (parsed from input) property.

Definition at line 87 of file MaterialPropertyInterface.h.

Referenced by defaultGenericMaterialProperty().

◆ zero_property_id

constexpr PropertyValue::id_type MaterialPropertyInterface::zero_property_id = PropertyValue::invalid_property_id - 2
static

The material property ID for a zero property.

Definition at line 90 of file MaterialPropertyInterface.h.

Referenced by MaterialBase::getGenericZeroMaterialProperty(), and getGenericZeroMaterialProperty().


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