FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
SphericalSymmetric.hpp
1
2//
3// $Id: SphericalSymmetric.hpp,v 1.2 2004/05/11 16:53:47 werner Exp $
4//
5// $Log: SphericalSymmetric.hpp,v $
6// Revision 1.2 2004/05/11 16:53:47 werner
7// Introduction of coordinate systems for improved type-safety.
8// Will support easy coordinate transformations soon.
9//
10// Revision 1.1 2004/03/22 11:55:02 werner
11// Schwarzschild geodesic integration.
12//
13// Revision 1.1 2004/02/13 16:36:21 werner
14// Initial preliminiary version of the Vector Algebra Library.
15//
17#ifndef __Schwarzschild_HPP
18#define __Schwarzschild_HPP "Created 27.02.2001 21:42:27 by werner"
19
20#include <vecal/Christoffel.hpp>
21#include <vecal/Geodesic.hpp>
22
23namespace VecAl
24{
25
31{
32 enum { t, r, h, p,
33 theta=h, phi = p
34 };
35
36 Scalar_t A(Scalar_t r, Scalar_t t);
37 Scalar_t B(Scalar_t r, Scalar_t t);
38
39
48 void metric(Metric<Scalar_t,4>&g, const Point_t&P) const
49 {
50 Scalar_t sinTheta = sin(P[h]);
51
52 g.set(0);
53 g(t,t) = A(P[r], P[t]);
54 g(r,r) = -B(P[r], P[t]);
55 g(h,h) = -P[r]*P[r];
56 g(p,p) = -P[r]*P[r]*sinTheta*sinTheta;
57 }
58
67 void cometric(Metric<Scalar_t,4>&g, const Point_t&P) const
68 {
69 Scalar_t sinTheta = sin(P[h]);
70
71 g.set(0);
72 g(t,t) = 1/A(P[r], P[t]);
73 g(r,r) = -1/B(P[r], P[t]);
74 g(h,h) = -1/(P[r]*P[r]);
75 g(p,p) = -1/(P[r]*P[r]*sinTheta*sinTheta);
76 }
77
78
102 void getChristoffel(Christoffel<Scalar_t,4>&G, const Point_t&P) const
103 {
104 Scalar_t sinTheta = sin(P[h]);
105
106 G.set(0);
107 G(t,t,t) = dotA(P[r], P[t]) / (2*A(P[r], P[t]) );
108 /*
109 G(t,t,r) = G(t,r,r) = m/P[r]/(P[r] - 2*m);
110 G(r,t,t) = m*(1 - 2*m/P[r]) / (P[r] * P[r] );
111 G(r,r,r) = -G(t,t,r);
112 G(r,h,h) = 2*m - P[r];
113 G(r,p,p) = G(r,h,h)*sinTheta*sinTheta;
114 G(h,r,h) = G(h,h,r)= 1/P[r];
115 G(h,p,p) = -sinTheta*cos( P[h] );
116 G(p,r,p) = G(p,p,r) = G(h,r,h);
117 g^p_ph = cos(theta)/sin(theta)
118 G(p,h,p) = G(p,p,h) = 1/tan( P[h] );
119 */
120 }
121
122
141 void Ricci(Metric<Scalar_t,4>&g, const Point_t&P) const
142 {}
143};
144
145} /* namespace VecAl */
146
147#endif /* __Schwarzschild_HPP */
complex< _Tp > sin(const complex< _Tp > &)
void set(const T &Value)
Set all elements to the same value.
Definition vector/Iterator.hpp:724
A generic, spherically symmetric spacetime that is determined by two scalar functions and .
Definition SphericalSymmetric.hpp:31
void Ricci(Metric< Scalar_t, 4 > &g, const Point_t &P) const
Ricci - Tensor:
Definition SphericalSymmetric.hpp:141
void cometric(Metric< Scalar_t, 4 > &g, const Point_t &P) const
Definition SphericalSymmetric.hpp:67
void getChristoffel(Christoffel< Scalar_t, 4 > &G, const Point_t &P) const
Levi-Civita-Connection (Christoffelsymbols):
Definition SphericalSymmetric.hpp:102
void metric(Metric< Scalar_t, 4 > &g, const Point_t &P) const
Definition SphericalSymmetric.hpp:48