https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
11#include "ActionWarehouse.h"
12#include "FEProblem.h"
13
14registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity");
15registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity_early");
16
23
25
26void
28{
29 if (_current_task == "check_integrity_early")
30 {
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}
registerMooseAction("MooseApp", CheckIntegrityAction, "check_integrity")
void checkUnsatisfiedActions() const
This method checks the actions stored in the warehouse against the list of required registered action...
Base class for actions.
Definition Action.h:38
static InputParameters validParams()
Definition Action.C:26
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition Action.h:178
const std::string & _current_task
The current action (even though we have separate instances for each action)
Definition Action.h:172
ActionWarehouse & _awh
Reference to ActionWarehouse where we store object build by actions.
Definition Action.h:169
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
CheckIntegrityAction(const InputParameters &params)
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Executioner * getExecutioner() const
Retrieve the Executioner for this App.
Definition MooseApp.C:2015
Executor * getExecutor() const
Definition MooseApp.h:341
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271