60 #include "blackhole.h" 62 #include "utilitaires.h" 70 const double& theta_i,
const int& nrk_phi,
71 const int& nrk_theta)
const {
80 int nt = mg->get_nt(1) ;
81 int np = mg->get_np(1) ;
89 cout <<
"Not yet prepared!!!" << endl ;
98 double dp = 2. * M_PI / double(np) ;
109 xi_t.
set(0) = xi_i(0) ;
110 xi_p.
set(0) = xi_i(1) ;
111 xi_l.
set(0) = xi_i(2) ;
118 xi_ini.
set(0) = xi_i(0) ;
119 xi_ini.
set(1) = xi_i(1) ;
120 xi_ini.
set(2) = xi_i(2) ;
122 double pp_0 = phi_i ;
124 for (
int i=1; i<np+1; i++) {
128 xi_t.
set(i) = xi(0) ;
129 xi_p.
set(i) = xi(1) ;
130 xi_l.
set(i) = xi(2) ;
158 for (
int k=0; k<np; k++) {
190 source_phi =
pow(
confo, 2.) * rr * st / xi_phi ;
196 double hh = 2. * M_PI / double(nn) ;
200 double t1, t2, t3, t4, t5 ;
208 for (
int i=0; i<mm; i++) {
210 t1 = hh * double(4*i) ;
211 t2 = hh * double(4*i+1) ;
212 t3 = hh * double(4*i+2) ;
213 t4 = hh * double(4*i+3) ;
214 t5 = hh * double(4*i+4) ;
216 integ += (hh/45.) * (14.*source_phi.
val_point(rah,M_PI/2.,t1)
217 + 64.*source_phi.
val_point(rah,M_PI/2.,t2)
218 + 24.*source_phi.
val_point(rah,M_PI/2.,t3)
219 + 64.*source_phi.
val_point(rah,M_PI/2.,t4)
220 + 14.*source_phi.
val_point(rah,M_PI/2.,t5)
225 cout <<
"Black_hole:: t_f = " << integ << endl ;
226 double ratio = 0.5 * integ / M_PI ;
228 cout <<
"Black_hole:: t_f / 2M_PI = " << ratio << endl ;
230 for (
int k=0; k<np; k++) {
243 double dt = 0.5 * M_PI / double(nt-1) ;
254 for (
int i=0; i<np; i++) {
256 xi_th.
set(nt-1, i) = xi_t(i) ;
257 xi_ph.
set(nt-1, i) = xi_p(i) ;
258 xi_ll.
set(nt-1, i) = xi_l(i) ;
262 for (
int i=0; i<np; i++) {
265 xi_ini.
set(0) = xi_t(i) ;
266 xi_ini.
set(1) = xi_p(i) ;
267 xi_ini.
set(2) = xi_l(i) ;
269 double pp = double(i) * dp ;
270 double tt_0 = theta_i ;
272 for (
int j=1; j<nt; j++) {
276 xi_th.
set(nt-1-j, i) = xi(0) ;
277 xi_ph.
set(nt-1-j, i) = xi(1) ;
278 xi_ll.
set(nt-1-j, i) = xi(2) ;
295 killing.set(1) = 0. ;
296 killing.set(2) = 0.5 ;
297 killing.set(3) = 0.5 ;
299 for (
int l=0; l<2; l++) {
300 for (
int i=0; i<nr; i++) {
301 for (
int j=0; j<nt; j++) {
302 for (
int k=0; k<np; k++) {
303 (killing.set(2)).set_grid_point(l, k, j, i) = xi_th(j, k) ;
304 (killing.set(3)).set_grid_point(l, k, j, i) = xi_ph(j, k) ;
309 killing.std_spectral_base() ;
314 double check_norm = 0. ;
315 source_phi =
pow(
confo, 2.) * rr * st / killing(3) ;
318 for (
int i=0; i<mm; i++) {
320 t1 = hh * double(4*i) ;
321 t2 = hh * double(4*i+1) ;
322 t3 = hh * double(4*i+2) ;
323 t4 = hh * double(4*i+3) ;
324 t5 = hh * double(4*i+4) ;
326 check_norm += (hh/45.) *
327 ( 14.*source_phi.
val_point(rah,M_PI/4.,t1)
328 + 64.*source_phi.
val_point(rah,M_PI/4.,t2)
329 + 24.*source_phi.
val_point(rah,M_PI/4.,t3)
330 + 64.*source_phi.
val_point(rah,M_PI/4.,t4)
331 + 14.*source_phi.
val_point(rah,M_PI/4.,t5) ) ;
335 cout <<
"Black_hole:: t_f for M_PI/4 = " << check_norm / M_PI
Map & mp
Mapping associated with the black hole.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Tensor field of valence 0 (or component of a tensorial field).
bool kerrschild
true for a Kerr-Schild background, false for a conformally flat background
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Tbl runge_kutta_theta_bh(const Tbl &xi_i, const double &theta_i, const double &phi, const int &nrk) const
Compute a forth-order Runge-Kutta integration to the theta direction for the solution of the Killing ...
Tensor field of valence 1.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Scalar confo
Conformal factor generated by the black hole.
int get_ndim() const
Gives the number of dimensions (ie dim.ndim)
virtual double rad_ah() const
Radius of the apparent horizon.
int get_dim(int i) const
Gives the i-th dimension (ie dim.dim[i])
Cmp pow(const Cmp &, int)
Power .
double val_point(double r, double theta, double phi) const
Computes the value of the field at an arbitrary point , by means of the spectral expansion.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
Vector killing_vect_bh(const Tbl &xi_i, const double &phi_i, const double &theta_i, const int &nrk_phi, const int &nrk_theta) const
Compute the Killing vector of a black hole normalized so that its affine length is 2 M_PI...
Tbl runge_kutta_phi_bh(const Tbl &xi_i, const double &phi_i, const int &nrk) const
Compute a forth-order Runge-Kutta integration to the phi direction for the solution of the Killing ve...
Coord r
r coordinate centered on the grid