ExplicitEuler.C
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 */
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 #include "ExplicitEuler.h"
16 #include "NonlinearSystem.h"
17 #include "FEProblem.h"
18
19 template <>
22 {
24
25  return params;
26 }
27
28 ExplicitEuler::ExplicitEuler(const InputParameters & parameters) : TimeIntegrator(parameters) {}
29
31
32 void
34 {
35  if (_dt == _dt_old)
37  else
39 }
40
41 void
43 {
44  _u_dot = *_solution;
46  _u_dot *= 1 / _dt;
47  _u_dot.close();
48
49  _du_dot_du = 1.0 / _dt;
50 }
51
52 void
53 ExplicitEuler::postStep(NumericVector<Number> & residual)
54 {
55  residual += _Re_time;
56  residual += _Re_non_time;
57  residual.close();
58 }
virtual void computeTimeDerivatives()
Definition: ExplicitEuler.C:42
NumericVector< Number > & _u_dot
solution vector for u^dot
FEProblemBase & _fe_problem
virtual ~ExplicitEuler()
Definition: ExplicitEuler.C:30
ExplicitEuler(const InputParameters &parameters)
Definition: ExplicitEuler.C:28
NumericVector< Number > & _Re_non_time
residual vector for non-time contributions
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< TimeIntegrator >()
virtual void preSolve()
Definition: ExplicitEuler.C:33
virtual void postStep(NumericVector< Number > &residual)
Callback to the TimeIntegrator called immediately after the residuals are computed in NonlinearSystem...
Definition: ExplicitEuler.C:53
Real & _du_dot_du
solution vector for
Base class for time integrators.
void setConstJacobian(bool state)
Set flag that Jacobian is constant (for optimization purposes)
NumericVector< Number > & _Re_time
residual vector for time contributions
InputParameters validParams< ExplicitEuler >()
Definition: ExplicitEuler.C:21
const NumericVector< Number > & _solution_old
const NumericVector< Number > *& _solution
solution vectors