Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
CheckIntegrityAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "CheckIntegrityAction.h"
11 #include "ActionWarehouse.h"
12 #include "FEProblem.h"
13 
14 registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity");
15 registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity_early");
16 
19 {
21  return params;
22 }
23 
25 
26 void
28 {
29  if (_current_task == "check_integrity_early")
30  {
31  if (!_app.getExecutioner() && !_app.getExecutor())
32  mooseError("\"Executioner\" does not exist, make sure your input file contains an "
33  "[Executioner] block or your simulation adds an Executioner through an Action.");
34 
35  // This situation shouldn't be possible due to "determine_system_type" and/or autobuild.
36  if (!_problem)
37  mooseError("Your simulation does not contain a \"Problem\", which ironically means that YOU "
38  "have a problem...");
39  }
40  else
41  {
43 
44  mooseAssert(_problem, "Problem doesn't exist");
45  _problem->checkProblemIntegrity();
46  }
47 }
void checkUnsatisfiedActions() const
This method checks the actions stored in the warehouse against the list of required registered action...
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition: Action.h:159
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Base class for actions.
Definition: Action.h:33
registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity")
static InputParameters validParams()
Definition: Action.C:24
const std::string & _current_task
The current action (even though we have separate instances for each action)
Definition: Action.h:162
MooseApp & _app
The MOOSE application this is associated with.
Definition: MooseBase.h:84
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition: MooseApp.C:2085
CheckIntegrityAction(const InputParameters &params)
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition: Action.h:168
static InputParameters validParams()
Executor * getExecutor() const
Definition: MooseApp.h:350