86 #include "utilitaires.h" 87 #include "graphique.h" 113 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
115 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
116 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
163 ntot_un = division_xpun (ntot_un, 0) ;
167 ntot_deux = division_xpun (ntot_deux, 0) ;
168 ntot_deux.raccord(1) ;
171 for (
int lig = 0 ; lig<3 ; lig++)
172 for (
int col = lig ; col<3 ; col++) {
180 if (same_orient == 1)
186 auxi_un = division_xpun (auxi_un, 0) ;
187 auxi_un = auxi_un / ntot_un ;
193 auxi_deux = division_xpun (auxi_deux, 0) ;
194 auxi_deux = auxi_deux / ntot_deux ;
216 double xabs, yabs, zabs, air, theta, phi ;
219 for (
int l=2 ; l<nz_un ; l++) {
229 for (
int k=0 ; k<np ; k++)
230 for (
int j=0 ; j<nt ; j++)
231 for (
int i=0 ; i<nr ; i++) {
233 xabs = xabs_un (l, k, j, i) ;
234 yabs = yabs_un (l, k, j, i) ;
235 zabs = zabs_un (l, k, j, i) ;
239 (xabs, yabs, zabs, air, theta, phi) ;
243 auxi_un.
set(l, k, j, i) =
244 copie_un(l, k, j, i) / ntot_un (l, k, j, i)/2. ;
247 auxi_un.
set(l, k, j, i) =
248 ind * auxi_deux.
val_point (air, theta, phi) ;
253 for (
int k=0 ; k<np ; k++)
254 for (
int j=0 ; j<nt ; j++)
255 auxi_un.
set(nz_un-1, k, j, nr-1) = 0 ;
259 for (
int l=2 ; l<nz_deux ; l++) {
269 for (
int k=0 ; k<np ; k++)
270 for (
int j=0 ; j<nt ; j++)
271 for (
int i=0 ; i<nr ; i++) {
273 xabs = xabs_deux (l, k, j, i) ;
274 yabs = yabs_deux (l, k, j, i) ;
275 zabs = zabs_deux (l, k, j, i) ;
279 (xabs, yabs, zabs, air, theta, phi) ;
283 auxi_deux.
set(l, k, j, i) =
284 copie_deux(l, k, j, i) / ntot_deux (l, k, j, i) /2.;
287 auxi_deux.
set(l, k, j, i) =
288 ind * auxi_un.
val_point (air, theta, phi) ;
292 for (
int k=0 ; k<np ; k++)
293 for (
int j=0 ; j<nt ; j++)
294 auxi_deux.
set(nz_deux-1, k, j, nr-1) = 0 ;
307 for (
int lig=0 ; lig<3 ; lig++)
308 for (
int col=lig ; col<3 ; col++) {
324 double lim_un = distance/2. ;
325 double lim_deux = distance/2. ;
326 double int_un = distance/6. ;
327 double int_deux = distance/6. ;
331 fonction_f_un = 0.5*
pow(
332 cos((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
336 fonction_g_un = 0.5*
pow 337 (
sin((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
341 fonction_f_deux = 0.5*
pow(
342 cos((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
346 fonction_g_deux = 0.5*
pow(
347 sin((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
364 double xabs, yabs, zabs, air_un, air_deux, theta, phi ;
367 for (
int l=0 ; l<nz_un ; l++) {
376 for (
int k=0 ; k<np ; k++)
377 for (
int j=0 ; j<nt ; j++)
378 for (
int i=0 ; i<nr ; i++) {
380 xabs = xabs_un (l, k, j, i) ;
381 yabs = yabs_un (l, k, j, i) ;
382 zabs = zabs_un (l, k, j, i) ;
386 (xabs, yabs, zabs, air_un, theta, phi) ;
388 (xabs, yabs, zabs, air_deux, theta, phi) ;
390 if (air_un <= lim_un)
392 decouple_un.
set(l, k, j, i) = 1 ;
395 decouple_un.
set(l, k, j, i) =
396 fonction_f_un (l, k, j, i) ;
398 if (air_deux <= lim_deux)
399 if (air_deux < int_deux)
400 decouple_un.
set(l, k, j, i) = 0 ;
403 decouple_un.
set(l, k, j, i) =
404 fonction_g_deux.
val_point (air_deux, theta, phi) ;
408 decouple_un.
set(l, k, j, i) = 0.5 ;
413 for (
int k=0 ; k<np ; k++)
414 for (
int j=0 ; j<nt ; j++)
415 decouple_un.
set(nz_un-1, k, j, nr) = 0.5 ;
418 for (
int l=0 ; l<nz_deux ; l++) {
428 for (
int k=0 ; k<np ; k++)
429 for (
int j=0 ; j<nt ; j++)
430 for (
int i=0 ; i<nr ; i++) {
432 xabs = xabs_deux (l, k, j, i) ;
433 yabs = yabs_deux (l, k, j, i) ;
434 zabs = zabs_deux (l, k, j, i) ;
438 (xabs, yabs, zabs, air_un, theta, phi) ;
440 (xabs, yabs, zabs, air_deux, theta, phi) ;
442 if (air_deux <= lim_deux)
443 if (air_deux < int_deux)
444 decouple_deux.
set(l, k, j, i) = 1 ;
447 decouple_deux.
set(l, k, j, i) =
448 fonction_f_deux (l, k, j, i) ;
450 if (air_un <= lim_un)
452 decouple_deux.
set(l, k, j, i) = 0 ;
455 decouple_deux.
set(l, k, j, i) =
456 fonction_g_un.
val_point (air_un, theta, phi) ;
460 decouple_deux.
set(l, k, j, i) = 0.5 ;
465 for (
int k=0 ; k<np ; k++)
466 for (
int j=0 ; j<nt ; j++)
467 decouple_deux.
set(nz_deux-1, k, j, nr) = 0.5 ;
Coord xa
Absolute x coordinate.
void fait_tkij()
Calculation af the extrinsic curvature tensor.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const double * get_alpha() const
Returns the pointer on the array alpha.
void dec2_dzpuis()
dzpuis -= 2 ;
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
Tenseur_sym taij_tot
Total , which must be zero on the horizon of the regularisation on the shift has been done...
void fait_taij_auto()
Calculates the part of generated by shift_auto .
Tenseur_sym taij_auto
Part of generated by the hole.
Cmp cos(const Cmp &)
Cosine.
void inc2_dzpuis()
dzpuis += 2 ;
Tenseur_sym taij_comp
Part of generated by the companion hole.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
const Map * get_mp() const
Returns pointer on the mapping.
Map_af & mp
Affine mapping.
Bhole hole1
Black hole one.
const double * get_beta() const
Returns the pointer on the array beta.
int get_nzone() const
Returns the number of domains.
int get_etat() const
Returns the logical state.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Cmp pow(const Cmp &, int)
Power .
Tenseur_sym tkij_auto
Auto .
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
void fait_decouple()
Calculates {tt decouple} which is used to obtain tkij_auto by the formula : tkij_auto = decouple * tk...
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Tenseur_sym tkij_tot
Total .
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Coord ya
Absolute y coordinate.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Tbl & set(int l)
Read/write of the value in a given domain.
Cmp decouple
Function used to construct the part of generated by the hole from the total .
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Coord za
Absolute z coordinate.
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 set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
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...
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
double val_point(double r, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point , by means of the spectral...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Coord r
r coordinate centered on the grid
Bhole hole2
Black hole two.