18 #include "libmesh/fe_type.h" 35 virtual void act()
override;
46 template <
typename T,
bool is_ad>
50 template <
typename T,
int I>
54 const MaterialPropertyName & prop_name)
56 self->processProperty<T,
false>(prop_name);
57 self->processProperty<T,
true>(prop_name);
61 template <
typename... Ts>
77 template <
typename... Ts>
84 template <
typename T,
bool is_ad>
91 if (!block_data.haveGenericProperty<T, is_ad>(prop_name) &&
92 !boundary_data.haveGenericProperty<T, is_ad>(prop_name))
99 std::vector<VariableName>
vars;
106 for (
const auto & var :
vars)
110 params.set<std::vector<OutputName>>(
"outputs") = {
"none"};
116 const auto type = Registry::getClassName<InterpolatedStatefulMaterialTempl<T>>();
119 params.template set<std::vector<VariableName>>(
"old_state") =
vars;
120 params.template set<MaterialPropertyName>(
"prop_name") = prop_name;
121 _problem->addMaterial(
type,
"_mat_" + prop_name, params);
129 Registry::getClassName<ProjectedStatefulMaterialNodalPatchRecoveryTempl<T, is_ad>>();
132 params.template set<MaterialPropertyName>(
"property") = prop_name;
133 params.template set<MooseEnum>(
"patch_polynomial_order") =
_order;
135 params.template set<bool>(
"force_preaux") =
true;
136 _problem->addUserObject(
type,
"_npruo_" + prop_name, params);
143 std::vector<std::string> auxnames;
151 const auto &
type =
"ProjectedMaterialPropertyNodalPatchRecoveryAux";
156 params.template set<AuxVariableName>(
"variable") =
vars[i];
157 params.template set<unsigned int>(
"component") = i;
158 params.template set<UserObjectName>(
"nodal_patch_recovery_uo") =
"_npruo_" + prop_name;
166 const auto &
type = Registry::getClassName<ProjectedStatefulMaterialAuxTempl<T, is_ad>>();
171 params.template set<AuxVariableName>(
"variable") =
vars[i];
172 params.template set<unsigned int>(
"component") = i;
173 params.template set<MaterialPropertyName>(
"prop") = prop_name;
const std::string _var_type
MooseObject name for the underlying variable type.
Moose::TypeList< Real, RealVectorValue, RankTwoTensor, RankFourTensor > SupportedTypes
List of supported raw types (equivalent AD types are also supported)
Set up AuxKernels and AuxVariables for projected material property storage (PoMPS).
const MooseEnum _order
Variable order to project the properties into.
RelationshipManagerType
Main types of Relationship Managers.
const std::vector< MaterialPropertyName > & _prop_names
Property names for which we will do stateful material property projection.
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
const ExecFlagType EXEC_TIMESTEP_END
static InputParameters validParams()
virtual const std::string & name() const
Get the name of the class.
Factory & _factory
The Factory associated with the MooseApp.
virtual void addRelationshipManagers(Moose::RelationshipManagerType input_rm_type) override
Method to add a relationship manager for the objects being added to the system.
void processProperty(const MaterialPropertyName &prop_name)
const std::string & type() const
Get the type of this class.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
const std::string & _current_task
The current action (even though we have separate instances for each action)
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
FEType _fe_type
FEType for the variables to project the properties into.
ProjectedStatefulMaterialStorageAction(const InputParameters ¶meters)
Serial access requires object data to be stored contiguously.
std::string stringify(const T &t)
conversion to string
static MooseEnum getTypeEnum()
get an enum with all supported types
IntRange< T > make_range(T beg, T end)
static void apply(ProjectedStatefulMaterialStorageAction *self, const MaterialPropertyName &prop_name)
bool addRelationshipManagers(Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
Method to add a relationship manager for the objects being added to the system.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
const InputParameters & parameters() const
Get the parameters of the object.
Helper structure to hold a list of types.
const ExecFlagType EXEC_INITIAL