Canoe
Comprehensive Atmosphere N' Ocean Engine
integrators.hpp
Go to the documentation of this file.
1 #ifndef SRC_INTEGRATOR_INTEGRATORS_HPP_
2 #define SRC_INTEGRATOR_INTEGRATORS_HPP_
3 
4 // athena
5 #include <athena/athena.hpp>
6 
8  // 2S or 3S* low-storage RK coefficients, Ketchenson (2010)
9  Real delta;
12  gamma_3; // low-storage coeff for weighted ave of registers
13  Real beta; // coeff. from bidiagonal Shu-Osher form Beta matrix, -1 diagonal
14  // terms
15  Real sbeta, ebeta; // time coeff describing start/end time of each stage
16  bool main_stage,
17  orbital_stage; // flag for whether the main calculation is done
18 };
19 
21  public:
22  virtual ~MultiStageIntegrator() {}
23  virtual void TimeIntegrate(Real time, Real dt) = 0;
24  virtual void WeightedAverage(Real ave_wghts[]) = 0;
25 
26  IntegratorWeight const& GetStageWeights(int stage) const {
27  return stage_wghts_[stage];
28  }
29 
30  void SetIntegrator(std::string name);
31  int GetNumStages() const { return nstages_; }
32 
33  protected:
35  int nstages_;
36 };
37 
38 #endif // SRC_INTEGRATOR_INTEGRATOR_HPP_
void SetIntegrator(std::string name)
Definition: integrators.cpp:4
virtual ~MultiStageIntegrator()
Definition: integrators.hpp:22
IntegratorWeight stage_wghts_[MAX_NSTAGE]
Definition: integrators.hpp:34
IntegratorWeight const & GetStageWeights(int stage) const
Definition: integrators.hpp:26
virtual void WeightedAverage(Real ave_wghts[])=0
int GetNumStages() const
Definition: integrators.hpp:31
virtual void TimeIntegrate(Real time, Real dt)=0