Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
integrator_Leapfrog.h
Go to the documentation of this file.
1 
14 #ifndef INTEGRATOR_LEAPFROG_INCLUDED
15 #define INTEGRATOR_LEAPFROG_INCLUDED
16 
17 #include "action.h"
18 #include "director.h"
19 #include "integrator.h"
20 #include "randomNumbers.h"
21 
22 #include "bridgeIO.h"
23 using Bridge::vout;
24 
26 
33 //- parameters class
35 {
36  public:
38 };
39 //- end
40 
42 {
43  private:
44  double m_Estep; // step size of each molecular dynamical evolution
45  int m_Nstep; // number of steps
46  int m_level; // level number
48  std::valarray<Action *> m_action; // actions
49 
50  public:
52  Integrator_Leapfrog(std::valarray<Action *> action,
53  Integrator *integ_next)
54  {
55  m_action.resize(action.size());
56  for (int i = 0; i < action.size(); ++i) {
57  m_action[i] = action[i];
58  }
59  m_integ_next = integ_next;
60  m_Estep = 0.0;
61  m_Nstep = 0;
62  }
63 
66  {
67  // std::cout << "byebye from integrator_leapfrog.\n";
68  }
69 
70  void set_parameters(const Parameters& params);
71  void set_parameters(int level, double Estep, int Nstep);
72 
73  void evolve(Field_G& iP, Field_G& U);
74 };
75 #endif