87 #include "utilitaires.h" 99 for (
int k=0; k<nnp; k++)
100 for (
int j=0; j<nnt; j++){
124 for (
int i=1 ; i<=3 ; i++)
125 for (
int j=i ; j<=3 ; j++) {
126 if (aa_auto_un(i,j).get_etat() != ETATZERO)
127 aa_auto_un.set(i, j).raccord(3) ;
128 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
129 aa_auto_deux.set(i, j).raccord(3) ;
142 aa_auto_deux.dec_dzpuis(2) ;
151 assert(*(aa_auto_deux.get_triad()) == *(aa_comp_un.get_triad())) ;
154 for (
int i=1 ; i<=3 ; i++)
155 for (
int j=i ; j<=3 ; j++) {
156 aa_comp_un.set(i, j).import(aa_auto_deux(i, j)) ;
157 aa_comp_un.set(i, j).set_spectral_va().set_base(aa_auto_deux(i, j).
158 get_spectral_va().get_base()) ;
161 aa_comp_un.inc_dzpuis(2) ;
166 assert(*(aa_auto_un.get_triad()) == *(aa_comp_deux.get_triad())) ;
168 for (
int i=1 ; i<=3 ; i++)
169 for (
int j=i ; j<=3 ; j++) {
170 aa_comp_deux.set(i, j).import(aa_auto_un(i, j)) ;
171 aa_comp_deux.set(i, j).set_spectral_va().set_base(aa_auto_un(i, j).
172 get_spectral_va().get_base()) ;
175 aa_comp_deux.inc_dzpuis(2) ;
227 for (
int i=1 ; i<=3 ; i++)
228 for (
int j=1 ; j<=3 ; j++) {
229 if (aa_auto_un(i,j).get_etat() != ETATZERO)
230 aa_auto_un.set(i, j).raccord(3) ;
231 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
232 aa_auto_deux.set(i, j).raccord(3) ;
249 assert(*(aa_auto_2.
get_triad()) == *(aa_comp_un.get_triad())) ;
251 aa_comp_un.set(1, 1).import(aa_auto_2(1, 1)) ;
252 aa_comp_un.set(1, 2).import(aa_auto_2(1, 2)) ;
253 aa_comp_un.set(1, 3).import(aa_auto_2(1, 3)) ;
254 aa_comp_un.set(2, 2).import(aa_auto_2(2, 2)) ;
255 aa_comp_un.set(2, 3).import(aa_auto_2(2, 3)) ;
256 aa_comp_un.set(3, 3).import(aa_auto_2(3, 3)) ;
258 aa_comp_un.std_spectral_base() ;
259 aa_comp_un.inc_dzpuis(2) ;
262 assert(*(aa_auto_1.
get_triad()) == *(aa_comp_deux.get_triad())) ;
264 aa_comp_deux.set(1, 1).import(aa_auto_1(1, 1)) ;
265 aa_comp_deux.set(1, 2).import(aa_auto_1(1, 2)) ;
266 aa_comp_deux.set(1, 3).import(aa_auto_1(1, 3)) ;
267 aa_comp_deux.set(2, 2).import(aa_auto_1(2, 2)) ;
268 aa_comp_deux.set(2, 3).import(aa_auto_1(2, 3)) ;
269 aa_comp_deux.set(3, 3).import(aa_auto_1(3, 3)) ;
271 aa_comp_deux.std_spectral_base() ;
272 aa_comp_deux.inc_dzpuis(2) ;
277 aa_tot_un = aa_auto_un + aa_comp_un ;
278 aa_tot_deux = aa_auto_deux + aa_comp_deux ;
296 ntot_un = division_xpun (ntot_un, 0) ;
300 ntot_deux = division_xpun (ntot_deux, 0) ;
304 double orientation_un = aa_auto_un.get_mp().get_rot_phi() ;
305 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
306 double orientation_deux = aa_auto_deux.get_mp().get_rot_phi() ;
307 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
308 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
312 for (
int lig = 1 ; lig<=3 ; lig++)
313 for (
int col = lig ; col<=3 ; col++) {
321 if (same_orient == 1)
325 Scalar auxi_un (aa_tot_un(lig, col)/2.) ;
327 auxi_un = division_xpun (auxi_un, 0) ;
328 auxi_un = auxi_un / ntot_un ;
333 Scalar auxi_deux (aa_tot_deux(lig, col)/2.) ;
335 auxi_deux = division_xpun (auxi_deux, 0) ;
336 auxi_deux = auxi_deux / ntot_deux ;
337 if (auxi_deux.
get_etat() != ETATZERO)
341 Scalar copie_un (aa_tot_un(lig, col)) ;
344 Scalar copie_deux (aa_tot_deux(lig, col)) ;
358 double xabs, yabs, zabs, air, theta, phi ;
360 if (auxi_un.
get_etat() != ETATZERO){
362 for (
int l=2 ; l<nz_un ; l++) {
372 for (
int k=0 ; k<np ; k++)
373 for (
int j=0 ; j<nt ; j++)
374 for (
int i=0 ; i<nr ; i++) {
376 xabs = xabs_un (l, k, j, i) ;
377 yabs = yabs_un (l, k, j, i) ;
378 zabs = zabs_un (l, k, j, i) ;
382 (xabs, yabs, zabs, air, theta, phi) ;
392 ind * auxi_deux.
val_point (air, theta, phi) ;
398 for (
int k=0 ; k<np ; k++)
399 for (
int j=0 ; j<nt ; j++)
404 if (auxi_deux.
get_etat() != ETATZERO){
406 for (
int l=2 ; l<nz_deux ; l++) {
416 for (
int k=0 ; k<np ; k++)
417 for (
int j=0 ; j<nt ; j++)
418 for (
int i=0 ; i<nr ; i++) {
420 xabs = xabs_deux (l, k, j, i) ;
421 yabs = yabs_deux (l, k, j, i) ;
422 zabs = zabs_deux (l, k, j, i) ;
426 (xabs, yabs, zabs, air, theta, phi) ;
436 ind * auxi_un.
val_point (air, theta, phi) ;
440 for (
int k=0 ; k<np ; k++)
441 for (
int j=0 ; j<nt ; j++)
449 aa_un.set(lig, col) = auxi_un ;
450 aa_deux.
set(lig, col) = auxi_deux ;
462 for (
int lig=1 ; lig<=3 ; lig++)
463 for (
int col=lig ; col<=3 ; col++) {
483 double lim_un = distance/2. ;
484 double lim_deux = distance/2. ;
485 double int_un = distance/6. ;
486 double int_deux = distance/6. ;
490 fonction_f_un = 0.5*
pow(
491 cos((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
495 fonction_g_un = 0.5*
pow 496 (
sin((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
500 fonction_f_deux = 0.5*
pow(
501 cos((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
505 fonction_g_deux = 0.5*
pow(
506 sin((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
523 double xabs, yabs, zabs, air_un, air_deux, theta, phi ;
525 for (
int l=0 ; l<nz_un ; l++) {
534 for (
int k=0 ; k<np ; k++)
535 for (
int j=0 ; j<nt ; j++)
536 for (
int i=0 ; i<nr ; i++) {
538 xabs = xabs_un (l, k, j, i) ;
539 yabs = yabs_un (l, k, j, i) ;
540 zabs = zabs_un (l, k, j, i) ;
544 (xabs, yabs, zabs, air_un, theta, phi) ;
546 (xabs, yabs, zabs, air_deux, theta, phi) ;
548 if (air_un <= lim_un)
556 if (air_deux <= lim_deux)
557 if (air_deux < int_deux)
562 fonction_g_deux.
val_point (air_deux, theta, phi) ;
571 for (
int k=0 ; k<np ; k++)
572 for (
int j=0 ; j<nt ; j++)
576 for (
int l=0 ; l<nz_deux ; l++) {
585 for (
int k=0 ; k<np ; k++)
586 for (
int j=0 ; j<nt ; j++)
587 for (
int i=0 ; i<nr ; i++) {
589 xabs = xabs_deux (l, k, j, i) ;
590 yabs = yabs_deux (l, k, j, i) ;
591 zabs = zabs_deux (l, k, j, i) ;
595 (xabs, yabs, zabs, air_un, theta, phi) ;
597 (xabs, yabs, zabs, air_deux, theta, phi) ;
599 if (air_deux <= lim_deux)
600 if (air_deux < int_deux)
607 if (air_un <= lim_un)
613 fonction_g_un.
val_point (air_un, theta, phi) ;
622 for (
int k=0 ; k<np ; k++)
623 for (
int j=0 ; j<nt ; j++)
void decouple()
Calculates decouple which is used to obtain tkij_auto and tkij_comp.
Coord xa
Absolute x coordinate.
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
const double * get_alpha() const
Returns the pointer on the array alpha.
Metric tgam
3 metric tilde
void extrinsic_curvature()
Calculation of the extrinsic curvature tensor.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Scalar decouple
Function used to construct from the total .
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Scalar n_comp
Lapse function .
Tensor field of valence 0 (or component of a tensorial field).
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
double get_ori_x() const
Returns the x coordinate of the origin.
Single_hor hole1
Black hole one.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Sym_tensor aa_auto
Components of the conformal representation of the traceless part of the extrinsic curvature: ...
Cmp cos(const Cmp &)
Cosine.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
Sym_tensor aa
Components of the conformal representation of the traceless part of the extrinsic curvature: ...
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
const double * get_beta() const
Returns the pointer on the array beta.
Vector beta_auto
Shift function .
int get_nzone() const
Returns the number of domains.
Sym_tensor aa_comp
Components of the conformal representation of the traceless part of the extrinsic curvature: ...
Cmp pow(const Cmp &, int)
Power .
Scalar n_auto
Lapse function .
Single_hor hole2
Black hole two.
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.
Coord ya
Absolute y coordinate.
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Map_af & mp
Affine mapping.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Coord za
Absolute z coordinate.
Sym_tensor gamt_point
Time derivative of the 3-metric tilde.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Cmp sin(const Cmp &)
Sine.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
void convert_absolute(double xx, double yy, double zz, double &rr, double &theta, double &pphi) const
Determines the coordinates corresponding to given absolute Cartesian coordinates (X...
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Class intended to describe valence-2 symmetric tensors.
Scalar nn
Lapse function .
Coord r
r coordinate centered on the grid