38 params.
addParam<std::vector<std::string>>(
40 "Adds user-defined labels for accessing object parameters via control logic.");
52 (parameters.getObjectType() !=
"" ?
std::string(
"::") + parameters.getObjectType()
54 (parameters.getObjectName() !=
"" ?
std::string(
"::") + parameters.getObjectName()
56 (parameters.isParamValid(
"task") && parameters.
get<
std::string>(
"task") !=
"" 57 ?
std::string(
"::") + parameters.
get<
std::string>(
"task")
59 _registered_identifier(isParamValid(
"registered_identifier")
60 ? getParam<
std::string>(
"registered_identifier")
62 _specific_task_name(_pars.isParamValid(
"task") ? getParam<
std::string>(
"task") :
""),
64 _current_task(_awh.getCurrentTaskName()),
66 _displaced_mesh(_awh.displacedMesh()),
67 _problem(_awh.problemBase()),
68 _act_timer(registerTimedSection(
"act", 4))
71 mooseError(
"This object was not constructed using the ActionFactory, which is not supported.");
91 static unsigned int unique_object_id = 0;
93 auto new_name = moose_object_pars.
getBase() +
'_' +
name() +
'_' + rm_name +
"_" +
99 rm_params.set<std::string>(
"for_whom") =
name();
102 if (rm_input_parameter_func)
103 rm_input_parameter_func(moose_object_pars, rm_params);
107 if (!rm_params.areAllRequiredParamsValid())
108 mooseError(
"Missing required parameters for RelationshipManager " + rm_name +
" for object " +
137 for (
const auto & buildable_type : buildable_types)
139 auto & rm_name = std::get<0>(buildable_type);
140 auto & rm_type = std::get<1>(buildable_type);
141 auto rm_input_parameter_func = std::get<2>(buildable_type);
144 input_rm_type, moose_object_pars, rm_name, rm_type, rm_input_parameter_func) ||
159 const std::string & param_name,
163 if (!to_hit_node || to_hit_node->isRoot())
165 if (
const auto hit_node = from_params.
getHitNode(param_name))
167 else if (
const auto hit_node = from_params.
getHitNode())
RelationshipManagerType
Main types of Relationship Managers.
Factory & _factory
The Factory associated with the MooseApp.
Action(const InputParameters ¶meters)
const InputParameters & parameters() const
Get the parameters of the object.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, const InputParameters ¶meters, THREAD_ID tid=0, bool print_deprecated=true)
static InputParameters validParams()
Parameters that are processed directly by the Parser and are valid anywhere in the input...
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
Storage for action instances.
static const std::string unique_action_name_param
The name of the parameter that contains the unique action name.
bool addRelationshipManager(Moose::RelationshipManagerType input_rm_type, const InputParameters &moose_object_pars, std::string rm_name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback rm_input_parameter_func, Moose::RMSystemType sys_type=Moose::RMSystemType::NONE)
Method for adding a single relationship manager.
ActionFactory & getActionFactory()
Retrieve a writable reference to the ActionFactory associated with this App.
static InputParameters validParams()
const std::string & name() const
Get the name of the class.
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
static InputParameters validParams()
std::function< void(const InputParameters &, InputParameters &)> RelationshipManagerInputParameterCallback
The type for the callback to set RelationshipManager parameters.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
MooseApp & _app
The MOOSE application this is associated with.
std::string stringify(const T &t)
conversion to string
Interface for objects interacting with the PerfGraph.
void releaseSharedObjects(const MooseObject &moose_object, THREAD_ID tid=0)
Releases any shared resources created as a side effect of creating an object through the Factory::cre...
std::shared_ptr< MooseMesh > & _mesh
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
const InputParameters * currentlyConstructing() const
void timedAct()
The method called externally that causes the action to act()
void associateWithParameter(const std::string ¶m_name, InputParameters ¶ms) const
Associates the object's parameters params with the input location from this Action's parameter with t...
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
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.
virtual void act()=0
Method to add objects to the simulation or perform other setup tasks.
Base class shared by both Action and MooseObject.