34 |
|
#ifndef INTEGRATORS_VELOCITYVERLETINTEGRATOR_HPP |
35 |
|
#define INTEGRATORS_VELOCITYVERLETINTEGRATOR_HPP |
36 |
|
|
37 |
+ |
#include "integrators/Integrator.hpp" |
38 |
+ |
|
39 |
|
namespace oopse { |
40 |
|
|
41 |
|
/** |
43 |
|
* @brief Velocity-Verlet Family Integrator |
44 |
|
* Template pattern is used in VelocityVerletIntegrator class. |
45 |
|
*/ |
46 |
< |
class VelocityVerletIntegrator : Integrator { |
46 |
> |
class VelocityVerletIntegrator : public Integrator { |
47 |
|
public: |
48 |
|
virtual ~VelocityVerletIntegrator(); |
49 |
|
|
53 |
|
|
54 |
|
VelocityVerletIntegrator(SimInfo* info); |
55 |
|
|
56 |
+ |
protected: |
57 |
+ |
|
58 |
+ |
double fullStep; |
59 |
+ |
double halfStep; |
60 |
+ |
|
61 |
+ |
private: |
62 |
|
virtual void integrateStep(); |
63 |
|
|
64 |
+ |
virtual void thermalize(); |
65 |
+ |
|
66 |
+ |
virtual void calcForce(bool needPotential, bool needStress); |
67 |
+ |
|
68 |
|
virtual void moveA() = 0; |
69 |
|
|
70 |
< |
virtual void moveB() = 0; |
59 |
< |
|
60 |
< |
virtual void thermalize(); |
70 |
> |
virtual void moveB() = 0; |
71 |
|
|
62 |
– |
virtual void calcForce(int needPotential, int needStress); |
72 |
|
|
64 |
– |
private: |
65 |
– |
|
66 |
– |
void velocitize(); |
67 |
– |
|
68 |
– |
void removeComDrift(); |
69 |
– |
|
73 |
|
}; |
74 |
|
|
75 |
|
} //end namespace oopse |