www.mooseframework.org
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SetupTimeIntegratorAction Class Reference

#include <SetupTimeIntegratorAction.h>

Inheritance diagram for SetupTimeIntegratorAction:
[legend]

Public Member Functions

 SetupTimeIntegratorAction (const InputParameters &parameters)
 
virtual void act () override
 Method to add objects to the simulation or perform other setup tasks. More...
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type) override
 Method to add a relationship manager for the objects being added to the system. More...
 
void addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 Method to add a relationship manager for the objects being added to the system. More...
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 Method to add a relationship manager for the objects being added to the system. More...
 
InputParametersgetObjectParams ()
 Retreive the parameters of the object to be created by this action. More...
 
const InputParametersgetObjectParams () const
 Constant version of retreiving the parameters of the object to be created by this action. More...
 
const std::string & getMooseObjectType () const
 Return the object type to be created. More...
 
void timedAct ()
 The method called externally that causes the action to act() More...
 
const std::string & name () const
 The name of the action. More...
 
const std::string & type () const
 
InputParametersparameters ()
 
const InputParametersparameters () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
template<typename 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. More...
 
bool isParamValid (const std::string &name) const
 
void appendTask (const std::string &task)
 
template<typename... Args>
void paramError (const std::string &param, Args... args)
 Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramWarning (const std::string &param, Args... args)
 Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
template<typename... Args>
void paramInfo (const std::string &param, Args... args)
 Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message. More...
 
std::string getBaseName () const
 Deprecated name methods, use name() More...
 
std::string getShortName () const
 DEPRECATED METHODS. More...
 
template<typename T >
const T & getParam (const std::string &name) const
 Retrieve a parameter for the object. More...
 

Public Attributes

const ConsoleStream _console
 An instance of helper class to write streams to the Console objects. More...
 

Protected Member Functions

void addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 Method to add a relationship manager for the objects being added to the system. More...
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level)
 Call to register a named section for timing. More...
 

Protected Attributes

std::string _type
 The Object type that is being created. More...
 
InputParameters _moose_object_pars
 The parameters for the object to be created. More...
 
InputParameters _pars
 Input parameters for the action. More...
 
std::string _registered_identifier
 
std::string _name
 The name of the action. More...
 
std::string _action_type
 
MooseApp_app
 The MOOSE application this is associated with. More...
 
Factory_factory
 The Factory associated with the MooseApp. More...
 
ActionFactory_action_factory
 Builds Actions. More...
 
std::string _specific_task_name
 This member will only be populated if this Action instance is only designed to handle one task. More...
 
std::set< std::string > _all_tasks
 A list of all the tasks that this Action will satisfy. More...
 
ActionWarehouse_awh
 Reference to ActionWarehouse where we store object build by actions. More...
 
const std::string & _current_task
 The current action (even though we have seperate instances for each action) More...
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 Convenience reference to a problem this action works on. More...
 
PerfID _act_timer
 Timers. More...
 
const InputParameters_pg_params
 Params. More...
 
PerfGraph_perf_graph
 The performance graph to add to. More...
 
std::string _prefix
 A prefix to use for all sections. More...
 

Detailed Description

Definition at line 23 of file SetupTimeIntegratorAction.h.

Constructor & Destructor Documentation

◆ SetupTimeIntegratorAction()

SetupTimeIntegratorAction::SetupTimeIntegratorAction ( const InputParameters parameters)

Definition at line 24 of file SetupTimeIntegratorAction.C.

26 {
27 }
InputParameters & parameters()
Definition: Action.h:89
MooseObjectAction(InputParameters params)

Member Function Documentation

◆ act()

void SetupTimeIntegratorAction::act ( )
overridevirtual

Method to add objects to the simulation or perform other setup tasks.

Implements Action.

Definition at line 30 of file SetupTimeIntegratorAction.C.

31 {
32  _problem->addTimeIntegrator(_type, _name, _moose_object_pars);
33 }
std::string _name
The name of the action.
Definition: Action.h:178
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:217

◆ addRelationshipManagers() [1/4]

void Action::addRelationshipManagers
inherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

Parameters
when_typeThe parameter indicating the normal time for adding either Geometric or Algebraic RelationshipManagers. It may not always be possible to add your RelationshipManager as early as you'd like. In these cases, your DistributedMesh may consume more memory during the problem setup.

Definition at line 92 of file Action.C.

92 {}

