23char bhole_kij_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bhole_binaire/bhole_kij.C,v 1.6 2014/10/13 08:52:40 j_novak Exp $" ;
83#include "utilitaires.h"
110 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
112 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
113 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
160 ntot_un = division_xpun (ntot_un, 0) ;
164 ntot_deux = division_xpun (ntot_deux, 0) ;
168 for (
int lig = 0 ; lig<3 ; lig++)
169 for (
int col = lig ; col<3 ; col++) {
177 if (same_orient == 1)
183 auxi_un = division_xpun (auxi_un, 0) ;
184 auxi_un = auxi_un / ntot_un ;
190 auxi_deux = division_xpun (auxi_deux, 0) ;
191 auxi_deux = auxi_deux / ntot_deux ;
213 double xabs, yabs, zabs, air, theta, phi ;
216 for (
int l=2 ; l<nz_un ; l++) {
226 for (
int k=0 ; k<np ; k++)
227 for (
int j=0 ; j<nt ; j++)
228 for (
int i=0 ; i<nr ; i++) {
230 xabs = xabs_un (l, k, j, i) ;
231 yabs = yabs_un (l, k, j, i) ;
232 zabs = zabs_un (l, k, j, i) ;
236 (xabs, yabs, zabs, air, theta, phi) ;
240 auxi_un.
set(l, k, j, i) =
241 copie_un(l, k, j, i) / ntot_un (l, k, j, i)/2. ;
244 auxi_un.
set(l, k, j, i) =
245 ind * auxi_deux.
val_point (air, theta, phi) ;
250 for (
int k=0 ; k<np ; k++)
251 for (
int j=0 ; j<nt ; j++)
252 auxi_un.
set(nz_un-1, k, j, nr-1) = 0 ;
256 for (
int l=2 ; l<nz_deux ; l++) {
266 for (
int k=0 ; k<np ; k++)
267 for (
int j=0 ; j<nt ; j++)
268 for (
int i=0 ; i<nr ; i++) {
270 xabs = xabs_deux (l, k, j, i) ;
271 yabs = yabs_deux (l, k, j, i) ;
272 zabs = zabs_deux (l, k, j, i) ;
276 (xabs, yabs, zabs, air, theta, phi) ;
280 auxi_deux.
set(l, k, j, i) =
281 copie_deux(l, k, j, i) / ntot_deux (l, k, j, i) /2.;
284 auxi_deux.
set(l, k, j, i) =
285 ind * auxi_un.
val_point (air, theta, phi) ;
289 for (
int k=0 ; k<np ; k++)
290 for (
int j=0 ; j<nt ; j++)
291 auxi_deux.
set(nz_deux-1, k, j, nr-1) = 0 ;
304 for (
int lig=0 ; lig<3 ; lig++)
305 for (
int col=lig ; col<3 ; col++) {
321 double lim_un = distance/2. ;
322 double lim_deux = distance/2. ;
323 double int_un = distance/6. ;
324 double int_deux = distance/6. ;
328 fonction_f_un = 0.5*
pow(
329 cos((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
333 fonction_g_un = 0.5*
pow
334 (
sin((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
338 fonction_f_deux = 0.5*
pow(
339 cos((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
343 fonction_g_deux = 0.5*
pow(
344 sin((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
361 double xabs, yabs, zabs, air_un, air_deux, theta, phi ;
364 for (
int l=0 ; l<nz_un ; l++) {
373 for (
int k=0 ; k<np ; k++)
374 for (
int j=0 ; j<nt ; j++)
375 for (
int i=0 ; i<nr ; i++) {
377 xabs = xabs_un (l, k, j, i) ;
378 yabs = yabs_un (l, k, j, i) ;
379 zabs = zabs_un (l, k, j, i) ;
383 (xabs, yabs, zabs, air_un, theta, phi) ;
385 (xabs, yabs, zabs, air_deux, theta, phi) ;
387 if (air_un <= lim_un)
389 decouple_un.
set(l, k, j, i) = 1 ;
392 decouple_un.
set(l, k, j, i) =
393 fonction_f_un (l, k, j, i) ;
395 if (air_deux <= lim_deux)
396 if (air_deux < int_deux)
397 decouple_un.
set(l, k, j, i) = 0 ;
400 decouple_un.
set(l, k, j, i) =
401 fonction_g_deux.
val_point (air_deux, theta, phi) ;
405 decouple_un.
set(l, k, j, i) = 0.5 ;
410 for (
int k=0 ; k<np ; k++)
411 for (
int j=0 ; j<nt ; j++)
412 decouple_un.
set(nz_un-1, k, j, nr) = 0.5 ;
415 for (
int l=0 ; l<nz_deux ; l++) {
425 for (
int k=0 ; k<np ; k++)
426 for (
int j=0 ; j<nt ; j++)
427 for (
int i=0 ; i<nr ; i++) {
429 xabs = xabs_deux (l, k, j, i) ;
430 yabs = yabs_deux (l, k, j, i) ;
431 zabs = zabs_deux (l, k, j, i) ;
435 (xabs, yabs, zabs, air_un, theta, phi) ;
437 (xabs, yabs, zabs, air_deux, theta, phi) ;
439 if (air_deux <= lim_deux)
440 if (air_deux < int_deux)
441 decouple_deux.
set(l, k, j, i) = 1 ;
444 decouple_deux.
set(l, k, j, i) =
445 fonction_f_deux (l, k, j, i) ;
447 if (air_un <= lim_un)
449 decouple_deux.
set(l, k, j, i) = 0 ;
452 decouple_deux.
set(l, k, j, i) =
453 fonction_g_un.
val_point (air_un, theta, phi) ;
457 decouple_deux.
set(l, k, j, i) = 0.5 ;
462 for (
int k=0 ; k<np ; k++)
463 for (
int j=0 ; j<nt ; j++)
464 decouple_deux.
set(nz_deux-1, k, j, nr) = 0.5 ;
Bhole hole1
Black hole one.
Bhole hole2
Black hole two.
void fait_decouple()
Calculates {tt decouple} which is used to obtain tkij_auto by the formula : tkij_auto = decouple * tk...
void fait_tkij()
Calculation af the extrinsic curvature tensor.
Tenseur_sym tkij_auto
Auto .
Tenseur_sym taij_auto
Part of generated by the hole.
Tenseur_sym taij_comp
Part of generated by the companion hole.
Map_af & mp
Affine mapping.
Tenseur_sym taij_tot
Total , which must be zero on the horizon of the regularisation on the shift has been done.
Tenseur_sym tkij_tot
Total .
void fait_taij_auto()
Calculates the part of generated by shift_auto .
Cmp decouple
Function used to construct the part of generated by the hole from the total .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Tbl & set(int l)
Read/write of the value in a given domain.
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
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...
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
const double * get_beta() const
Returns the pointer on the array beta.
const double * get_alpha() const
Returns the pointer on the array alpha.
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.
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 handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
const Map * get_mp() const
Returns pointer on the mapping.
void dec2_dzpuis()
dzpuis -= 2 ;
void set_std_base()
Set the standard spectal basis of decomposition for each component.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
void inc2_dzpuis()
dzpuis += 2 ;
int get_etat() const
Returns the logical state.
Cmp sin(const Cmp &)
Sine.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.