FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Acceleration.hpp
1
2//
3// $Id: Acceleration.hpp,v 1.2 2004/05/11 18:05:10 werner Exp $
4//
5// $Log: Acceleration.hpp,v $
6// Revision 1.2 2004/05/11 18:05:10 werner
7// *** empty log message ***
8//
9// Revision 1.1 2004/05/06 22:42:16 werner
10// Towards a specification of a spacetime via the Acceleration structure.
11//
12//
14#ifndef __ACCELERATION_HPP
15#define __ACCELERATION_HPP "Created 03.05.2004 21:44:45 by werner benger"
16
17#include "Geodesic.hpp"
18#include <ode/Integrate853.hpp>
19
20namespace Traum
21{
22using namespace VecAl;
23
24template <class SpaceTime>
26{
27 const SpaceTime&ST;
28public:
29 typedef typename SpaceTime::Scalar_t Scalar_t;
30 typedef typename SpaceTime::Point_t Point_t;
31 typedef typename SpaceTime::Vector_t Vector_t;
32 typedef typename SpaceTime::Christoffel_t Christoffel_t;
33
34 typedef typename Point_t::Vector_t PointComponents_t;
35 enum { Dims = PointComponents_t::SIZE };
36
37 AffineAcceleration(const SpaceTime&R)
38 : ST(R)
39 {}
40
44 Vector_t operator()(const Point_t&q, const Vector_t&dot_q) const
45 {
46 Christoffel_t Gamma;
47 ST.getChristoffel(Gamma, q);
48 return Vector_t( Gamma(dot_q, dot_q) );
49 }
50};
51
52template <class SpaceTime>
53class TimeAcceleration : public AffineAcceleration<SpaceTime>
54{
55public:
56 typedef typename AffineAcceleration<SpaceTime>::Point_t Point_t;
57 typedef typename AffineAcceleration<SpaceTime>::Vector_t Vector_t;
58
59 Vector_t operator()(const Point_t&q, const Vector_t&dot_q) const
60 {
61 Vector_t v = AffineAcceleration<SpaceTime>::operator()(q, dot_q);
62 return -v + dot_q*v[0];
63 }
64};
65
66
67} // namespace Vecal
68
69#endif // __ACCELERATION_HPP
Definition Acceleration.hpp:26
Vector_t operator()(const Point_t &q, const Vector_t &dot_q) const
Definition Acceleration.hpp:44
Definition Acceleration.hpp:54