FiberVISH
0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
pond
spacetime
diffme
EvalChristoffel.hpp
1
2
//
3
// $Id: EvalChristoffel.hpp,v 1.4 2004/08/12 16:21:34 werner Exp $
4
//
5
// $Log: EvalChristoffel.hpp,v $
6
// Revision 1.4 2004/08/12 16:21:34 werner
7
// Integration of numerical geodesics now compiles. Working is not yet satisfying.
8
//
9
// Revision 1.3 2004/05/14 10:01:47 werner
10
// removed comment.
11
//
12
// Revision 1.2 2004/05/13 16:43:43 werner
13
// Remove debug code.
14
//
15
// Revision 1.1 2004/05/13 12:19:16 werner
16
// Interfacing the DiffMe library.
17
//
18
// Revision 1.7 2004/05/11 18:05:10 werner
19
//
20
// Revision 1.6 2004/05/06 22:42:16 werner
21
// Towards a specification of a spacetime via the Acceleration structure.
22
//
23
// Revision 1.5 2004/05/03 13:33:33 werner
24
// integration improved
25
//
26
// Revision 1.4 2004/03/30 13:16:35 werner
27
// little more
28
//
29
// Revision 1.3 2004/03/29 11:51:02 werner
30
// Common interface among simple integrators, DiffMe and Vecal, and preliminiary work on integrating dop853.
31
//
32
// Revision 1.2 2004/03/24 13:23:02 werner
33
// Experimental DiffMe interface
34
//
35
// Revision 1.1 2004/03/22 11:55:02 werner
36
// Schwarzschild geodesic integration.
37
//
38
// Revision 1.1 2004/02/13 16:36:21 werner
39
// Initial preliminiary version of the Vector Algebra Library.
40
//
42
#ifndef __EvalChristoffel_HPP
43
#define __EvalChristoffel_HPP "Created 27.02.2001 21:42:27 by werner"
44
45
#include <diffme/Tensor.hpp>
46
#include <diffme/Variable.hpp>
47
#include <diffme/Power.hpp>
48
#include <vecal/Christoffel.hpp>
49
50
namespace
Traum
51
{
52
using namespace
DiffMe;
53
using
VecAl::Christoffel;
54
55
template
<
int
i,
int
j,
int
k,
template
<
int
,
int
>
class
g>
56
struct
EvalChristoffelElement
57
{
58
typedef
g<i,j> g_ij;
59
typedef
typename
Coordinate<g_ij>::result coord_t;
60
61
enum
{ dims = coord_t::dims };
62
63
typedef
typename
ChristoffelSymbols<i,j, g, k>::result Gk_ij;
64
65
// C['x'] = 3.0;
66
67
template
<
class
dstvalue,
class
srcvalue>
68
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
69
{
70
Gamma(k,i,j) = Eval<Gk_ij>::eval(C);
71
}
72
};
73
74
75
template
<
int
I,
int
J,
int
K,
template
<
int
,
int
>
class
g,
int
dims>
76
struct
EvalChristoffelIJK
77
{
78
79
template
<
class
dstvalue,
class
srcvalue>
80
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
81
{
82
EvalChristoffelElement<I, J, K ,g>::eval
(C, Gamma);
83
EvalChristoffelIJK
<I, J, K-1 ,g, dims>::eval(C, Gamma);
84
}
85
};
86
87
template
<
int
I,
int
J,
template
<
int
,
int
>
class
g,
int
dims>
88
struct
EvalChristoffelIJK
<I,J, 0, g, dims>
89
{
90
91
template
<
class
dstvalue,
class
srcvalue>
92
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
93
{
94
EvalChristoffelElement<I, J, 0 ,g>::eval
(C, Gamma);
95
}
96
};
97
98
99
template
<
int
I,
int
J,
template
<
int
,
int
>
class
g,
int
dims>
100
struct
EvalChristoffelIJ
101
{
102
103
template
<
class
dstvalue,
class
srcvalue>
104
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
105
{
106
EvalChristoffelIJK<I, J , dims-1, g, dims>::eval
(C, Gamma);
107
EvalChristoffelIJ
<I, J-1, g, dims>::eval(C, Gamma);
108
}
109
};
110
111
template
<
int
I,
template
<
int
,
int
>
class
g,
int
dims>
112
struct
EvalChristoffelIJ
<I, 0, g, dims>
113
{
114
115
template
<
class
dstvalue,
class
srcvalue>
116
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
117
{
118
EvalChristoffelIJK<I,0, dims-1, g, dims>::eval
(C, Gamma);
119
}
120
};
121
122
123
124
125
template
<
int
I,
template
<
int
,
int
>
class
g,
int
dims>
126
struct
EvalChristoffelI
127
{
128
129
template
<
class
dstvalue,
class
srcvalue>
130
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
131
{
132
EvalChristoffelIJ<I , dims-1, g, dims>::eval
(C, Gamma);
133
EvalChristoffelI
<I-1, g, dims>::eval(C, Gamma);
134
}
135
};
136
137
template
<
template
<
int
,
int
>
class
g,
int
dims>
138
struct
EvalChristoffelI
<0, g, dims>
139
{
140
141
template
<
class
dstvalue,
class
srcvalue>
142
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
143
{
144
EvalChristoffelIJ<0, dims-1, g, dims>::eval
(C, Gamma);
145
}
146
};
147
148
149
150
template
<
template
<
int
,
int
>
class
g>
151
struct
EvalChristoffel
152
{
153
typedef
typename
Coordinate<g<0,0> >::result coord_t;
154
enum
{ dims = coord_t::dims };
155
156
template
<
class
dstvalue,
class
srcvalue>
157
static
void
eval(
Context<srcvalue>
&C,
Christoffel<dims, dstvalue>
&Gamma)
158
{
159
EvalChristoffelI
<dims-1, g, dims>::eval(C, Gamma);
160
}
161
};
162
163
}
/* namespace Traum */
164
165
#endif
/* __Christoffel_HPP */
166
167
Eagle::Christoffel
Eagle::Context
Traum
Traum::EvalChristoffelElement
Definition
EvalChristoffel.hpp:57
Traum::EvalChristoffelIJK
Definition
EvalChristoffel.hpp:77
Traum::EvalChristoffelIJ
Definition
EvalChristoffel.hpp:101
Traum::EvalChristoffelI
Definition
EvalChristoffel.hpp:127
Traum::EvalChristoffel
Definition
EvalChristoffel.hpp:152
Generated on Sun Mar 1 2026 10:23:26 for FiberVISH by
1.9.8