24char binhor_kij_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_hor/binhor_kij.C,v 1.11 2014/10/13 08:52:42 j_novak Exp $" ;
84#include "utilitaires.h"
96 for (
int k=0; k<nnp; k++)
97 for (
int j=0; j<nnt; j++){
121 for (
int i=1 ; i<=3 ; i++)
122 for (
int j=i ; j<=3 ; j++) {
123 if (aa_auto_un(i,j).get_etat() != ETATZERO)
125 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
151 for (
int i=1 ; i<=3 ; i++)
152 for (
int j=i ; j<=3 ; j++) {
153 aa_comp_un.
set(i, j).
import(aa_auto_deux(i, j)) ;
155 get_spectral_va().get_base()) ;
165 for (
int i=1 ; i<=3 ; i++)
166 for (
int j=i ; j<=3 ; j++) {
167 aa_comp_deux.
set(i, j).
import(aa_auto_un(i, j)) ;
169 get_spectral_va().get_base()) ;
224 for (
int i=1 ; i<=3 ; i++)
225 for (
int j=1 ; j<=3 ; j++) {
226 if (aa_auto_un(i,j).get_etat() != ETATZERO)
228 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
248 aa_comp_un.
set(1, 1).
import(aa_auto_2(1, 1)) ;
249 aa_comp_un.
set(1, 2).
import(aa_auto_2(1, 2)) ;
250 aa_comp_un.
set(1, 3).
import(aa_auto_2(1, 3)) ;
251 aa_comp_un.
set(2, 2).
import(aa_auto_2(2, 2)) ;
252 aa_comp_un.
set(2, 3).
import(aa_auto_2(2, 3)) ;
253 aa_comp_un.
set(3, 3).
import(aa_auto_2(3, 3)) ;
261 aa_comp_deux.
set(1, 1).
import(aa_auto_1(1, 1)) ;
262 aa_comp_deux.
set(1, 2).
import(aa_auto_1(1, 2)) ;
263 aa_comp_deux.
set(1, 3).
import(aa_auto_1(1, 3)) ;
264 aa_comp_deux.
set(2, 2).
import(aa_auto_1(2, 2)) ;
265 aa_comp_deux.
set(2, 3).
import(aa_auto_1(2, 3)) ;
266 aa_comp_deux.
set(3, 3).
import(aa_auto_1(3, 3)) ;
274 aa_tot_un = aa_auto_un + aa_comp_un ;
275 aa_tot_deux = aa_auto_deux + aa_comp_deux ;
293 ntot_un = division_xpun (ntot_un, 0) ;
297 ntot_deux = division_xpun (ntot_deux, 0) ;
302 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
304 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
305 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
309 for (
int lig = 1 ; lig<=3 ; lig++)
310 for (
int col = lig ; col<=3 ; col++) {
318 if (same_orient == 1)
322 Scalar auxi_un (aa_tot_un(lig, col)/2.) ;
324 auxi_un = division_xpun (auxi_un, 0) ;
325 auxi_un = auxi_un / ntot_un ;
330 Scalar auxi_deux (aa_tot_deux(lig, col)/2.) ;
332 auxi_deux = division_xpun (auxi_deux, 0) ;
333 auxi_deux = auxi_deux / ntot_deux ;
334 if (auxi_deux.
get_etat() != ETATZERO)
338 Scalar copie_un (aa_tot_un(lig, col)) ;
341 Scalar copie_deux (aa_tot_deux(lig, col)) ;
355 double xabs, yabs, zabs, air, theta, phi ;
357 if (auxi_un.
get_etat() != ETATZERO){
359 for (
int l=2 ; l<nz_un ; l++) {
369 for (
int k=0 ; k<np ; k++)
370 for (
int j=0 ; j<nt ; j++)
371 for (
int i=0 ; i<nr ; i++) {
373 xabs = xabs_un (l, k, j, i) ;
374 yabs = yabs_un (l, k, j, i) ;
375 zabs = zabs_un (l, k, j, i) ;
379 (xabs, yabs, zabs, air, theta, phi) ;
389 ind * auxi_deux.
val_point (air, theta, phi) ;
395 for (
int k=0 ; k<np ; k++)
396 for (
int j=0 ; j<nt ; j++)
401 if (auxi_deux.
get_etat() != ETATZERO){
403 for (
int l=2 ; l<nz_deux ; l++) {
413 for (
int k=0 ; k<np ; k++)
414 for (
int j=0 ; j<nt ; j++)
415 for (
int i=0 ; i<nr ; i++) {
417 xabs = xabs_deux (l, k, j, i) ;
418 yabs = yabs_deux (l, k, j, i) ;
419 zabs = zabs_deux (l, k, j, i) ;
423 (xabs, yabs, zabs, air, theta, phi) ;
433 ind * auxi_un.
val_point (air, theta, phi) ;
437 for (
int k=0 ; k<np ; k++)
438 for (
int j=0 ; j<nt ; j++)
446 aa_un.
set(lig, col) = auxi_un ;
447 aa_deux.
set(lig, col) = auxi_deux ;
459 for (
int lig=1 ; lig<=3 ; lig++)
460 for (
int col=lig ; col<=3 ; col++) {
480 double lim_un = distance/2. ;
481 double lim_deux = distance/2. ;
482 double int_un = distance/6. ;
483 double int_deux = distance/6. ;
487 fonction_f_un = 0.5*
pow(
488 cos((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
492 fonction_g_un = 0.5*
pow
493 (
sin((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
497 fonction_f_deux = 0.5*
pow(
498 cos((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
502 fonction_g_deux = 0.5*
pow(
503 sin((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
520 double xabs, yabs, zabs, air_un, air_deux, theta, phi ;
522 for (
int l=0 ; l<nz_un ; l++) {
531 for (
int k=0 ; k<np ; k++)
532 for (
int j=0 ; j<nt ; j++)
533 for (
int i=0 ; i<nr ; i++) {
535 xabs = xabs_un (l, k, j, i) ;
536 yabs = yabs_un (l, k, j, i) ;
537 zabs = zabs_un (l, k, j, i) ;
541 (xabs, yabs, zabs, air_un, theta, phi) ;
543 (xabs, yabs, zabs, air_deux, theta, phi) ;
545 if (air_un <= lim_un)
553 if (air_deux <= lim_deux)
554 if (air_deux < int_deux)
559 fonction_g_deux.
val_point (air_deux, theta, phi) ;
568 for (
int k=0 ; k<np ; k++)
569 for (
int j=0 ; j<nt ; j++)
573 for (
int l=0 ; l<nz_deux ; l++) {
582 for (
int k=0 ; k<np ; k++)
583 for (
int j=0 ; j<nt ; j++)
584 for (
int i=0 ; i<nr ; i++) {
586 xabs = xabs_deux (l, k, j, i) ;
587 yabs = yabs_deux (l, k, j, i) ;
588 zabs = zabs_deux (l, k, j, i) ;
592 (xabs, yabs, zabs, air_un, theta, phi) ;
594 (xabs, yabs, zabs, air_deux, theta, phi) ;
596 if (air_deux <= lim_deux)
597 if (air_deux < int_deux)
604 if (air_un <= lim_un)
610 fonction_g_un.
val_point (air_un, theta, phi) ;
619 for (
int k=0 ; k<np ; k++)
620 for (
int j=0 ; j<nt ; j++)
Single_hor hole1
Black hole one.
Single_hor hole2
Black hole two.
void decouple()
Calculates decouple which is used to obtain tkij_auto and tkij_comp.
void extrinsic_curvature()
Calculation of the extrinsic curvature tensor.
const double * get_beta() const
Returns the pointer on the array beta.
const double * get_alpha() const
Returns the pointer on the array alpha.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Coord ya
Absolute y coordinate.
Coord r
r coordinate centered on the grid
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,...
Coord za
Absolute z coordinate.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
double get_ori_x() const
Returns the x coordinate of the origin.
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Coord xa
Absolute x coordinate.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tensor field of valence 0 (or component of a tensorial field).
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
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 inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Valeur & set_spectral_va()
Returns va (read/write version)
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
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.
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...
void import(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
Scalar decouple
Function used to construct from the total .
Vector beta_auto
Shift function .
Scalar n_comp
Lapse function .
Sym_tensor aa_auto
Components of the conformal representation of the traceless part of the extrinsic curvature:
Map_af & mp
Affine mapping.
Sym_tensor aa_comp
Components of the conformal representation of the traceless part of the extrinsic curvature:
Sym_tensor gamt_point
Time derivative of the 3-metric tilde.
Scalar n_auto
Lapse function .
Scalar nn
Lapse function .
Sym_tensor aa
Components of the conformal representation of the traceless part of the extrinsic curvature:
Metric tgam
3 metric tilde
Class intended to describe valence-2 symmetric tensors.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
Cmp sin(const Cmp &)
Sine.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
const Map & get_mp() const
Returns the mapping.
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values in the compactified ext...
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.