Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ActionWarehouse Class Reference

Storage for action instances. More...

#include <ActionWarehouse.h>

Inheritance diagram for ActionWarehouse:
[legend]

Public Member Functions

 ActionWarehouse (MooseApp &app, Syntax &syntax, ActionFactory &factory)
 
 ~ActionWarehouse ()
 
void build ()
 Builds all auto-buildable tasks. More...
 
void clear ()
 This method deletes all of the Actions in the warehouse. More...
 
bool empty () const
 returns a Boolean indicating whether the warehouse is empty or not. More...
 
void addActionBlock (std::shared_ptr< Action > blk)
 This method add an Action instance to the warehouse. More...
 
void checkUnsatisfiedActions () const
 This method checks the actions stored in the warehouse against the list of required registered actions to see if all of them have been satisfied. More...
 
void printActionDependencySets () const
 This method is used only during debugging when show_actions is set to true. More...
 
void printInputFile (std::ostream &out)
 This method uses the Actions in the warehouse to reproduce the input file. More...
 
const std::vector< std::shared_ptr< Action > > & allActionBlocks () const
 Returns a reference to all of the actions. More...
 
const std::list< Action * > & getActionListByName (const std::string &task) const
 Retrieve a constant list of Action pointers associated with the passed in task. More...
 
template<class T >
const T & getAction (const std::string &name) const
 Retrieve an action with its name and the desired type. More...
 
template<class T >
T * getPhysics (const std::string &name) const
 
template<class T >
std::vector< const T * > getActions ()
 Retrieve all actions in a specific type ordered by their names. More...
 
template<class T >
std::vector< T * > getPhysics ()
 Retrieve all Physics with a specific type ordered by their names. More...
 
template<class T >
const T * getActionByTask (const std::string &task)
 Retrieve the action on a specific task with its type. More...
 
void setFinalTask (const std::string &task)
 
bool hasActions (const std::string &task) const
 Check if Actions associated with passed in task exist. More...
 
void executeAllActions ()
 This method loops over all actions in the warehouse and executes them. More...
 
void executeActionsWithAction (const std::string &name)
 This method executes only the actions in the warehouse that satisfy the task passed in. More...
 
void showActionDependencies (bool state=true)
 This method sets a Boolean which is used to print information about action dependencies before various warehouse operations during the problem setup phase. More...
 
void showActions (bool state=true)
 This method sets a Boolean which is used to show information about action execution of various warehouse operations during the problem setup phase. More...
 
void showParser (bool state=true)
 This method sets a Boolean which is used to show debugging information when actions are inserted in the warehouse by the parser. More...
 
Syntaxsyntax ()
 
std::shared_ptr< MooseMesh > & mesh ()
 
const std::shared_ptr< MooseMesh > & getMesh () const
 
std::shared_ptr< MooseMesh > & displacedMesh ()
 
const std::shared_ptr< MooseMesh > & getDisplacedMesh () const
 
std::shared_ptr< FEProblemBase > & problemBase ()
 
std::shared_ptr< FEProblemproblem ()
 
MooseAppmooseApp ()
 
const std::string & getMooseAppName ()
 
const std::string & getCurrentTaskName () const
 
const ActiongetCurrentAction () const
 
std::string getCurrentActionName () const
 
bool hasTask (const std::string &task) const
 
bool isTaskComplete (const std::string &task) const
 
ActionIterator actionBlocksWithActionBegin (const std::string &task)
 Iterators to the Actions in the warehouse. More...
 
ActionIterator actionBlocksWithActionEnd (const std::string &task)
 

Public Attributes

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

Protected Member Functions

void buildBuildableActions (const std::string &task)
 This method auto-builds all Actions that needs to be built and adds them to ActionWarehouse. More...
 

Protected Attributes

std::vector< std::shared_ptr< Action > > _all_ptrs
 
MooseApp_app
 The MooseApp this Warehouse is associated with. More...
 
Syntax_syntax
 Reference to a "syntax" of actions. More...
 
ActionFactory_action_factory
 The Factory that builds Actions. More...
 
std::map< std::string, std::list< Action * > > _action_blocks
 Pointers to the actual parsed input file blocks. More...
 
std::vector< std::string > _ordered_names
 The container that holds the sorted action names from the DependencyResolver. More...
 
std::set< std::string > _completed_tasks
 The completed tasks. More...
 
std::set< std::string > _unsatisfied_dependencies
 Use to store the current list of unsatisfied dependencies. More...
 
bool _generator_valid
 Flag to indicate whether or not there is an active iterator on this class. More...
 
bool _show_action_dependencies
 Whether or not the action warehouse prints the action dependency information. More...
 
bool _show_actions
 Whether or not the action warehouse prints the action execution information. More...
 
bool _show_parser
 Whether or not to print messages when actions are inserted in the warehouse by the parser. More...
 
std::string _current_task
 
Action_current_action
 
std::shared_ptr< MooseMesh_mesh
 Mesh class. More...
 
std::shared_ptr< MooseMesh_displaced_mesh
 Possible mesh for displaced problem. More...
 
std::shared_ptr< FEProblemBase_problem
 Problem class. More...
 

Private Attributes

std::string _final_task
 Last task to run before (optional) early termination - blank means no early termination. More...
 
const std::list< Action * > _empty_action_list
 
std::mutex _completed_tasks_mutex
 Mutex for preventing read/write races for _completed_tasks. More...
 

Detailed Description

Storage for action instances.

Definition at line 35 of file ActionWarehouse.h.

Constructor & Destructor Documentation

◆ ActionWarehouse()

ActionWarehouse::ActionWarehouse ( MooseApp app,
Syntax syntax,
ActionFactory factory 
)

Definition at line 27 of file ActionWarehouse.C.

29  _app(app),
30  _syntax(syntax),
31  _action_factory(factory),
32  _generator_valid(false),
34  _show_actions(false),
35  _show_parser(false),
36  _current_action(nullptr),
37  _mesh(nullptr),
38  _displaced_mesh(nullptr)
39 {
40 }
bool _show_parser
Whether or not to print messages when actions are inserted in the warehouse by the parser...
Syntax & _syntax
Reference to a "syntax" of actions.
ConsoleStreamInterface(MooseApp &app)
A class for providing a helper stream object for writting message to all the Output objects...
std::shared_ptr< MooseMesh > _displaced_mesh
Possible mesh for displaced problem.
bool _generator_valid
Flag to indicate whether or not there is an active iterator on this class.
std::shared_ptr< MooseMesh > _mesh
Mesh class.
bool _show_actions
Whether or not the action warehouse prints the action execution information.
MooseApp & _app
The MooseApp this Warehouse is associated with.
Action * _current_action
bool _show_action_dependencies
Whether or not the action warehouse prints the action dependency information.
ActionFactory & _action_factory
The Factory that builds Actions.

