11#ifndef __INTEGRATE_GEODESIC_HPP
12#define __INTEGRATE_GEODESIC_HPP "Created 20.07.2004 00:19:45 by werner benger"
14#include <spacetime/Geodesic853.hpp>
15#include <spacetime/EulerGeodesic.hpp>
16#include <spacetime/RungeKutta.hpp>
17#include <spacetime/AdamsStoermer.hpp>
34 const IntegratorType myType;
46template <
class TangentialSpaceType>
50 typedef typename TangentialSpaceType::Point_t Point_t;
51 typedef typename TangentialSpaceType::Vector_t Vector_t;
53 enum { Dims = TangentialSpaceType::Dims };
60 virtual void restart(
const Point_t&x0,
const Vector_t&v0) = 0;
61 virtual Point_t position()
const = 0;
62 virtual Vector_t velocity()
const = 0;
80template <
class Acceleration>
98 enum { Dims = Acceleration::Dims };
117 case Euler:
return E.advance(bk);
118 case RungeKutta:
return RK.advance(bk);
119 case AdamsStoermer:
return AS.advance(bk);
120 case DOP853:
return DP853.advance(bk);
124 void setStepSize(
double ds)
135 case Euler: E .x = x0;
139 case RungeKutta: RK .x = x0;
143 case AdamsStoermer: AS.reset_step();
148 case DOP853: DP853.restart1(0, x0, v0);
154 Point_t position()
const override
158 case Euler:
return E.x;
159 case RungeKutta:
return RK.x;
160 case AdamsStoermer:
return AS.x;
161 case DOP853:
return DP853.position();
169 case Euler:
return E.v;
170 case RungeKutta:
return RK.v;
171 case AdamsStoermer:
return AS.v;
172 case DOP853:
return DP853.velocity();
Modified from Florian Schrack's libgrav: Gravitation - Theorien, Effekte und Simulation am Computer
Definition AdamsStoermer.hpp:57
Definition Geodesic853.hpp:43
Definition IntegrateGeodesic.hpp:24
Abstract interface for computing geodesics in a certain coordinate system.
Definition IntegrateGeodesic.hpp:48
Implementation of a coordinate-specific integration of geodesics in a certain coordinate system,...
Definition IntegrateGeodesic.hpp:82
Base_t::Point_t Point_t
The coordinate-specific point type.
Definition IntegrateGeodesic.hpp:89
Base_t::Vector_t Vector_t
The coordinate-specific tangential vector type (from TangentialSpace<> )
Definition IntegrateGeodesic.hpp:91
Acceleration::Point_t GenericPoint_t
The coordinate-independent numerical raw type.
Definition IntegrateGeodesic.hpp:94
Acceleration::Vector_t GenericVector_t
The coordinate-specific tangential vector type (possibly just a Vector<> )
Definition IntegrateGeodesic.hpp:96
Acceleration::TangentialSpace_t TangentialSpace_t
The associated coordinate representation of the tangential space.
Definition IntegrateGeodesic.hpp:85
Class EulerGeodesic is coordinate-independent.
Definition EulerGeodesic.hpp:53
Definition RungeKutta.hpp:52