35 |
|
#define INTEGRATORS_VELOCITYVERLETINTEGRATOR_HPP |
36 |
|
|
37 |
|
#include "integrators/Integrator.hpp" |
38 |
+ |
#include "integrators/RotationAlgorithm.hpp" |
39 |
|
|
40 |
|
namespace oopse { |
41 |
|
|
47 |
|
class VelocityVerletIntegrator : public Integrator { |
48 |
|
public: |
49 |
|
virtual ~VelocityVerletIntegrator(); |
50 |
< |
|
50 |
> |
|
51 |
> |
void setRotationAlgorithm(RotationAlgorithm* algo) { |
52 |
> |
if (algo != rotAlgo && rotAlgo != NULL){ |
53 |
> |
delete rotAlgo; |
54 |
> |
} |
55 |
> |
|
56 |
> |
rotAlgo = algo; |
57 |
> |
} |
58 |
> |
|
59 |
|
protected: |
60 |
|
|
61 |
|
VelocityVerletIntegrator(SimInfo* info); |
69 |
|
virtual void postStep(); |
70 |
|
|
71 |
|
virtual void finalize(); |
72 |
+ |
|
73 |
+ |
RotationAlgorithm* rotAlgo; |
74 |
|
|
75 |
|
double dt2; |
76 |
|
|
88 |
|
|
89 |
|
virtual void moveB() = 0; |
90 |
|
|
91 |
+ |
virtual DumpWriter* createDumpWriter(); |
92 |
+ |
|
93 |
+ |
virtual StatWriter* createStatWriter(); |
94 |
|
|
81 |
– |
|
95 |
|
}; |
96 |
|
|
97 |
|
} //end namespace oopse |