◆ ~ActionWarehouse()

ActionWarehouse::~ActionWarehouse ( )

Definition at line 42 of file ActionWarehouse.C.

42 {}

Member Function Documentation

◆ actionBlocksWithActionBegin()

ActionIterator ActionWarehouse::actionBlocksWithActionBegin ( const std::string &  task)

Iterators to the Actions in the warehouse.

Iterators should always be used when executing Actions to capture dynamically added Actions (meta-Actions). Meta-Actions are allowed to create and add additional Actions to the warehouse on the fly. Those Actions will fire as long as their associated task hasn't already passed (i.e. matches or is later).

Definition at line 175 of file ActionWarehouse.C.

Referenced by SetupDampersAction::act(), executeActionsWithAction(), Moose::Builder::extractParams(), and CommonOutputAction::hasConsole().

176 {
177  return _action_blocks[task].begin();
178 }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.

◆ actionBlocksWithActionEnd()

ActionIterator ActionWarehouse::actionBlocksWithActionEnd ( const std::string &  task)

Definition at line 181 of file ActionWarehouse.C.

Referenced by SetupDampersAction::act(), executeActionsWithAction(), Moose::Builder::extractParams(), and CommonOutputAction::hasConsole().

182 {
183  return _action_blocks[task].end();
184 }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.

◆ addActionBlock()

void ActionWarehouse::addActionBlock ( std::shared_ptr< Action blk)

This method add an Action instance to the warehouse.

Note: This routine uses the XTerm colors directly which is not advised for general purpose output coloring. Most users should prefer using Problem::colorText() which respects the "color_output" option for terminals that do not support coloring. Since this routine is intended for debugging only and runs before several objects exist in the system, we are just using the constants directly.

We need to see if the current Action satisfies multiple tasks. There are a few cases to consider:

  1. The current Action is registered with multiple syntax blocks. In this case we can only use the current instance to satisfy the specific task listed for this syntax block. We can detect this case by inspecting whether it has a "specific task name" set in the Action instance.
  2. This action does not have a valid "registered identifier" set in the Action instance. This means that this Action was not built by the Parser. It was most likely created through a Meta-Action (See Case 3 for exception). In this case, the ActionFactory itself would have already set the task it found from the build info used to construct the Action so we'd arbitrarily satisfy a single task in this case.
  3. The current Action is registered with only a single syntax block. In this case we can simply re-use the current instance to act and satisfy all registered tasks. This is the normal case where we have a Parser-built Action that does not have a specific task name to satisfy. We will use the Action "type" to retrieve the list of tasks that this Action may satisfy.

Definition at line 79 of file ActionWarehouse.C.

Referenced by AddActionComponentAction::act(), CreateMeshSetupActionsForComponents::act(), buildBuildableActions(), CommonOutputAction::create(), AddVariableAction::createInitialConditionAction(), MooseApp::createMinimalApp(), DumpObjectsProblem::DumpObjectsProblem(), CreateExecutionerAction::setupAutoPreconditioning(), ReadExecutorParamsAction::setupAutoPreconditioning(), and Moose::Builder::walkRaw().

