FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Kerr.hpp
1
2//
3// $Id: Kerr.hpp,v 1.2 2004/05/05 15:56:52 werner Exp $
4//
5// $Log: Kerr.hpp,v $
6// Revision 1.2 2004/05/05 15:56:52 werner
7// Separation of DOP core routines with dynamic size into the ODE library.
8//
9// Revision 1.1 2004/03/22 11:55:02 werner
10// Schwarzschild geodesic integration.
11//
12// Revision 1.1 2004/02/13 16:36:21 werner
13// Initial preliminiary version of the Vector Algebra Library.
14//
16#ifndef __Kerr_HPP
17#define __Kerr_HPP "Created 27.02.2001 21:42:27 by werner"
18
19#include <vecal/Christoffel.hpp>
20#include <vecal/Geodesic.hpp>
21
22namespace VecAl
23{
24
25struct Kerr
26{
27 Scalar_t m, a, e;
28
29 enum { t, r, h, p,
30 theta=h, phi = p
31 };
32
33 Kerr(const Scalar_t&mass)
34 : m(mass)
35 {}
36
37 void getMetric(Metric<Scalar_t,4>&g, const Point_t&P) const
38 {
39 Scalar_t sinTheta = sin(P[h]);
40
41 g.set(0);
42
43 S r2 = point[P4_R]*point[P4_R];
44 S tmp = cos(point[P4_H]);
45
46 S sig = r2 + a2*tmp*tmp;
47 S del = r2 + a2 + e2 - 2*m*point[P4_R];
48
49 tmp = sin(point[P4_H]);
50 S tmp2 = tmp*tmp;
51
52 g[M4_TT] = (a2*tmp2 - del)/sig;
53 g[M4_TP] = g[M4_PT] = -a*tmp2*(r2 + a2 - del)/sig;
54 g[M4_RR] = sig/del;
55 g[M4_HH] = sig;
56 g[M4_PP] = ((r2 + a2)*(r2 + a2) - del*a2*tmp2)/sig*tmp2;
57 }
58
59 void getChristoffel(Christoffel<Scalar_t,4>&G, const Point_t&P) const
60 {
61 Scalar_t sinTheta = sin(P[h]);
62
63 G.set(0);
64
65
66
67 S r2 = point[P4_R]*point[P4_R];
68 S tmpx = cos(point[P4_H]);
69
70 S sig = r2 + a2*tmpx*tmpx;
71 S del = r2 + a2 + e2 - 2*m*point[P4_R];
72
73 S tmp = sin(point[P4_H]);
74 S tmp2 = tmp*tmp;
75
76 S t_b = point[P4_R]*point[P4_R] + a2;
77 S t_c = t_b*t_b - del*a2*tmp2;
78 S t_d = del - a2*tmp2;
79 S t_e = t_b - del;
80 S t_f = point[P4_R] - m;
81
82 S t_n = t_d*t_c + a2*tmp2*t_e*t_e;
83
84
85
86 chr[C4_TTR] =
87 chr[C4_TRT] = (t_c*(t_f - point[P4_R]*t_d/sig)
88 + a2*tmp2*t_e*(m - point[P4_R]*t_e/sig))/t_n;
89 chr[C4_TTH] =
90 chr[C4_THT] = a2*tmp*tmpx/t_n*(-t_c + t_d*t_c/sig
91 + t_e*t_e*(1 + a2*tmp2/sig));
92 chr[C4_TRP] =
93 chr[C4_TPR] = a*tmp2/t_n*(m*t_c - t_e*(2*point[P4_R]*t_b
94 - a2*tmp2*t_f));
95 chr[C4_TPH] =
96 chr[C4_THP] = a2*a*del*tmp2*tmp*tmpx*t_e/t_n;
97
98 chr[C4_RTT] = (sig*t_f - point[P4_R]*t_d)/sig/sig/sig*del;
99 chr[C4_RTP] =
100 chr[C4_RPT] = ((sig*m - point[P4_R]*t_e)/sig/sig/sig
101 *del*a*tmp2);
102 chr[C4_RRR] = (del*point[P4_R] - sig*t_f)/del/sig;
103 chr[C4_RRH] =
104 chr[C4_RHR] = -a2*tmp*tmpx/sig;
105 chr[C4_RPP] = (-t_b*2*point[P4_R] + t_f*a2*tmp2
106 + t_c*point[P4_R]/sig)*del*tmp2/sig/sig;
107 chr[C4_RHH] = -del*point[P4_R]/sig;
108
109
110 chr[C4_PTR] =
111 chr[C4_PRT] = -a/t_n*(m*t_d - t_f*t_e);
112 chr[C4_PTH] =
113 chr[C4_PHT] = -a*tmpx*t_e/t_n*(t_d/tmp + a2*tmp);
114 chr[C4_PRP] =
115 chr[C4_PPR] = (t_d*(2*point[P4_R]*t_b - a2*tmp2*t_f
116 - point[P4_R]*t_c/sig)
117 +a2*tmp2*t_e*(m - point[P4_R]*t_e/sig))/t_n;
118 chr[C4_PPH] =
119 chr[C4_PHP] = (t_d*tmpx*(t_c*(1/tmp + a2*tmp/sig)
120 - a2*del*tmp)
121 + a2*tmp*tmpx*t_e*t_e*(1 + a2*tmp2/sig))/t_n;
122
123 chr[C4_HTT] = -(sig - del + a2*tmp2)/sig/sig/sig*a2*tmp*tmpx;
124 chr[C4_HTP] =
125 chr[C4_HPT] = tmp*tmpx*t_e/sig/sig*(1 + a2*a*tmp2/sig);
126 chr[C4_HRR] = a2*tmp*tmpx/del/sig;
127 chr[C4_HRH] =
128 chr[C4_HHR] = point[P4_r]/sig;
129 chr[C4_HPP] = -tmp*tmpx/sig/sig*(t_b*t_b - 2*del*a2*tmp2
130 + t_c*a2*tmp2/sig);
131 chr[C4_HHH] = -a2*tmp*tmpx/sig;
132
133 }
134};
135
136} /* namespace VecAl */
137
138#endif /* __Kerr_HPP */
complex< _Tp > sin(const complex< _Tp > &)
complex< _Tp > cos(const complex< _Tp > &)
void set(const T &Value)
Set all elements to the same value.
Definition vector/Iterator.hpp:724
Definition Kerr.hpp:26