Canoe
Comprehensive Atmosphere N' Ocean Engine
integrators.cpp
Go to the documentation of this file.
1 
4 void MultiStageIntegrator::SetIntegrator(std::string integrator) {
5  if (integrator == "vl2") {
11 
12  // set number of stages and time coeff.
13  nstages_ = 2;
14  } else if (integrator == "rk3") {
18 
19  // set number of stages and time coeff.
20  nstages_ = 3;
21  stage_wghts_[0].sbeta = 0.0;
22  stage_wghts_[0].ebeta = 1.0;
23  stage_wghts_[0].delta = 1.0;
24  stage_wghts_[0].gamma_1 = 0.0;
25  stage_wghts_[0].gamma_2 = 1.0;
26  stage_wghts_[0].gamma_3 = 0.0;
27 
28  stage_wghts_[1].sbeta = 1.0;
29  stage_wghts_[1].ebeta = 0.5;
30  stage_wghts_[1].delta = 0.0;
31  stage_wghts_[1].gamma_1 = 0.25;
32  stage_wghts_[1].gamma_2 = 0.75;
33  stage_wghts_[1].gamma_3 = 0.0;
34 
35  stage_wghts_[2].sbeta = 0.5;
36  stage_wghts_[2].ebeta = 1.0;
37  stage_wghts_[2].delta = 0.0;
38  stage_wghts_[2].gamma_1 = 2. / 3.;
39  stage_wghts_[2].gamma_2 = 1. / 3.;
40  stage_wghts_[2].gamma_3 = 0.0;
41 
42  stage_wghts_[0].beta = 1.0;
43  stage_wghts_[1].beta = 0.25;
44  stage_wghts_[2].beta = 2. / 3.;
45  };
void SetIntegrator(std::string name)
Definition: integrators.cpp:4
IntegratorWeight stage_wghts_[MAX_NSTAGE]
Definition: integrators.hpp:34