80 {
88  std::string registered_identifier =
89  action->parameters().get<std::string>("registered_identifier");
90  std::set<std::string> tasks;
91 
92  if (_show_parser)
93  Moose::err << COLOR_DEFAULT << "Parsing Syntax: " << COLOR_GREEN << action->name()
94  << '\n'
95  << COLOR_DEFAULT << "Building Action: " << COLOR_DEFAULT << action->type()
96  << '\n'
97  << COLOR_DEFAULT << "Registered Identifier: " << COLOR_GREEN << registered_identifier
98  << '\n'
99  << COLOR_DEFAULT << "Specific Task: " << COLOR_CYAN
100  << action->specificTaskName() << std::endl;
101 
122  if (action->specificTaskName() != "") // Case 1
123  tasks.insert(action->specificTaskName());
124  else if (registered_identifier == "" &&
125  _syntax.getNonDeprecatedSyntaxByAction(action->type()).size() > 1) // Case 2
126  {
127  std::set<std::string> local_tasks = action->getAllTasks();
128  mooseAssert(local_tasks.size() == 1, "More than one task inside of the " << action->name());
129  tasks.insert(*local_tasks.begin());
130  }
131  else // Case 3
132  tasks = _action_factory.getTasksByAction(action->type());
133 
134  // TODO: Now we need to weed out the double registrations!
135  for (const auto & task : tasks)
136  {
137  // Some error checking
138  if (!_syntax.hasTask(task))
139  mooseError("A(n) ", task, " is not a registered task");
140 
141  // Make sure that the ObjectAction task and Action task are consistent
142  // otherwise that means that is action was built by the wrong type
143  std::shared_ptr<MooseObjectAction> moa = std::dynamic_pointer_cast<MooseObjectAction>(action);
144  if (moa.get())
145  {
146  const InputParameters & mparams = moa->getObjectParams();
147 
148  if (mparams.have_parameter<std::string>("_moose_base"))
149  {
150  const std::string & base = mparams.get<std::string>("_moose_base");
151  if (!_syntax.verifyMooseObjectTask(base, task))
152  mooseError("Task ", task, " is not registered to build ", base, " derived objects");
153  }
154  else
155  mooseError("Unable to locate registered base parameter for ", moa->getMooseObjectType());
156  }
157 
158  // Add the current task to current action
159  action->appendTask(task);
160 
161  if (_show_parser)
162  Moose::err << COLOR_YELLOW << "Adding Action: " << COLOR_DEFAULT << action->type()
163  << " (" << COLOR_YELLOW << task << COLOR_DEFAULT << ")" << std::endl;
164 
165  // Add it to the warehouse
166  _action_blocks[task].push_back(action.get());
167  }
168  _all_ptrs.push_back(action);
169 
170  if (_show_parser)
171  Moose::err << std::endl;
172 }
bool hasTask(const std::string &task) const
Returns a Boolean indicating whether or not a task is registered with the syntax object.
Definition: Syntax.C:125
bool _show_parser
Whether or not to print messages when actions are inserted in the warehouse by the parser...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
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.
Syntax & _syntax
Reference to a "syntax" of actions.
std::set< std::string > getTasksByAction(const std::string &action) const
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
std::vector< std::string > getNonDeprecatedSyntaxByAction(const std::string &action, const std::string &task="")
Retrieve the non-deprecated syntax associated with the passed in action type string.
Definition: Syntax.C:237
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::vector< std::shared_ptr< Action > > _all_ptrs
bool verifyMooseObjectTask(const std::string &base, const std::string &task) const
Returns a Boolean indicating whether a task is associated with on of the MOOSE pluggable systems (BAS...
Definition: Syntax.C:334
ActionFactory & _action_factory
The Factory that builds Actions.

◆ allActionBlocks()

const std::vector< std::shared_ptr< Action > > & ActionWarehouse::allActionBlocks ( ) const

Returns a reference to all of the actions.

Definition at line 187 of file ActionWarehouse.C.

Referenced by AddRelationshipManager::act().

188 {
189  return _all_ptrs;
190 }
std::vector< std::shared_ptr< Action > > _all_ptrs

◆ build()

void ActionWarehouse::build ( )

Builds all auto-buildable tasks.

This method is typically called after the Parser has created Actions based on an input file.

Definition at line 53 of file ActionWarehouse.C.

Referenced by MooseApp::createMinimalApp(), and MooseApp::setupOptions().

54 {
56  for (const auto & name : _ordered_names)
58 }
Syntax & _syntax
Reference to a "syntax" of actions.
const std::vector< std::string > & getSortedTask()
Get a list of serialized tasks in a correct dependency order.
Definition: Syntax.C:105
std::vector< std::string > _ordered_names
The container that holds the sorted action names from the DependencyResolver.
void buildBuildableActions(const std::string &task)
This method auto-builds all Actions that needs to be built and adds them to ActionWarehouse.

◆ buildBuildableActions()

void ActionWarehouse::buildBuildableActions ( const std::string &  task)
protected

This method auto-builds all Actions that needs to be built and adds them to ActionWarehouse.

An Action needs to be built if it is associated with a task that is marked as required and all of it's parameters are valid (are not required or have default values supplied).

Parameters
taskThe name of the task to find and build Actions for.

Definition at line 210 of file ActionWarehouse.C.

Referenced by build().

211 {
212  if (_syntax.shouldAutoBuild(task) && _action_blocks[task].empty())
213  {
214  bool ret_value = false;
215  auto it_pair = _action_factory.getActionsByTask(task);
216  for (const auto & action_pair : as_range(it_pair))
217  {
218  InputParameters params = _action_factory.getValidParams(action_pair.second);
219  params.set<ActionWarehouse *>("awh") = this;
220 
221  if (params.areAllRequiredParamsValid())
222  {
223  params.set<std::string>("registered_identifier") = "(AutoBuilt)";
224  addActionBlock(_action_factory.create(action_pair.second, "", params));
225  ret_value = true;
226  }
227  }
228 
229  if (!ret_value)
230  _unsatisfied_dependencies.insert(task);
231  }
232 }
InputParameters getValidParams(const std::string &name)
Definition: ActionFactory.C:92
Syntax & _syntax
Reference to a "syntax" of actions.
std::pair< std::multimap< std::string, std::string >::const_iterator, std::multimap< std::string, std::string >::const_iterator > getActionsByTask(const std::string &task) const
Returns begin and end iterators in a multimap from tasks to actions names.
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Storage for action instances.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void addActionBlock(std::shared_ptr< Action > blk)
This method add an Action instance to the warehouse.
std::shared_ptr< Action > create(const std::string &action, const std::string &action_name, InputParameters &parameters)
Definition: ActionFactory.C:39
bool shouldAutoBuild(const std::string &task) const
Returns a Boolean indicating whether MOOSE should attempt to automatically create an Action to satisf...
Definition: Syntax.C:138
bool areAllRequiredParamsValid() const
This method returns true if all of the parameters in this object are valid (i.e.
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
std::set< std::string > _unsatisfied_dependencies
Use to store the current list of unsatisfied dependencies.
ActionFactory & _action_factory
The Factory that builds Actions.

◆ checkUnsatisfiedActions()

void ActionWarehouse::checkUnsatisfiedActions ( ) const

This method checks the actions stored in the warehouse against the list of required registered actions to see if all of them have been satisfied.

It should be called before running a MOOSE problem

Definition at line 235 of file ActionWarehouse.C.

Referenced by CheckIntegrityAction::act().

236 {
237  std::stringstream oss;
238  bool empty = true;
239 
240  for (const auto & udep : _unsatisfied_dependencies)
241  {
242  if (_action_blocks.find(udep) == _action_blocks.end())
243  {
244  if (empty)
245  empty = false;
246  else
247  oss << " ";
248  oss << udep;
249  }
250  }
251 
252  if (!empty)
253  mooseError(
254  std::string(
255  "The following unsatisfied actions where found while setting up the MOOSE problem:\n") +
256  oss.str() + "\n");
257 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool empty() const
returns a Boolean indicating whether the warehouse is empty or not.
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
std::set< std::string > _unsatisfied_dependencies
Use to store the current list of unsatisfied dependencies.

◆ clear()

void ActionWarehouse::clear ( )

This method deletes all of the Actions in the warehouse.

Definition at line 61 of file ActionWarehouse.C.

Referenced by MooseApp::~MooseApp().

62 {
63  for (auto & ptr : _all_ptrs)
64  ptr.reset();
65 
66  _action_blocks.clear();
67  _generator_valid = false;
68 
69  // Due to the way ActionWarehouse is cleaned up (see MooseApp's
70  // destructor) we must guarantee that ActionWarehouse::clear()
71  // releases all the resources which have to be released _before_ the
72  // _comm object owned by the MooseApp is destroyed.
73  _problem.reset();
74  _displaced_mesh.reset();
75  _mesh.reset();
76 }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
std::shared_ptr< MooseMesh > _displaced_mesh
Possible mesh for displaced problem.
bool _generator_valid
Flag to indicate whether or not there is an active iterator on this class.
std::vector< std::shared_ptr< Action > > _all_ptrs
std::shared_ptr< FEProblemBase > _problem
Problem class.
std::shared_ptr< MooseMesh > _mesh
Mesh class.

◆ displacedMesh()

std::shared_ptr<MooseMesh>& ActionWarehouse::displacedMesh ( )
inline

Definition at line 273 of file ActionWarehouse.h.

Referenced by MooseApp::attachRelationshipManagers(), and MooseApp::removeRelationshipManager().

273 { return _displaced_mesh; }
std::shared_ptr< MooseMesh > _displaced_mesh
Possible mesh for displaced problem.

◆ empty()

bool ActionWarehouse::empty ( ) const
inline

returns a Boolean indicating whether the warehouse is empty or not.

Definition at line 55 of file ActionWarehouse.h.

Referenced by checkUnsatisfiedActions().

55 { return _action_blocks.empty(); }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.

◆ executeActionsWithAction()

void ActionWarehouse::executeActionsWithAction ( const std::string &  name)

This method executes only the actions in the warehouse that satisfy the task passed in.

Definition at line 365 of file ActionWarehouse.C.

Referenced by executeAllActions().

366 {
367  // Set the current task name
368  _current_task = task;
369 
370  for (auto it = actionBlocksWithActionBegin(task); it != actionBlocksWithActionEnd(task); ++it)
371  {
372  _current_action = *it;
373 
374  if (_show_actions)
375  {
376  MemoryUtils::Stats stats;
378  auto usage =
380  _console << "[DBG][ACT] "
381  << "TASK (" << COLOR_YELLOW << std::setw(24) << task << COLOR_DEFAULT << ") "
382  << "TYPE (" << COLOR_YELLOW << std::setw(32) << _current_action->type()
383  << COLOR_DEFAULT << ") "
384  << "NAME (" << COLOR_YELLOW << std::setw(16) << _current_action->name()
385  << COLOR_DEFAULT << ") Memory usage " << usage << "MB" << std::endl;
386  }
387 
389  }
390 
391  _current_action = nullptr;
392 }
bool getMemoryStats(Stats &stats)
get all memory stats for the current process stats The Stats object to fill with the data ...
Definition: MemoryUtils.C:79
std::size_t _physical_memory
Definition: MemoryUtils.h:23
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
void usage(const std::string &progName)
const std::string & type() const
Get the type of this class.
Definition: MooseBase.h:51
bool _show_actions
Whether or not the action warehouse prints the action execution information.
void timedAct()
The method called externally that causes the action to act()
Definition: Action.C:81
ActionIterator actionBlocksWithActionEnd(const std::string &task)
Action * _current_action
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
ActionIterator actionBlocksWithActionBegin(const std::string &task)
Iterators to the Actions in the warehouse.
std::size_t convertBytes(std::size_t bytes, MemUnits unit)
convert bytes to selected unit prefix
Definition: MemoryUtils.C:174
std::string _current_task

◆ executeAllActions()

void ActionWarehouse::executeAllActions ( )

This method loops over all actions in the warehouse and executes them.

Meta-actions may add new actions to the warehouse on the fly and they will still be executed in order

Definition at line 332 of file ActionWarehouse.C.

Referenced by MooseApp::runInputFile().

333 {
334  _completed_tasks.clear();
335 
337  {
338  _console << "[DBG][ACT] Action Dependency Sets:\n";
340 
341  _console << "\n[DBG][ACT] Executing actions:" << std::endl;
342  }
343 
344  for (const auto & task : _ordered_names)
345  {
347  std::scoped_lock lock(_completed_tasks_mutex);
348  _completed_tasks.insert(task);
349  if (_final_task != "" && task == _final_task)
350  break;
351  }
352 
353  if (_show_actions)
354  {
355  MemoryUtils::Stats stats;
357  auto usage =
359  _console << "[DBG][ACT] Finished executing all actions with memory usage " << usage << "MB\n"
360  << std::endl;
361  }
362 }
bool getMemoryStats(Stats &stats)
get all memory stats for the current process stats The Stats object to fill with the data ...
Definition: MemoryUtils.C:79
std::size_t _physical_memory
Definition: MemoryUtils.h:23
void executeActionsWithAction(const std::string &name)
This method executes only the actions in the warehouse that satisfy the task passed in...
void printActionDependencySets() const
This method is used only during debugging when show_actions is set to true.
std::string _final_task
Last task to run before (optional) early termination - blank means no early termination.
std::vector< std::string > _ordered_names
The container that holds the sorted action names from the DependencyResolver.
std::set< std::string > _completed_tasks
The completed tasks.
std::mutex _completed_tasks_mutex
Mutex for preventing read/write races for _completed_tasks.
void usage(const std::string &progName)
bool _show_actions
Whether or not the action warehouse prints the action execution information.
bool _show_action_dependencies
Whether or not the action warehouse prints the action dependency information.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
std::size_t convertBytes(std::size_t bytes, MemUnits unit)
convert bytes to selected unit prefix
Definition: MemoryUtils.C:174

◆ getAction()

template<class T >
const T& ActionWarehouse::getAction ( const std::string &  name) const
inline

Retrieve an action with its name and the desired type.

Parameters
nameThe action name.

Definition at line 111 of file ActionWarehouse.h.

Referenced by PhysicsBase::getActionComponent().

112  {
113  typename std::shared_ptr<T> p;
114  for (auto act_ptr : _all_ptrs)
115  {
116  if (act_ptr->name() == name)
117  {
118  p = std::dynamic_pointer_cast<T>(act_ptr);
119  if (p)
120  break;
121  }
122  }
123  if (!p)
124  {
125  std::vector<std::string> all_names;
126  for (auto act_ptr : _all_ptrs)
127  if (!act_ptr->name().empty())
128  all_names.push_back(act_ptr->name());
129  else
130  all_names.push_back("unnamed");
131  mooseError("Action with name '",
132  name,
133  "' does not exist.\n These are the Actions that do exist:",
134  Moose::stringify(all_names));
135  }
136  return *p;
137  }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
std::vector< std::shared_ptr< Action > > _all_ptrs

◆ getActionByTask()

template<class T >
const T* ActionWarehouse::getActionByTask ( const std::string &  task)
inline

Retrieve the action on a specific task with its type.

Error will be thrown if more than one actions are found.

Parameters
taskThe task name.
Returns
The action pointer. Null means that such an action does not exist.

Definition at line 197 of file ActionWarehouse.h.

Referenced by CreateProblemDefaultAction::act().

198  {
199  const auto it = _action_blocks.find(task);
200  if (it == _action_blocks.end())
201  return nullptr;
202 
203  T * p = nullptr;
204  for (const auto & action : it->second)
205  {
206  T * tp = dynamic_cast<T *>(action);
207  if (tp)
208  {
209  if (p)
210  mooseError("More than one actions have been detected in getActionByTask for the task '",
211  task,
212  "' in the app '",
213  getMooseAppName(),
214  "'");
215  else
216  p = tp;
217  }
218  }
219  return p;
220  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const std::string & getMooseAppName()
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.

◆ getActionListByName()

const std::list< Action * > & ActionWarehouse::getActionListByName ( const std::string &  task) const

Retrieve a constant list of Action pointers associated with the passed in task.

Empty list will be returned if no actions are associated with the task.

Definition at line 193 of file ActionWarehouse.C.

Referenced by ElementIDOutputAction::act(), SetupMeshAction::act(), MeshOnlyAction::act(), SetupTimeStepperAction::act(), MaterialOutputAction::act(), MooseApp::getCheckpointDirectories(), and OutputWarehouse::getOutputNames().

194 {
195  const auto it = _action_blocks.find(task);
196  if (it == _action_blocks.end())
197  return _empty_action_list;
198  else
199  return it->second;
200 }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
const std::list< Action * > _empty_action_list

◆ getActions()

template<class T >
std::vector<const T *> ActionWarehouse::getActions ( )
inline

Retrieve all actions in a specific type ordered by their names.

Definition at line 155 of file ActionWarehouse.h.

Referenced by CombineComponentsMeshes::act(), Console::Console(), NEML2Action::getCommonAction(), PhysicsBase::getCoupledPhysics(), JSONOutput::outputReporters(), MooseApp::setupOptions(), and PetscOutput::solveSetup().

156  {
157  // we need to create the map first to ensure that all actions in the map are unique
158  // and the actions are sorted by their names
159  typename std::map<std::string, const std::shared_ptr<T>> actions;
160  for (auto act_ptr : _all_ptrs)
161  {
162  auto p = std::dynamic_pointer_cast<T>(act_ptr);
163  if (p)
164  actions.insert(std::make_pair(act_ptr->name(), p));
165  }
166  // construct the vector from the map entries
167  std::vector<const T *> action_vector;
168  for (auto & pair : actions)
169  action_vector.push_back(pair.second.get());
170  return action_vector;
171  }
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
std::vector< std::shared_ptr< Action > > _all_ptrs

◆ getCurrentAction()

const Action* ActionWarehouse::getCurrentAction ( ) const
inline
Returns
The current action that is running, if any

Definition at line 285 of file ActionWarehouse.h.

Referenced by MooseApp::getCurrentActionHitNode(), and getCurrentActionName().

285 { return _current_action; }
Action * _current_action

◆ getCurrentActionName()

std::string ActionWarehouse::getCurrentActionName ( ) const
Returns
The name of the current action that is running

Definition at line 450 of file ActionWarehouse.C.

Referenced by DumpObjectsProblem::dumpObjectHelper(), and DumpObjectsProblem::dumpVariableHelper().

451 {
452  return getCurrentAction()->parameters().getHitNode()->fullpath();
453 }
const hit::Node * getHitNode(const std::string &param) const
const Action * getCurrentAction() const
const InputParameters & parameters() const
Get the parameters of the object.

◆ getCurrentTaskName()

const std::string& ActionWarehouse::getCurrentTaskName ( ) const
inline

◆ getDisplacedMesh()

const std::shared_ptr<MooseMesh>& ActionWarehouse::getDisplacedMesh ( ) const
inline

Definition at line 274 of file ActionWarehouse.h.

Referenced by MooseApp::getRelationshipManagerInfo().

274 { return _displaced_mesh; }
std::shared_ptr< MooseMesh > _displaced_mesh
Possible mesh for displaced problem.

◆ getMesh()

const std::shared_ptr<MooseMesh>& ActionWarehouse::getMesh ( ) const
inline

◆ getMooseAppName()

const std::string & ActionWarehouse::getMooseAppName ( )

Definition at line 456 of file ActionWarehouse.C.

Referenced by getActionByTask().

457 {
458  return _app.name();
459 }
virtual const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:57
MooseApp & _app
The MooseApp this Warehouse is associated with.

◆ getPhysics() [1/2]

template<class T >
T* ActionWarehouse::getPhysics ( const std::string &  name) const
inline

Definition at line 139 of file ActionWarehouse.h.

Referenced by ComponentPhysicsInterface::physicsExists().

140  {
141  auto physics = const_cast<T *>(&getAction<T>(name));
142  if (!dynamic_cast<const PhysicsBase *>(physics))
143  mooseError("The Physics requested of type '",
144  MooseUtils::prettyCppType<T>(),
145  "' and name '",
146  name,
147  "' is not derived from the PhysicsBase class");
148  return physics;
149  }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ getPhysics() [2/2]

template<class T >
std::vector<T *> ActionWarehouse::getPhysics ( )
inline

Retrieve all Physics with a specific type ordered by their names.

Definition at line 177 of file ActionWarehouse.h.

178  {
179  const auto physics_vector = getActions<T>();
180  for (const auto phys_ptr : physics_vector)
181  if (!dynamic_cast<const PhysicsBase *>(phys_ptr))
182  mooseError("The Physics requested of type '",
183  MooseUtils::prettyCppType<T>(),
184  "' and name '",
185  phys_ptr->name(),
186  "' is not derived from the PhysicsBase class");
187  return physics_vector;
188  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302

◆ hasActions()

bool ActionWarehouse::hasActions ( const std::string &  task) const

Check if Actions associated with passed in task exist.

Definition at line 203 of file ActionWarehouse.C.

Referenced by ElementIDOutputAction::act(), ReadExecutorParamsAction::act(), CreateExecutionerAction::act(), CreateMeshSetupActionsForComponents::act(), MaterialOutputAction::act(), and OutputWarehouse::getOutputNames().

204 {
205  auto it = _action_blocks.find(task);
206  return it != _action_blocks.end() && !it->second.empty();
207 }
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.

◆ hasTask()

bool ActionWarehouse::hasTask ( const std::string &  task) const
Returns
True if a task with the name task is registered.

Definition at line 462 of file ActionWarehouse.C.

Referenced by AddActionComponentAction::AddActionComponentAction(), and isTaskComplete().

463 {
464  return _action_factory.isRegisteredTask(task);
465 }
bool isRegisteredTask(const std::string &task) const
Whether or not a task with the name task is registered.
ActionFactory & _action_factory
The Factory that builds Actions.

◆ isTaskComplete()

bool ActionWarehouse::isTaskComplete ( const std::string &  task) const
Returns
True if the registered task with the name task is complete.

Definition at line 468 of file ActionWarehouse.C.

Referenced by OutputWarehouse::mooseConsole(), PostprocessorInterface::postprocessorsAdded(), ReporterInterface::reportersAdded(), and VectorPostprocessorInterface::vectorPostprocessorsAdded().

469 {
470  if (!hasTask(task))
471  mooseError("\"", task, "\" is not a registered task.");
472  std::scoped_lock lock(_completed_tasks_mutex);
473  return _completed_tasks.count(task);
474 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool hasTask(const std::string &task) const
std::set< std::string > _completed_tasks
The completed tasks.
std::mutex _completed_tasks_mutex
Mutex for preventing read/write races for _completed_tasks.

◆ mesh()

std::shared_ptr<MooseMesh>& ActionWarehouse::mesh ( )
inline

Definition at line 270 of file ActionWarehouse.h.

Referenced by MeshOnlyAction::act(), SplitMeshAction::act(), MooseApp::attachRelationshipManagers(), and MooseApp::removeRelationshipManager().

270 { return _mesh; }
std::shared_ptr< MooseMesh > _mesh
Mesh class.

◆ mooseApp()

MooseApp& ActionWarehouse::mooseApp ( )
inline

Definition at line 278 of file ActionWarehouse.h.

Referenced by ExodusFormatter::printInputFile(), and SetupDebugAction::SetupDebugAction().

278 { return _app; }
MooseApp & _app
The MooseApp this Warehouse is associated with.

◆ printActionDependencySets()

void ActionWarehouse::printActionDependencySets ( ) const

This method is used only during debugging when show_actions is set to true.

It prints all of the actions sets in the correct dependency resolved order with all of the Action objects inside.

Note: This routine uses the XTerm colors directly which is not advised for general purpose output coloring. Most users should prefer using Problem::colorText() which respects the "color_output" option for terminals that do not support coloring. Since this routine is intended for debugging only and runs before several objects exist in the system, we are just using the constants directly.

Definition at line 260 of file ActionWarehouse.C.

Referenced by executeAllActions().

261 {
271  std::ostringstream oss;
272 
273  const auto & ordered_names = _syntax.getSortedTaskSet();
274  for (const auto & task_vector : ordered_names)
275  {
276  oss << "[DBG][ACT] (" << COLOR_YELLOW;
277  std::copy(
278  task_vector.begin(), task_vector.end(), infix_ostream_iterator<std::string>(oss, ", "));
279  oss << COLOR_DEFAULT << ")\n";
280 
281  std::set<std::string> task_set(task_vector.begin(), task_vector.end());
282  for (const auto & task : task_set)
283  {
284  if (_action_blocks.find(task) == _action_blocks.end())
285  continue;
286 
287  for (const auto & act : _action_blocks.at(task))
288  {
289  // The Syntax of the Action if it exists
290  if (act->name() != "")
291  oss << "[DBG][ACT]\t" << COLOR_GREEN << act->name() << COLOR_DEFAULT << '\n';
292 
293  // The task sets
294  oss << "[DBG][ACT]\t" << act->type();
295  const std::set<std::string> tasks = act->getAllTasks();
296  if (tasks.size() > 1)
297  {
298  oss << " (";
299  // Break the current Action's tasks into 2 sets, those intersecting with current set and
300  // then the difference.
301  std::set<std::string> intersection, difference;
302  std::set_intersection(tasks.begin(),
303  tasks.end(),
304  task_set.begin(),
305  task_set.end(),
306  std::inserter(intersection, intersection.end()));
307  std::set_difference(tasks.begin(),
308  tasks.end(),
309  intersection.begin(),
310  intersection.end(),
311  std::inserter(difference, difference.end()));
312 
313  oss << COLOR_CYAN;
314  std::copy(intersection.begin(),
315  intersection.end(),
316  infix_ostream_iterator<std::string>(oss, ", "));
317  oss << COLOR_MAGENTA << (difference.empty() ? "" : ", ");
318  std::copy(
319  difference.begin(), difference.end(), infix_ostream_iterator<std::string>(oss, ", "));
320  oss << COLOR_DEFAULT << ")";
321  }
322  oss << '\n';
323  }
324  }
325  }
326 
328  _console << oss.str() << std::endl;
329 }
Syntax & _syntax
Reference to a "syntax" of actions.
const std::vector< std::vector< std::string > > & getSortedTaskSet()
Get a list of serialized tasks in a correct dependency order.
Definition: Syntax.C:119
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
bool _show_action_dependencies
Whether or not the action warehouse prints the action dependency information.
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.

◆ printInputFile()

void ActionWarehouse::printInputFile ( std::ostream &  out)

This method uses the Actions in the warehouse to reproduce the input file.

This method is useful for debugging as it can assist in finding difficult to track parsing or input file problems.

Parameters
outA writable ostream object where the output will be sent.

Definition at line 395 of file ActionWarehouse.C.

Referenced by Console::outputInput(), and ExodusFormatter::printInputFile().

396 {
397  InputFileFormatter tree(false);
398 
399  std::map<std::string, std::vector<Action *>>::iterator iter;
400 
401  std::vector<Action *> ordered_actions;
402  for (const auto & block : _action_blocks)
403  for (const auto & act : block.second)
404  ordered_actions.push_back(act);
405 
406  for (const auto & act : ordered_actions)
407  {
408  std::string name;
409  if (act->parameters().blockFullpath() != "")
410  name = act->parameters().blockFullpath();
411  else
412  name = act->name();
413  const std::set<std::string> & tasks = act->getAllTasks();
414  mooseAssert(!tasks.empty(), "Task list is empty");
415 
416  bool is_parent;
417  if (_syntax.isAssociated(name, &is_parent) != "")
418  {
419  const auto & all_params = _app.getInputParameterWarehouse().getInputParameters();
420  InputParameters & params = *(all_params.find(act->uniqueActionName())->second.get());
421 
422  // temporarily allow input parameter copies required by the input file formatter
423  params.allowCopy(true);
424 
425  // TODO: Do we need to insert more nodes for each task?
426  tree.insertNode(name, *tasks.begin(), true, &params);
427  params.allowCopy(false);
428 
429  MooseObjectAction * moose_object_action = dynamic_cast<MooseObjectAction *>(act);
430  if (moose_object_action)
431  {
432  InputParameters obj_params = moose_object_action->getObjectParams();
433  tree.insertNode(name, *tasks.begin(), false, &obj_params);
434  }
435  }
436  }
437 
438  out << tree.print("");
439 }
std::string name(const ElemQuality q)
InputParameterWarehouse & getInputParameterWarehouse()
Get the InputParameterWarehouse for MooseObjects.
Definition: MooseApp.C:2839
Syntax & _syntax
Reference to a "syntax" of actions.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters & getObjectParams()
Retrieve the parameters of the object to be created by this action.
const std::multimap< MooseObjectName, std::shared_ptr< InputParameters > > & getInputParameters(THREAD_ID tid=0) const
Return const reference to the map containing the InputParameter objects.
std::map< std::string, std::list< Action * > > _action_blocks
Pointers to the actual parsed input file blocks.
std::string isAssociated(const std::string &real_id, bool *is_parent, const std::map< std::string, std::set< std::string >> &alt_map={}) const
Method for determining whether a piece of syntax is associated with an Action an optional syntax map ...
Definition: Syntax.C:251
void allowCopy(bool status)
Toggle the availability of the copy constructor.
MooseApp & _app
The MooseApp this Warehouse is associated with.
OStreamProxy out
This class produces produces a dump of the InputParameters that appears like the normal input file sy...

◆ problem()

std::shared_ptr< FEProblem > ActionWarehouse::problem ( )

Definition at line 442 of file ActionWarehouse.C.

443 {
445  "ActionWarehouse::problem() is deprecated, please use ActionWarehouse::problemBase() \n");
447 }
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:20
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
std::shared_ptr< FEProblemBase > _problem
Problem class.

◆ problemBase()

std::shared_ptr<FEProblemBase>& ActionWarehouse::problemBase ( )
inline

Definition at line 276 of file ActionWarehouse.h.

Referenced by Factory::create(), ActionComponent::getProblem(), and Factory::initialize().

276 { return _problem; }
std::shared_ptr< FEProblemBase > _problem
Problem class.

◆ setFinalTask()

void ActionWarehouse::setFinalTask ( const std::string &  task)

Definition at line 45 of file ActionWarehouse.C.

Referenced by MooseApp::setupOptions().

46 {
47  if (!_syntax.hasTask(task))
48  mooseError("cannot use unregistered task '", task, "' as final task");
49  _final_task = task;
50 }
bool hasTask(const std::string &task) const
Returns a Boolean indicating whether or not a task is registered with the syntax object.
Definition: Syntax.C:125
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
Syntax & _syntax
Reference to a "syntax" of actions.
std::string _final_task
Last task to run before (optional) early termination - blank means no early termination.

◆ showActionDependencies()

void ActionWarehouse::showActionDependencies ( bool  state = true)
inline

This method sets a Boolean which is used to print information about action dependencies before various warehouse operations during the problem setup phase.

Parameters
stateFlag indicating whether to print action dependencies.

Definition at line 246 of file ActionWarehouse.h.

Referenced by SetupDebugAction::SetupDebugAction().

246 { _show_action_dependencies = state; }
bool _show_action_dependencies
Whether or not the action warehouse prints the action dependency information.

◆ showActions()

void ActionWarehouse::showActions ( bool  state = true)
inline

This method sets a Boolean which is used to show information about action execution of various warehouse operations during the problem setup phase.

Parameters
stateFlag indicating whether to show action information.

Definition at line 253 of file ActionWarehouse.h.

Referenced by SetupDebugAction::SetupDebugAction().

253 { _show_actions = state; }
bool _show_actions
Whether or not the action warehouse prints the action execution information.

◆ showParser()

void ActionWarehouse::showParser ( bool  state = true)
inline

This method sets a Boolean which is used to show debugging information when actions are inserted in the warehouse by the parser.

Parameters
stateFlag indicating whether to show action insertion.

Definition at line 260 of file ActionWarehouse.h.

Referenced by SetupDebugAction::SetupDebugAction().

260 { _show_parser = state; }
bool _show_parser
Whether or not to print messages when actions are inserted in the warehouse by the parser...

◆ syntax()

Syntax& ActionWarehouse::syntax ( )
inline

Member Data Documentation

◆ _action_blocks

std::map<std::string, std::list<Action *> > ActionWarehouse::_action_blocks
protected

◆ _action_factory

ActionFactory& ActionWarehouse::_action_factory
protected

The Factory that builds Actions.

Definition at line 317 of file ActionWarehouse.h.

Referenced by addActionBlock(), buildBuildableActions(), and hasTask().

◆ _all_ptrs

std::vector<std::shared_ptr<Action> > ActionWarehouse::_all_ptrs
protected

Definition at line 310 of file ActionWarehouse.h.

Referenced by addActionBlock(), allActionBlocks(), clear(), getAction(), and getActions().

◆ _app

MooseApp& ActionWarehouse::_app
protected

The MooseApp this Warehouse is associated with.

Definition at line 313 of file ActionWarehouse.h.

Referenced by getMooseAppName(), mooseApp(), and printInputFile().

◆ _completed_tasks

std::set<std::string> ActionWarehouse::_completed_tasks
protected

The completed tasks.

Definition at line 323 of file ActionWarehouse.h.

Referenced by executeAllActions(), and isTaskComplete().

◆ _completed_tasks_mutex

std::mutex ActionWarehouse::_completed_tasks_mutex
mutableprivate

Mutex for preventing read/write races for _completed_tasks.

Definition at line 367 of file ActionWarehouse.h.

Referenced by executeAllActions(), and isTaskComplete().

◆ _console

const ConsoleStream ConsoleStreamInterface::_console
inherited

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

Definition at line 31 of file ConsoleStreamInterface.h.

Referenced by IterationAdaptiveDT::acceptStep(), MeshOnlyAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), Adaptivity::adaptMesh(), FEProblemBase::adaptMesh(), PerfGraph::addToExecutionList(), SimplePredictor::apply(), SystemBase::applyScalingFactors(), MultiApp::backup(), FEProblemBase::backupMultiApps(), CoarsenedPiecewiseLinear::buildCoarsenedGrid(), MeshDiagnosticsGenerator::checkElementOverlap(), MeshDiagnosticsGenerator::checkElementTypes(), MeshDiagnosticsGenerator::checkElementVolumes(), FEProblemBase::checkExceptionAndStopSolve(), SolverSystem::checkInvalidSolution(), MeshDiagnosticsGenerator::checkLocalJacobians(), MeshDiagnosticsGenerator::checkNonConformalMesh(), MeshDiagnosticsGenerator::checkNonConformalMeshFromAdaptivity(), MeshDiagnosticsGenerator::checkNonMatchingEdges(), MeshDiagnosticsGenerator::checkNonPlanarSides(), FEProblemBase::checkProblemIntegrity(), ReferenceResidualConvergence::checkRelativeConvergence(), MeshDiagnosticsGenerator::checkSidesetsOrientation(), MeshDiagnosticsGenerator::checkWatertightNodesets(), MeshDiagnosticsGenerator::checkWatertightSidesets(), IterationAdaptiveDT::computeAdaptiveDT(), TransientBase::computeConstrainedDT(), DefaultMultiAppFixedPointConvergence::computeCustomConvergencePostprocessor(), NonlinearSystemBase::computeDamping(), FixedPointIterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeDT(), IterationAdaptiveDT::computeFailedDT(), IterationAdaptiveDT::computeInitialDT(), IterationAdaptiveDT::computeInterpolationDT(), LinearSystem::computeLinearSystemTags(), FEProblemBase::computeLinearSystemTags(), NonlinearSystemBase::computeScaling(), Problem::console(), IterationAdaptiveDT::constrainStep(), TimeStepper::constrainStep(), MultiApp::createApp(), FEProblemBase::execMultiApps(), FEProblemBase::execMultiAppTransfers(), MFEMSteady::execute(), MessageFromInput::execute(), SteadyBase::execute(), Eigenvalue::execute(), executeActionsWithAction(), executeAllActions(), MeshGeneratorSystem::executeMeshGenerators(), ElementQualityChecker::finalize(), FEProblemBase::finishMultiAppStep(), MeshRepairGenerator::fixOverlappingNodes(), CoarsenBlockGenerator::generate(), MeshGenerator::generateInternal(), VariableCondensationPreconditioner::getDofToCondense(), InversePowerMethod::init(), NonlinearEigen::init(), FEProblemBase::initialAdaptMesh(), DefaultMultiAppFixedPointConvergence::initialize(), EigenExecutionerBase::inversePowerIteration(), FEProblemBase::joinAndFinalize(), TransientBase::keepGoing(), IterationAdaptiveDT::limitDTByFunction(), IterationAdaptiveDT::limitDTToPostprocessorValue(), FEProblemBase::logAdd(), EigenExecutionerBase::makeBXConsistent(), Console::meshChanged(), MooseBaseErrorInterface::mooseDeprecated(), MooseBaseErrorInterface::mooseInfo(), MooseBaseErrorInterface::mooseWarning(), MooseBaseErrorInterface::mooseWarningNonPrefixed(), ReferenceResidualConvergence::nonlinearConvergenceSetup(), ReporterDebugOutput::output(), PerfGraphOutput::output(), SolutionInvalidityOutput::output(), MaterialPropertyDebugOutput::output(), DOFMapOutput::output(), VariableResidualNormsDebugOutput::output(), Console::output(), ControlOutput::outputActiveObjects(), ControlOutput::outputChangedControls(), ControlOutput::outputControls(), Console::outputInput(), Console::outputPostprocessors(), PseudoTimestep::outputPseudoTimestep(), Console::outputReporters(), DefaultMultiAppFixedPointConvergence::outputResidualNorm(), Console::outputScalarVariables(), Console::outputSystemInformation(), FEProblemBase::possiblyRebuildGeomSearchPatches(), EigenExecutionerBase::postExecute(), AB2PredictorCorrector::postSolve(), printActionDependencySets(), BlockRestrictionDebugOutput::printBlockRestrictionMap(), SolutionInvalidity::printDebug(), EigenExecutionerBase::printEigenvalue(), SecantSolve::printFixedPointConvergenceHistory(), SteffensenSolve::printFixedPointConvergenceHistory(), PicardSolve::printFixedPointConvergenceHistory(), FixedPointSolve::printFixedPointConvergenceReason(), PerfGraphLivePrint::printLiveMessage(), MaterialPropertyDebugOutput::printMaterialMap(), PerfGraphLivePrint::printStats(), NEML2Action::printSummary(), AutomaticMortarGeneration::projectPrimaryNodesSinglePair(), AutomaticMortarGeneration::projectSecondaryNodesSinglePair(), CoarsenBlockGenerator::recursiveCoarsen(), SolutionTimeAdaptiveDT::rejectStep(), MultiApp::restore(), FEProblemBase::restoreMultiApps(), FEProblemBase::restoreSolutions(), NonlinearSystemBase::setInitialSolution(), MooseApp::setupOptions(), Checkpoint::shouldOutput(), SubProblem::showFunctorRequestors(), SubProblem::showFunctors(), FullSolveMultiApp::showStatusMessage(), FEProblemSolve::solve(), FixedPointSolve::solve(), EigenProblem::solve(), NonlinearSystem::solve(), LinearSystem::solve(), LStableDirk2::solve(), LStableDirk3::solve(), ImplicitMidpoint::solve(), ExplicitTVDRK2::solve(), LStableDirk4::solve(), AStableDirk4::solve(), ExplicitRK2::solve(), TransientMultiApp::solveStep(), FixedPointSolve::solveStep(), PerfGraphLivePrint::start(), AB2PredictorCorrector::step(), NonlinearEigen::takeStep(), TransientBase::takeStep(), TerminateChainControl::terminate(), Convergence::verboseOutput(), Console::writeTimestepInformation(), Console::writeVariableNorms(), and FEProblemBase::~FEProblemBase().

◆ _current_action

Action* ActionWarehouse::_current_action
protected

Definition at line 345 of file ActionWarehouse.h.

Referenced by executeActionsWithAction(), and getCurrentAction().

◆ _current_task

std::string ActionWarehouse::_current_task
protected

Definition at line 343 of file ActionWarehouse.h.

Referenced by executeActionsWithAction(), and getCurrentTaskName().

◆ _displaced_mesh

std::shared_ptr<MooseMesh> ActionWarehouse::_displaced_mesh
protected

Possible mesh for displaced problem.

Definition at line 355 of file ActionWarehouse.h.

Referenced by clear(), displacedMesh(), and getDisplacedMesh().

◆ _empty_action_list

const std::list<Action *> ActionWarehouse::_empty_action_list
private

Definition at line 364 of file ActionWarehouse.h.

Referenced by getActionListByName().

◆ _final_task

std::string ActionWarehouse::_final_task
private

Last task to run before (optional) early termination - blank means no early termination.

Definition at line 362 of file ActionWarehouse.h.

Referenced by executeAllActions(), and setFinalTask().

◆ _generator_valid

bool ActionWarehouse::_generator_valid
protected

Flag to indicate whether or not there is an active iterator on this class.

There can only be a single active iterator because of the potential for meta Actions to add new Actions into the warehouse on the fly

Definition at line 332 of file ActionWarehouse.h.

Referenced by clear().

◆ _mesh

std::shared_ptr<MooseMesh> ActionWarehouse::_mesh
protected

Mesh class.

Definition at line 352 of file ActionWarehouse.h.

Referenced by clear(), getMesh(), and mesh().

◆ _ordered_names

std::vector<std::string> ActionWarehouse::_ordered_names
protected

The container that holds the sorted action names from the DependencyResolver.

Definition at line 321 of file ActionWarehouse.h.

Referenced by build(), and executeAllActions().

◆ _problem

std::shared_ptr<FEProblemBase> ActionWarehouse::_problem
protected

Problem class.

Definition at line 358 of file ActionWarehouse.h.

Referenced by clear(), problem(), and problemBase().

◆ _show_action_dependencies

bool ActionWarehouse::_show_action_dependencies
protected

Whether or not the action warehouse prints the action dependency information.

Definition at line 335 of file ActionWarehouse.h.

Referenced by executeAllActions(), printActionDependencySets(), and showActionDependencies().

◆ _show_actions

bool ActionWarehouse::_show_actions
protected

Whether or not the action warehouse prints the action execution information.

Definition at line 337 of file ActionWarehouse.h.

Referenced by executeActionsWithAction(), executeAllActions(), and showActions().

◆ _show_parser

bool ActionWarehouse::_show_parser
protected

Whether or not to print messages when actions are inserted in the warehouse by the parser.

Definition at line 339 of file ActionWarehouse.h.

Referenced by addActionBlock(), and showParser().

◆ _syntax

Syntax& ActionWarehouse::_syntax
protected

Reference to a "syntax" of actions.

Definition at line 315 of file ActionWarehouse.h.

Referenced by addActionBlock(), build(), buildBuildableActions(), printActionDependencySets(), printInputFile(), setFinalTask(), and syntax().

◆ _unsatisfied_dependencies

std::set<std::string> ActionWarehouse::_unsatisfied_dependencies
protected

Use to store the current list of unsatisfied dependencies.

Definition at line 325 of file ActionWarehouse.h.

Referenced by buildBuildableActions(), and checkUnsatisfiedActions().


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