◆ addRelationshipManagers() [2/4]

void Action::addRelationshipManagers
inherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

Parameters
when_typeThe parameter indicating the normal time for adding either Geometric or Algebraic RelationshipManagers. It may not always be possible to add your RelationshipManager as early as you'd like. In these cases, your DistributedMesh may consume more memory during the problem setup.
moose_object_parsThe MooseObject to inspect for RelationshipManagers to add

Definition at line 95 of file Action.C.

97 {
98  const auto & buildable_types = moose_object_pars.getBuildableRelationshipManagerTypes();
99 
100  // These need unique names
101  static unsigned int unique_object_id = 0;
102 
103  for (const auto & buildable_type : buildable_types)
104  {
105  unique_object_id++;
106 
107  auto & rm_name = std::get<0>(buildable_type);
108  auto & rm_type = std::get<1>(buildable_type);
109  auto rm_input_parameter_func = std::get<2>(buildable_type);
110 
111  auto new_name = moose_object_pars.get<std::string>("_moose_base") + '_' + name() + '_' +
112  rm_name + "_" + Moose::stringify(rm_type) + " " +
113  std::to_string(unique_object_id);
114 
115  auto rm_params = _factory.getValidParams(rm_name);
116  rm_params.set<Moose::RelationshipManagerType>("rm_type") = rm_type;
117  rm_params.set<std::string>("for_whom") = name();
118 
119  // Figure out if we shouldn't be adding this one yet
120  if (((rm_type & input_rm_type) != input_rm_type) // Does this RM not have the type passed in?
121 
122  || // Or are we adding Geometric but this one needs to be delayed
123 
124  (((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
128  !rm_params.template get<bool>("attach_geometric_early"))
129 
130  || // Or is this an Algebraic and Geometric one that we already added earlier?
131 
132  (((input_rm_type & Moose::RelationshipManagerType::ALGEBRAIC) ==
136  rm_params.template get<bool>("attach_geometric_early")))
137  continue;
138 
139  // If there is a callback for setting the RM parameters let's use it
140  if (rm_input_parameter_func)
141  rm_input_parameter_func(moose_object_pars, rm_params);
142 
143  // If we're doing geometric but we can't build it early - then let's not build it yet
144  // (It will get built when we do algebraic)
145  if ((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
147  !rm_params.get<bool>("attach_geometric_early"))
148  {
149  // We also need to tell the mesh not to delete remote elements yet
150  // Note this will get reset in AddRelationshipManager::act() when attaching Algebraic
151  _mesh->getMesh().allow_remote_element_removal(false);
152 
153  if (_problem->getDisplacedProblem())
154  _problem->getDisplacedProblem()->mesh().getMesh().allow_remote_element_removal(false);
155 
156  // Keep looking for more RMs
157  continue;
158  }
159  // Ok the above block may have told the mesh not to allow remote element removal during the
160  // initial MeshBase::prepare_for_use, which is called after attaching geometric ghosting
161  // functors. If we did tell the mesh not to allow remote element removal **and** we're using a
162  // DistributedMesh, then we need to tell the mesh to allow remote element removal and ensure
163  // that the mesh will delete its remote elements after the EquationSystems init
164  else if (input_rm_type == Moose::RelationshipManagerType::ALGEBRAIC &&
165  (rm_params.get<Moose::RelationshipManagerType>("rm_type") &
168  !rm_params.get<bool>("attach_geometric_early") && _mesh->isDistributedMesh())
169  {
170  _mesh->needsRemoteElemDeletion(true);
171  if (_displaced_mesh)
172  _displaced_mesh->needsRemoteElemDeletion(true);
173  }
174 
175  rm_params.set<MooseMesh *>("mesh") = _mesh.get();
176 
177  if (rm_params.areAllRequiredParamsValid())
178  {
179  auto rm_obj = _factory.create<RelationshipManager>(rm_name, new_name, rm_params);
180 
181  // Delete the resources created on behalf of the RM if it ends up not being added to the App.
182  if (!_app.addRelationshipManager(rm_obj))
184  }
185  else
186  mooseError("Missing required parameters for RelationshipManager " + rm_name + " for object " +
187  name());
188  }
189 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:698
const std::string & name() const
The name of the action.
Definition: Action.h:77
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:67
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Factory & _factory
The Factory associated with the MooseApp.
Definition: Action.h:187
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
Definition: MooseApp.C:1677
std::shared_ptr< MooseMesh > & _displaced_mesh
Definition: Action.h:214
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:75
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61
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...
Definition: Factory.C:166
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:213
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:217
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:184

◆ addRelationshipManagers() [3/4]

void MooseObjectAction::addRelationshipManagers ( Moose::RelationshipManagerType  when_type)
overridevirtualinherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

Parameters
when_typeThe parameter indicating the normal time for adding either Geometric or Algebraic RelationshipManagers. It may not always be possible to add your RelationshipManager as early as you'd like. In these cases, your DistributedMesh may consume more memory during the problem setup.

Reimplemented from Action.

Definition at line 48 of file MooseObjectAction.C.

49 {
51 }
virtual void addRelationshipManagers(Moose::RelationshipManagerType when_type) override
Method to add a relationship manager for the objects being added to the system.
InputParameters _moose_object_pars
The parameters for the object to be created.

◆ addRelationshipManagers() [4/4]

void Action::addRelationshipManagers ( Moose::RelationshipManagerType  when_type,
const InputParameters moose_object_pars 
)
protectedinherited

Method to add a relationship manager for the objects being added to the system.

Relationship managers have to be added relatively early. In many cases before the Action::act() method is called.

Parameters
when_typeThe parameter indicating the normal time for adding either Geometric or Algebraic RelationshipManagers. It may not always be possible to add your RelationshipManager as early as you'd like. In these cases, your DistributedMesh may consume more memory during the problem setup.
moose_object_parsThe MooseObject to inspect for RelationshipManagers to add

Definition at line 95 of file Action.C.

97 {
98  const auto & buildable_types = moose_object_pars.getBuildableRelationshipManagerTypes();
99 
100  // These need unique names
101  static unsigned int unique_object_id = 0;
102 
103  for (const auto & buildable_type : buildable_types)
104  {
105  unique_object_id++;
106 
107  auto & rm_name = std::get<0>(buildable_type);
108  auto & rm_type = std::get<1>(buildable_type);
109  auto rm_input_parameter_func = std::get<2>(buildable_type);
110 
111  auto new_name = moose_object_pars.get<std::string>("_moose_base") + '_' + name() + '_' +
112  rm_name + "_" + Moose::stringify(rm_type) + " " +
113  std::to_string(unique_object_id);
114 
115  auto rm_params = _factory.getValidParams(rm_name);
116  rm_params.set<Moose::RelationshipManagerType>("rm_type") = rm_type;
117  rm_params.set<std::string>("for_whom") = name();
118 
119  // Figure out if we shouldn't be adding this one yet
120  if (((rm_type & input_rm_type) != input_rm_type) // Does this RM not have the type passed in?
121 
122  || // Or are we adding Geometric but this one needs to be delayed
123 
124  (((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
128  !rm_params.template get<bool>("attach_geometric_early"))
129 
130  || // Or is this an Algebraic and Geometric one that we already added earlier?
131 
132  (((input_rm_type & Moose::RelationshipManagerType::ALGEBRAIC) ==
136  rm_params.template get<bool>("attach_geometric_early")))
137  continue;
138 
139  // If there is a callback for setting the RM parameters let's use it
140  if (rm_input_parameter_func)
141  rm_input_parameter_func(moose_object_pars, rm_params);
142 
143  // If we're doing geometric but we can't build it early - then let's not build it yet
144  // (It will get built when we do algebraic)
145  if ((input_rm_type & Moose::RelationshipManagerType::GEOMETRIC) ==
147  !rm_params.get<bool>("attach_geometric_early"))
148  {
149  // We also need to tell the mesh not to delete remote elements yet
150  // Note this will get reset in AddRelationshipManager::act() when attaching Algebraic
151  _mesh->getMesh().allow_remote_element_removal(false);
152 
153  if (_problem->getDisplacedProblem())
154  _problem->getDisplacedProblem()->mesh().getMesh().allow_remote_element_removal(false);
155 
156  // Keep looking for more RMs
157  continue;
158  }
159  // Ok the above block may have told the mesh not to allow remote element removal during the
160  // initial MeshBase::prepare_for_use, which is called after attaching geometric ghosting
161  // functors. If we did tell the mesh not to allow remote element removal **and** we're using a
162  // DistributedMesh, then we need to tell the mesh to allow remote element removal and ensure
163  // that the mesh will delete its remote elements after the EquationSystems init
164  else if (input_rm_type == Moose::RelationshipManagerType::ALGEBRAIC &&
165  (rm_params.get<Moose::RelationshipManagerType>("rm_type") &
168  !rm_params.get<bool>("attach_geometric_early") && _mesh->isDistributedMesh())
169  {
170  _mesh->needsRemoteElemDeletion(true);
171  if (_displaced_mesh)
172  _displaced_mesh->needsRemoteElemDeletion(true);
173  }
174 
175  rm_params.set<MooseMesh *>("mesh") = _mesh.get();
176 
177  if (rm_params.areAllRequiredParamsValid())
178  {
179  auto rm_obj = _factory.create<RelationshipManager>(rm_name, new_name, rm_params);
180 
181  // Delete the resources created on behalf of the RM if it ends up not being added to the App.
182  if (!_app.addRelationshipManager(rm_obj))
184  }
185  else
186  mooseError("Missing required parameters for RelationshipManager " + rm_name + " for object " +
187  name());
188  }
189 }
std::shared_ptr< MooseObject > create(const std::string &obj_name, const std::string &name, InputParameters parameters, THREAD_ID tid=0, bool print_deprecated=true)
Build an object (must be registered) - THIS METHOD IS DEPRECATED (Use create<T>()) ...
Definition: Factory.C:87
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:698
const std::string & name() const
The name of the action.
Definition: Action.h:77
const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & getBuildableRelationshipManagerTypes() const
Returns the list of buildable (or required) RelationshipManager object types for this object...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
InputParameters getValidParams(const std::string &name)
Get valid parameters for the object.
Definition: Factory.C:67
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Factory & _factory
The Factory associated with the MooseApp.
Definition: Action.h:187
bool addRelationshipManager(std::shared_ptr< RelationshipManager > relationship_manager)
Transfers ownership of a RelationshipManager to the application for lifetime management.
Definition: MooseApp.C:1677
std::shared_ptr< MooseMesh > & _displaced_mesh
Definition: Action.h:214
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:75
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:61
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...
Definition: Factory.C:166
std::shared_ptr< MooseMesh > & _mesh
Definition: Action.h:213
RelationshipManagers are used for describing what kinds of non-local resources are needed for an obje...
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:217
MooseApp & _app
The MOOSE application this is associated with.
Definition: Action.h:184

◆ appendTask()

void Action::appendTask ( const std::string &  task)
inlineinherited

Definition at line 118 of file Action.h.

118 { _all_tasks.insert(task); }
std::set< std::string > _all_tasks
A list of all the tasks that this Action will satisfy.
Definition: Action.h:205

◆ getAllTasks()

const std::set<std::string>& Action::getAllTasks ( ) const
inlineinherited

Definition at line 94 of file Action.h.

Referenced by AddKernelAction::act().

94 { return _all_tasks; }
std::set< std::string > _all_tasks
A list of all the tasks that this Action will satisfy.
Definition: Action.h:205

◆ getBaseName()

std::string Action::getBaseName ( ) const
inherited

Deprecated name methods, use name()

Definition at line 200 of file Action.C.

201 {
202  mooseDeprecated("getBaseName() is deprecated.");
203  return MooseUtils::baseName(_name);
204 }
std::string _name
The name of the action.
Definition: Action.h:178
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
std::string baseName(const std::string &name)
Function for string the information before the final / in a parser block.
Definition: MooseUtils.C:369

◆ getCheckedPointerParam()

template<typename T >
T Action::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const
inlineinherited

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 111 of file Action.h.

112  {
113  return parameters().getCheckedPointerParam<T>(name, error_string);
114  }
const std::string & name() const
The name of the action.
Definition: Action.h:77
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...
InputParameters & parameters()
Definition: Action.h:89

◆ getMooseObjectType()

const std::string& MooseObjectAction::getMooseObjectType ( ) const
inlineinherited

Return the object type to be created.

Definition at line 43 of file MooseObjectAction.h.

Referenced by CommonOutputAction::hasConsole().

43 { return _type; }
std::string _type
The Object type that is being created.

◆ getObjectParams() [1/2]

InputParameters& MooseObjectAction::getObjectParams ( )
inlineinherited

Retreive the parameters of the object to be created by this action.

Definition at line 33 of file MooseObjectAction.h.

Referenced by CreateProblemDefaultAction::act(), MaterialOutputAction::act(), CommonOutputAction::create(), AddVariableAction::createInitialConditionAction(), MooseApp::getCheckpointDirectories(), CommonOutputAction::hasConsole(), ActionWarehouse::printInputFile(), and Parser::walkRaw().

33 { return _moose_object_pars; }
InputParameters _moose_object_pars
The parameters for the object to be created.

◆ getObjectParams() [2/2]

const InputParameters& MooseObjectAction::getObjectParams ( ) const
inlineinherited

Constant version of retreiving the parameters of the object to be created by this action.

Definition at line 38 of file MooseObjectAction.h.

38 { return _moose_object_pars; }
InputParameters _moose_object_pars
The parameters for the object to be created.

◆ getParam()

template<typename T >
const T & Action::getParam ( const std::string &  name) const
inherited

Retrieve a parameter for the object.

Parameters
nameThe name of the parameter
Returns
The value of the parameter

Definition at line 225 of file Action.h.

Referenced by CreateDisplacedProblemAction::act(), AddPeriodicBCAction::act(), AddPeriodicBCAction::autoTranslationBoundaries(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), and MooseApp::getCheckpointDirectories().

226 {
227  return InputParameters::getParamHelper(name, _pars, static_cast<T *>(0));
228 }
static const T & getParamHelper(const std::string &name, const InputParameters &pars, const T *the_type)
const std::string & name() const
The name of the action.
Definition: Action.h:77
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172

◆ getShortName()

std::string Action::getShortName ( ) const
inherited

DEPRECATED METHODS.

Definition at line 193 of file Action.C.

194 {
195  mooseDeprecated("getShortName() is deprecated.");
197 }
std::string shortName(const std::string &name)
Function for stripping name after the file / in parser block.
Definition: MooseUtils.C:363
std::string _name
The name of the action.
Definition: Action.h:178
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237

◆ isParamValid()

bool Action::isParamValid ( const std::string &  name) const
inlineinherited

Definition at line 116 of file Action.h.

Referenced by CopyNodalVarsAction::act(), SetAdaptivityOptionsAction::act(), SetupMeshAction::act(), CreateDisplacedProblemAction::act(), AddAuxVariableAction::act(), AddVariableAction::act(), AddVariableAction::addVariable(), AddPeriodicBCAction::autoTranslationBoundaries(), DynamicObjectRegistrationAction::DynamicObjectRegistrationAction(), and SetupMeshAction::setupMesh().

116 { return _pars.isParamValid(name); }
const std::string & name() const
The name of the action.
Definition: Action.h:77
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ name()

const std::string& Action::name ( ) const
inlineinherited

◆ paramError()

template<typename... Args>
void Action::paramError ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an error prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseError - only printing a message using the given args.

Definition at line 127 of file Action.h.

127  {
128  auto prefix = param + ": ";
129  if (!_pars.inputLocation(param).empty())
130  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
131  mooseError(prefix, args...);
132  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ parameters() [1/2]

InputParameters& Action::parameters ( )
inlineinherited

Definition at line 89 of file Action.h.

Referenced by Action::getCheckedPointerParam(), GlobalParamsAction::remove(), GlobalParamsAction::setDoubleIndexParam(), GlobalParamsAction::setScalarParam(), and GlobalParamsAction::setVectorParam().

89 { return _pars; }
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172

◆ parameters() [2/2]

const InputParameters& Action::parameters ( ) const
inlineinherited

Definition at line 90 of file Action.h.

90 { return _pars; }
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172

◆ paramInfo()

template<typename... Args>
void Action::paramInfo ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits an informational message prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseInfo - only printing a message using the given args.

Definition at line 157 of file Action.h.

158  {
159  auto prefix = param + ": ";
160  if (!_pars.inputLocation(param).empty())
161  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
162  mooseInfo(prefix, args...);
163  }
void mooseInfo(Args &&... args)
Emit an informational message with the given stringified, concatenated args.
Definition: MooseError.h:253
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ paramWarning()

template<typename... Args>
void Action::paramWarning ( const std::string &  param,
Args...  args 
)
inlineinherited

Emits a warning prefixed with the file and line number of the given param (from the input file) along with the full parameter path+name followed by the given args as the message.

If this object's parameters were not created directly by the Parser, then this function falls back to the normal behavior of mooseWarning - only printing a message using the given args.

Definition at line 141 of file Action.h.

142  {
143  auto prefix = param + ": ";
144  if (!_pars.inputLocation(param).empty())
145  prefix = _pars.inputLocation(param) + ": (" + _pars.paramFullpath(param) + "):\n";
146  mooseWarning(prefix, args...);
147  }
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:220
InputParameters _pars
Input parameters for the action.
Definition: Action.h:172
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

◆ registerTimedSection()

PerfID PerfGraphInterface::registerTimedSection ( const std::string &  section_name,
const unsigned int  level 
)
protectedinherited

Call to register a named section for timing.

Parameters
section_nameThe name of the code section to be timed
levelThe importance of the timer - lower is more important (0 will always come out)
Returns
The ID of the section - use when starting timing

Definition at line 50 of file PerfGraphInterface.C.

51 {
52  if (_prefix != "")
53  return _perf_graph.registerSection(_prefix + "::" + section_name, level);
54  else
55  return _perf_graph.registerSection(section_name, level);
56 }
PerfGraph & _perf_graph
The performance graph to add to.
std::string _prefix
A prefix to use for all sections.
PerfID registerSection(const std::string &section_name, unsigned int level)
Registers a named section of code.
Definition: PerfGraph.C:42

◆ specificTaskName()

const std::string& Action::specificTaskName ( ) const
inlineinherited

Definition at line 92 of file Action.h.

92 { return _specific_task_name; }
std::string _specific_task_name
This member will only be populated if this Action instance is only designed to handle one task...
Definition: Action.h:198

◆ timedAct()

void Action::timedAct ( )
inherited

The method called externally that causes the action to act()

Definition at line 86 of file Action.C.

87 {
88  TIME_SECTION(_act_timer);
89  act();
90 }
PerfID _act_timer
Timers.
Definition: Action.h:220
virtual void act()=0
Method to add objects to the simulation or perform other setup tasks.

◆ type()

const std::string& Action::type ( ) const
inlineinherited

Member Data Documentation

◆ _act_timer

PerfID Action::_act_timer
protectedinherited

Timers.

Definition at line 220 of file Action.h.

Referenced by Action::timedAct().

◆ _action_factory

ActionFactory& Action::_action_factory
protectedinherited

◆ _action_type

std::string Action::_action_type
protectedinherited

Definition at line 181 of file Action.h.

Referenced by Action::type().

◆ _all_tasks

std::set<std::string> Action::_all_tasks
protectedinherited

A list of all the tasks that this Action will satisfy.

Note: That this is not populated at construction time. However, all tasks will be added prior to act().

Definition at line 205 of file Action.h.

Referenced by Action::appendTask(), and Action::getAllTasks().

◆ _app

MooseApp& Action::_app
protectedinherited

◆ _awh

ActionWarehouse& Action::_awh
protectedinherited

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

An instance of helper class to write streams to the Console objects.

Definition at line 32 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), SetupRecoverFileBaseAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), SimplePredictor::apply(), MultiApp::backup(), FEProblemBase::backupMultiApps(), FEProblemBase::checkProblemIntegrity(), IterationAdaptiveDT::computeAdaptiveDT(), Transient::computeConstrainedDT(), NonlinearSystemBase::computeDamping(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInterpolationDT(), FEProblemBase::computeResidualTags(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MultiAppPostprocessorTransfer::execute(), MultiAppPostprocessorInterpolationTransfer::execute(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), MultiAppPostprocessorToAuxScalarTransfer::execute(), MultiAppScalarToAuxScalarTransfer::execute(), MultiAppVariableValueSampleTransfer::execute(), MultiAppInterpolationTransfer::execute(), MultiAppMeshFunctionTransfer::execute(), MultiAppUserObjectTransfer::execute(), MultiAppProjectionTransfer::execute(), MultiAppVectorPostprocessorTransfer::execute(), MultiAppNearestNodeTransfer::execute(), MultiAppCopyTransfer::execute(), Steady::execute(), MultiAppDTKUserObjectTransfer::execute(), ActionWarehouse::executeActionsWithAction(), ActionWarehouse::executeAllActions(), FEProblemBase::FEProblemBase(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MultiApp::globalAppToLocal(), InversePowerMethod::init(), NonlinearEigen::init(), Steady::init(), FEProblemBase::initialAdaptMesh(), FEProblemBase::initialSetup(), EigenExecutionerBase::inversePowerIteration(), Transient::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseObject::mooseDeprecated(), MooseObject::mooseInfo(), MooseObject::mooseWarning(), PerfGraphOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), ActionWarehouse::printActionDependencySets(), EigenExecutionerBase::printEigenvalue(), MaterialPropertyDebugOutput::printMaterialMap(), SolutionTimeAdaptiveDT::rejectStep(), DT2::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), SimplePredictor::shouldApply(), NonlinearSystem::solve(), PicardSolve::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), PicardSolve::solveStep(), DT2::step(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_task

const std::string& Action::_current_task
protectedinherited

◆ _displaced_mesh

std::shared_ptr<MooseMesh>& Action::_displaced_mesh
protectedinherited

◆ _factory

Factory& Action::_factory
protectedinherited

◆ _mesh

std::shared_ptr<MooseMesh>& Action::_mesh
protectedinherited

◆ _moose_object_pars

InputParameters MooseObjectAction::_moose_object_pars
protectedinherited

◆ _name

std::string Action::_name
protectedinherited

◆ _pars

InputParameters Action::_pars
protectedinherited

◆ _perf_graph

PerfGraph& PerfGraphInterface::_perf_graph
protectedinherited

The performance graph to add to.

Definition at line 66 of file PerfGraphInterface.h.

Referenced by PerfGraphData::getValue(), and PerfGraphInterface::registerTimedSection().

◆ _pg_params

const InputParameters* PerfGraphInterface::_pg_params
protectedinherited

Params.

Definition at line 63 of file PerfGraphInterface.h.

◆ _prefix

std::string PerfGraphInterface::_prefix
protectedinherited

A prefix to use for all sections.

Definition at line 69 of file PerfGraphInterface.h.

Referenced by PerfGraphInterface::registerTimedSection().

◆ _problem

std::shared_ptr<FEProblemBase>& Action::_problem
protectedinherited

Convenience reference to a problem this action works on.

Definition at line 217 of file Action.h.

Referenced by AddBCAction::act(), AddBoundsVectorsAction::act(), AddMarkerAction::act(), AddTransferAction::act(), AddInitialConditionAction::act(), AddICAction::act(), CheckIntegrityAction::act(), CopyNodalVarsAction::act(), AddMultiAppAction::act(), AddVectorPostprocessorAction::act(), InitProblemAction::act(), AddIndicatorAction::act(), AddPostprocessorAction::act(), SetupDampersAction::act(), AddMaterialAction::act(), AddScalarKernelAction::act(), AddUserObjectAction::act(), AddDamperAction::act(), SetAdaptivityOptionsAction::act(), AddDGKernelAction::act(), AddDiracKernelAction::act(), AddNodalKernelAction::act(), AddKernelAction::act(), CreateExecutionerAction::act(), AddConstraintAction::act(), AddElementalFieldAction::act(), AddInterfaceKernelAction::act(), CreateProblemAction::act(), CreateProblemDefaultAction::act(), AddFieldSplitAction::act(), AdaptivityAction::act(), SetupDebugAction::act(), AddDistributionAction::act(), SetupPreconditionerAction::act(), SetupPredictorAction::act(), act(), SetupTimeStepperAction::act(), AddFunctionAction::act(), CreateDisplacedProblemAction::act(), SetupResidualDebugAction::act(), MaterialDerivativeTestAction::act(), SetupQuadratureAction::act(), DisplayGhostingAction::act(), AddSamplerAction::act(), AddExternalAuxVariableAction::act(), AddOutputAction::act(), AddAuxVariableAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), AddControlAction::act(), SetupPostprocessorDataAction::act(), AddNodalNormalsAction::act(), Action::addRelationshipManagers(), AddVariableAction::addVariable(), AddPeriodicBCAction::autoTranslationBoundaries(), CheckOutputAction::checkMaterialOutput(), AddVariableAction::getSubdomainIDs(), and AddPeriodicBCAction::setPeriodicVars().

◆ _registered_identifier

std::string Action::_registered_identifier
protectedinherited

Definition at line 175 of file Action.h.

◆ _specific_task_name

std::string Action::_specific_task_name
protectedinherited

This member will only be populated if this Action instance is only designed to handle one task.

This happens when an Action is registered with several pieces of syntax in which case separate instances are built to handle the different incoming parameter values.

Definition at line 198 of file Action.h.

Referenced by Action::specificTaskName().

◆ _type

std::string MooseObjectAction::_type
protectedinherited

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