www.mooseframework.org
AdamsPredictor.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 ADAMSPREDICTOR_H
16 #define ADAMSPREDICTOR_H
17 
18 // MOOSE includes
19 #include "Predictor.h"
20 
21 // Forward declarations
22 class AdamsPredictor;
23 
24 namespace libMesh
25 {
26 template <typename T>
27 class NumericVector;
28 }
29 
30 template <>
32 
37 class AdamsPredictor : public Predictor
38 {
39 public:
40  AdamsPredictor(const InputParameters & parameters);
41 
42  virtual int order() override { return _order; }
43  virtual void timestepSetup() override;
44  virtual bool shouldApply() override;
45  virtual void apply(NumericVector<Number> & sln) override;
46  virtual NumericVector<Number> & solutionPredictor() override { return _solution_predictor; }
47 
48 protected:
49  int _order;
50  NumericVector<Number> & _current_old_solution;
51  NumericVector<Number> & _older_solution;
52  NumericVector<Number> & _oldest_solution;
53  NumericVector<Number> & _tmp_previous_solution;
54  NumericVector<Number> & _tmp_residual_old;
55  NumericVector<Number> & _tmp_third_vector;
56  int & _t_step_old;
57  Real & _dt_older;
58  Real & _dtstorage;
59 };
60 
61 #endif /* ADAMSPREDICTOR_H */
NumericVector< Number > & _tmp_previous_solution
NumericVector< Number > & _tmp_third_vector
NumericVector< Number > & _current_old_solution
Base class for predictors.
Definition: Predictor.h:39
virtual NumericVector< Number > & solutionPredictor() override
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...
Implements an explicit Adams predictor based on two old solution vectors.
InputParameters validParams< AdamsPredictor >()
virtual int order() override
NumericVector< Number > & _oldest_solution
NumericVector< Number > & _tmp_residual_old
NumericVector< Number > & _older_solution