www.mooseframework.org
TimeIntegrator.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 TIMEINTEGRATOR_H
16 #define TIMEINTEGRATOR_H
17 
18 // MOOSE includes
19 #include "MooseObject.h"
20 #include "Restartable.h"
21 
22 // Forward declarations
23 class TimeIntegrator;
24 class FEProblemBase;
25 class SystemBase;
27 
28 namespace libMesh
29 {
30 template <typename T>
31 class NumericVector;
32 }
33 
34 template <>
36 
48 class TimeIntegrator : public MooseObject, public Restartable
49 {
50 public:
51  TimeIntegrator(const InputParameters & parameters);
52  virtual ~TimeIntegrator();
53 
54  virtual void preSolve() {}
55  virtual void preStep() {}
56  virtual void solve();
57 
66  virtual void postStep(NumericVector<Number> & /*residual*/) {}
67 
75  virtual void postSolve() {}
76 
77  virtual int order() = 0;
78  virtual void computeTimeDerivatives() = 0;
79 
80 protected:
84 
86  NumericVector<Number> & _u_dot;
88  Real & _du_dot_du;
90  const NumericVector<Number> *& _solution;
91  const NumericVector<Number> & _solution_old;
92  const NumericVector<Number> & _solution_older;
93  //
94  int & _t_step;
95  //
96  Real & _dt;
97  Real & _dt_old;
98 
100  NumericVector<Number> & _Re_time;
102  NumericVector<Number> & _Re_non_time;
103 };
104 
105 #endif /* TIMEINTEGRATOR_H */
NonlinearSystemBase & _nl
A class for creating restricted objects.
Definition: Restartable.h:31
virtual void preSolve()
NumericVector< Number > & _u_dot
solution vector for u^dot
FEProblemBase & _fe_problem
virtual void postStep(NumericVector< Number > &)
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
SystemBase & _sys
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
Definition: SystemBase.h:91
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Nonlinear system to be solved.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:36
InputParameters validParams< TimeIntegrator >()
virtual void preStep()
const NumericVector< Number > & _solution_older
Real & _du_dot_du
solution vector for
Base class for time integrators.
virtual void postSolve()
Callback to the TimeIntegrator called immediately after TimeIntegrator::solve() (so the name does mak...
NumericVector< Number > & _Re_time
residual vector for time contributions
const NumericVector< Number > & _solution_old
const NumericVector< Number > *& _solution
solution vectors