FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
NumericalSpacetime.hpp
1
2//
3// $Id: NumericalSpacetime.hpp,v 1.1 2004/08/24 09:09:53 werner Exp $
4//
5// $Log: NumericalSpacetime.hpp,v $
6// Revision 1.1 2004/08/24 09:09:53 werner
7// Towards VC7
8//
9// Revision 1.6 2004/05/13 16:44:23 werner
10// Formulate Christoffel symbols via direct vectorization.
11//
12// Revision 1.5 2004/05/11 16:53:47 werner
13// Introduction of coordinate systems for improved type-safety.
14// Will support easy coordinate transformations soon.
15//
16// Revision 1.4 2004/05/06 22:42:16 werner
17// Towards a specification of a spacetime via the Acceleration structure.
18//
19// Revision 1.3 2004/05/03 13:33:33 werner
20// integration improved
21//
22// Revision 1.2 2004/03/29 11:51:02 werner
23// Common interface among simple integrators, DiffMe and Vecal, and preliminiary work on integrating dop853.
24//
25// Revision 1.1 2004/03/22 11:55:02 werner
26// Schwarzschild geodesic integration.
27//
28// Revision 1.1 2004/02/13 16:36:21 werner
29// Initial preliminiary version of the Vector Algebra Library.
30//
32#ifndef __NumericalSpacetime_HPP
33#define __NumericalSpacetime_HPP "Created 27.02.2001 21:42:27 by werner"
34
35#include <vecal/ipol/ChristoffelField.hpp>
36
37namespace Traum
38{
39
43template <class MetricArray, class CoordinateSystem>
44struct NumericalSpacetime : public CoordinateSystem
45{
46 typedef CoordinateSystem CoordinateSystem_t;
47
48 enum { Dims = MetricArray::Dims };
49 typedef typename MetricArray::value_type metric_type;
50 typedef typename MetricArray::Storage_t MetricStorage_t;
51
52 typedef typename CoordinateSystem::Point_t Point_t;
53 typedef typename CoordinateSystem::Scalar_t Scalar_t;
54 typedef typename CoordinateSystem::Vector_t Vector_t;
55 typedef typename CoordinateSystem::Metric_t Metric_t;
56
57 typedef CubicIpol<metric_type> MetricInterpol;
58
59 typedef typename Point_t::Vector_t::value_type CoordinateType;
60
61 const MetricArray & g;
62
63 typedef Interpolate<Dims, metric_type, MetricStorage_t, MetricInterpol, CoordinateType> MetricField_t;
64
66 NumericalSpacetime(const MetricArray&metric)
67 : g(metric)
68 {}
69
71 void getMetric(Metric_t&g_p, const Point_t&P) const
72 {
73 MetricField_t mf(g,P);
74 mf.eval(g_p);
75 }
76
78 Vector_t operator()(const Point_t&q, const Vector_t&dot_q) const
79 {
80 Vector_t a;
81 ChristoffelField<MetricArray> Chris(g, q);
82
83 Chris.getCoordinateAcceleration(a, dot_q);
84 return a;
85 }
86};
87
88} /* namespace Traum */
89
90#endif /* __NumericalSpacetime_HPP */
91
92
It conformes to the concept of an Acceleration.
Definition NumericalSpacetime.hpp:45
void getMetric(Metric_t &g_p, const Point_t &P) const
Get the metric tensor field at the interpolation point P.
Definition NumericalSpacetime.hpp:71
NumericalSpacetime(const MetricArray &metric)
Constructor, stores a reference to the metric array.
Definition NumericalSpacetime.hpp:66
Vector_t operator()(const Point_t &q, const Vector_t &dot_q) const
Compute the coordinate acceleration at point q with velocity dot_q.
Definition NumericalSpacetime.hpp:78