www.mooseframework.org
Executioner.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef EXECUTIONER_H
16 #define EXECUTIONER_H
17 
18 #include "MooseObject.h"
19 #include "UserObjectInterface.h"
20 #include "PostprocessorInterface.h"
21 #include "Restartable.h"
22 
23 // System includes
24 #include <string>
25 
26 class Problem;
27 class Executioner;
28 
29 template <>
31 
41 class Executioner : public MooseObject,
42  public UserObjectInterface,
44  public Restartable
45 {
46 public:
53 
54  virtual ~Executioner();
55 
59  virtual void init();
60 
65  virtual void execute() = 0;
66 
70  virtual void preExecute();
71 
75  virtual void postExecute();
76 
80  virtual void preSolve();
81 
85  virtual void postSolve();
86 
91  virtual Problem & problem();
92 
97 
102  virtual std::string getTimeStepperName();
103 
108  virtual void parentOutputPositionChanged() {}
109 
113  virtual bool lastSolveConverged();
114 
115 protected:
122  virtual void addAttributeReporter(const std::string & name,
123  Real & attribute,
124  const std::string execute_on = "");
125 
127 
131 
132  // Restart
133  std::string _restart_file_base;
134 
135  // Splitting
136  std::vector<std::string> _splitting;
137 };
138 
139 #endif // EXECUTIONER_H
const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:47
Real _old_initial_residual_norm
Definition: Executioner.h:130
A class for creating restricted objects.
Definition: Restartable.h:31
virtual void addAttributeReporter(const std::string &name, Real &attribute, const std::string execute_on="")
Adds a postprocessor to report a Real class attribute.
Definition: Executioner.C:180
virtual std::string getTimeStepperName()
The name of the TimeStepper This is an empty string for non-Transient executioners.
Definition: Executioner.C:168
Executioner(const InputParameters &parameters)
Constructor.
Definition: Executioner.C:76
virtual void postExecute()
Override this for actions that should take place after execution.
Definition: Executioner.C:140
Class that hold the whole problem being solved.
Definition: Problem.h:29
FEProblemBase & feProblem()
Return a reference to this Executioner&#39;s FEProblemBase instance.
Definition: Executioner.C:162
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void parentOutputPositionChanged()
Can be used by subsclasses to call parentOutputPositionChanged() on the underlying FEProblemBase...
Definition: Executioner.h:108
Real _initial_residual_norm
Initial Residual Variables.
Definition: Executioner.h:129
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::string _restart_file_base
Definition: Executioner.h:133
virtual void execute()=0
Pure virtual execute function MUST be overridden by children classes.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
InputParameters validParams< Executioner >()
Definition: Executioner.C:30
Executioners are objects that do the actual work of solving your problem.
Definition: Executioner.h:41
virtual Problem & problem()
Deprecated: Return a reference to this Executioner&#39;s Problem instance.
Definition: Executioner.C:155
Interface for objects that need to use UserObjects.
virtual ~Executioner()
Definition: Executioner.C:127
std::vector< std::string > _splitting
Definition: Executioner.h:136
virtual void preExecute()
Override this for actions that should take place before execution.
Definition: Executioner.C:135
virtual bool lastSolveConverged()
Whether or not the last solve converged.
Definition: Executioner.C:174
virtual void init()
Initialize the executioner.
Definition: Executioner.C:130
virtual void preSolve()
Override this for actions that should take place before execution.
Definition: Executioner.C:145
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:53
virtual void postSolve()
Override this for actions that should take place after execution.
Definition: Executioner.C:150
Interface class for classes which interact with Postprocessors.
FEProblemBase & _fe_problem
Definition: Executioner.h:126