71 #include "et_bin_bhns_extr.h" 77 #include "graphique.h" 78 #include "utilitaires.h" 115 int i_b = mg->
get_nr(l_b) - 1 ;
125 double& diff_ent = diff.
set(0) ;
126 double& diff_vel_pot = diff.
set(1) ;
127 double& diff_logn = diff.
set(2) ;
128 double& diff_beta = diff.
set(3) ;
129 double& diff_shift_x = diff.
set(4) ;
130 double& diff_shift_y = diff.
set(5) ;
131 double& diff_shift_z = diff.
set(6) ;
142 int nz_search =
nzet ;
144 double precis_secant = 1.e-14 ;
146 double reg_map = 1. ;
150 par_adapt.
add_int(nitermax, 0) ;
155 par_adapt.
add_int(nz_search, 2) ;
157 par_adapt.
add_int(adapt_flag, 3) ;
173 par_adapt.
add_tbl(ent_limit, 0) ;
179 double precis_poisson = 1.e-16 ;
183 par_poisson1.
add_int(mermax_poisson, 0) ;
195 par_poisson2.
add_int(mermax_poisson, 0) ;
205 Param par_poisson_vect ;
207 par_poisson_vect.
add_int(mermax_poisson, 0) ;
209 par_poisson_vect.
add_double(relax_poisson, 0) ;
210 par_poisson_vect.
add_double(precis_poisson, 1) ;
233 cout <<
"We don't have those ylm programmed yet!!!!" << endl ;
237 int nylm = (l_max+1) * (l_max+1) ;
239 Cmp** ylmvec =
new Cmp* [nylm] ;
245 for(
int mer=0 ; mer<mermax ; mer++ ) {
247 cout <<
"-----------------------------------------------" << endl ;
248 cout <<
"step: " << mer << endl ;
249 cout <<
"diff_ent = " << diff_ent << endl ;
258 precis_poisson, relax_potvit) ;
269 double logn_auto_c =
logn_auto()(0, 0, 0, 0) ;
270 double pot_ext_c = pot_ext()(0, 0, 0, 0) ;
276 double alpha_r2 = 0 ;
277 for (
int k=0; k<mg->
get_np(l_b); k++) {
278 for (
int j=0; j<mg->
get_nt(l_b); j++) {
280 double pot_ext_b = pot_ext()(l_b, k, j, i_b) ;
281 double logn_auto_b =
logn_auto()(l_b, k, j, i_b) ;
284 double alpha_r2_jk = ( ent_c - ent_b + pot_ext_c - pot_ext_b)
285 / ( logn_auto_b - logn_auto_c ) ;
287 if (alpha_r2_jk > alpha_r2) {
288 alpha_r2 = alpha_r2_jk ;
296 alpha_r =
sqrt(alpha_r2) ;
298 cout <<
"k_b, j_b, alpha_r: " << k_b <<
" " << j_b <<
" " 320 ent = (ent_c + logn_auto_c + pot_ext_c) -
logn_auto - pot_ext ;
327 double dentdx =
ent().dsdx()(0, 0, 0, 0) ;
328 double dentdy =
ent().dsdy()(0, 0, 0, 0) ;
330 cout <<
"dH/dx|_center = " << dentdx << endl ;
331 cout <<
"dH/dy|_center = " << dentdy << endl ;
333 double dec_fact = 1. ;
337 func_in.
set() = 1. - dec_fact * (dentdx/ent_c) *
mp.
x 338 - dec_fact * (dentdy/ent_c) *
mp.
y ;
350 ent.
set() =
ent() * (func_in() + func_ex()) ;
354 double dentdx_new =
ent().dsdx()(0, 0, 0, 0) ;
355 double dentdy_new =
ent().dsdy()(0, 0, 0, 0) ;
356 cout <<
"dH/dx|_new = " << dentdx_new << endl ;
357 cout <<
"dH/dy|_new = " << dentdy_new << endl ;
366 double dent_eq =
ent().dsdr().val_point(
ray_eq_pi(),M_PI/2.,M_PI) ;
367 double dent_pole =
ent().dsdr().val_point(
ray_pole(),0.,0.) ;
368 double rap_dent = fabs( dent_eq / dent_pole ) ;
369 cout <<
"| dH/dr_eq / dH/dr_pole | = " << rap_dent << endl ;
371 if ( rap_dent < thres_adapt ) {
373 cout <<
"******* FROZEN MAPPING *********" << endl ;
381 for (
int l=0; l<
nzet; l++) {
382 ent_limit.
set(l) =
ent()(l, k_b, j_b, i_b) ;
385 ent_limit.
set(
nzet-1) = ent_b ;
398 double fact_resize = 1. / alpha_r ;
399 for (
int l=
nzet; l<nz-1; l++) {
400 mp_et.
resize(l, fact_resize) ;
404 double ent_s_max = -1 ;
407 for (
int k=0; k<mg->
get_np(l_b); k++) {
408 for (
int j=0; j<mg->
get_nt(l_b); j++) {
409 double xx = fabs(
ent()(l_b, k, j, i_b) ) ;
410 if (xx > ent_s_max) {
417 cout <<
"Max. abs(enthalpy) at the boundary between domains nzet-1" 418 <<
" and nzet : " << endl ;
419 cout <<
" " << ent_s_max <<
" reached for k = " << k_s_max
420 <<
" and j = " << j_s_max << endl ;
429 for (
int l=0; l<=l_max; l++) {
430 for (
int m=0; m<= l; m++) {
432 int index = l*l + 2*m ;
433 if(m > 0) index -= 1 ;
434 if(index != oldindex+1) {
435 cout <<
"error!! " << l <<
" " << m <<
" " << index
436 <<
" " << oldindex << endl ;
441 if ((l+m) % 2 == 0) {
458 if(oldindex+1 != nylm) {
459 cout <<
"ERROR!!! " << oldindex <<
" "<< nylm << endl ;
493 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
498 xx_cov.
set(0) = xx + sepa ;
504 xsr_cov = xx_cov / r_bh ;
508 msr = ggrav * mass / r_bh ;
512 lapse_bh = 1. /
sqrt( 1.+2.*msr ) ;
516 lapse_bh2 = 1. / (1.+2.*msr) ;
532 for (
int i=0; i<3; i++)
533 for (
int j=0; j<3; j++)
534 lltkij.
set() += xsr_cov(i) * xsr_cov(j) *
tkij_auto(i, j) ;
568 + 2.*lapse_bh2 % msr % (ldnu % ldbeta + ldldnu)
569 + lapse_bh2 % lapse_bh2 % msr % (2.*(ldnu + 4.*msr % ldnu)
571 - (4.*
a_car % lapse_bh2 % lapse_bh2 % msr / 3. /
nnn / r_bh)
572 * (2.+3.*msr) * (3.+4.*msr) * lltkij
573 + (2.*
a_car % lapse_bh2 % lapse_bh2 % lapse_bh % msr
574 /
nnn / r_bh / r_bh) * (2.+10.*msr+9.*msr%msr) * lshift
575 + (4.*
pow(lapse_bh2, 3.) % msr % msr / 3. / r_bh / r_bh)
578 - 3.*(
a_car%lapse_bh/
nnn - 1.)*(2.+10.*msr+9.*msr%msr)) ;
582 cout <<
"The computation of BH-NS binary systems" 583 <<
" should be relativistic !!!" << endl ;
592 double* intvec_logn =
new double[nylm] ;
598 if(nu_int[0] != -1.0) {
599 for (
int i=0; i<nylm; i++) {
600 intvec_logn[i] *= relax_ylm ;
601 intvec_logn[i] += (1.0 - relax_ylm) * nu_int[i] ;
605 source().poisson_ylm(par_poisson1,
logn_auto.
set(), nylm,
608 for (
int i=0; i<nylm; i++) {
609 nu_int[i] = intvec_logn[i] ;
612 delete [] intvec_logn ;
625 "Relative error in the resolution of the equation for logn_auto : " 628 for (
int l=0; l<nz; l++) {
629 cout << tdiff_logn(l) <<
" " ;
632 diff_logn =
max(
abs(tdiff_logn)) ;
646 + lapse_bh2 % msr % (ldnu%ldnu + ldbeta%ldbeta + 2.*ldldbeta)
647 + lapse_bh2 % lapse_bh2 % msr % (2.*(1.+4.*msr) * ldbeta
649 - (
a_car % lapse_bh2 % lapse_bh2 % msr /
nnn / r_bh)
650 * (2.+3.*msr) * (3.+4.*msr) * lltkij
651 + (2.*
a_car % lapse_bh2 % lapse_bh2 % lapse_bh % msr
652 /
nnn / r_bh / r_bh) * (2.+10.*msr+9.*msr%msr) * lshift
653 + (2.*
pow(lapse_bh2, 3.) % msr % msr / r_bh / r_bh)
656 - 2.*(
a_car%lapse_bh/
nnn - 1.)*(2.+10.*msr+9.*msr%msr)) ;
663 double* intvec_beta =
new double[nylm] ;
668 if(beta_int[0] != -1.0) {
669 for (
int i=0; i<nylm; i++) {
670 intvec_beta[i] *= relax_ylm ;
671 intvec_beta[i] += (1.0 - relax_ylm) * beta_int[i] ;
678 for (
int i=0; i<nylm; i++) {
679 beta_int[i] = intvec_beta[i] ;
682 delete [] intvec_beta ;
689 cout <<
"Relative error in the resolution of the equation for " 690 <<
"beta_auto : " << endl ;
691 for (
int l=0; l<nz; l++) {
692 cout << tdiff_beta(l) <<
" " ;
695 diff_beta =
max(
abs(tdiff_beta)) ;
706 xx_con.
set(0) = xx + sepa ;
712 xsr_con = xx_con / r_bh ;
754 eldn.
set(0) = ldn_cov(0) ;
755 eldn.
set(1) = ldn_cov(1) ;
756 eldn.
set(2) = ldn_cov(2) ;
760 Tenseur ldivn = xsr_con % divn ;
781 evtmp.
set(0) = vtmp(0) ;
782 evtmp.
set(1) = vtmp(1) ;
783 evtmp.
set(2) = vtmp(2) ;
797 - 2.*
nnn % lapse_bh2 * msr / r_bh
799 + 2.*lapse_bh2 * msr * (3.*ldldn + ldldivn) / 3.
800 - lapse_bh2 * msr / r_bh
801 * (4.*ldivn - lapse_bh2 % (3.*ldn_con + 8.*msr * ldn_con)
802 - (eldn + 2.*lapse_bh2*(9.+11.*msr)*lldn_cov%xsr_con) / 3.)
803 - 2.*lapse_bh2 % lapse_bh2 * msr / r_bh / r_bh
805 - lapse_bh2 * (12.+51.*msr+46.*msr*msr) * ln % xsr_con )
807 + 8.*
pow(lapse_bh2, 4.) * msr / r_bh / r_bh
808 % (lapse_ns - 1.) * (2.+10.*msr+9.*msr*msr) * xsr_con / 3.
809 + 2.*
pow(lapse_bh2, 3.) * msr / r_bh * (2.+3.*msr)
810 * ( (1.+2.*msr) * evtmp - (3.+2.*msr) * lvtmp * xsr_con) / 3. ;
819 for (
int i=0; i<3; i++) {
820 for (
int l=0; l<nz; l++) {
821 if (source_shift(i).get_etat() != ETATZERO)
842 double lambda_shift = double(1) / double(3) ;
844 double* intvec_shift =
new double[4*nylm] ;
845 for (
int i=0; i<3; i++) {
846 double* intvec =
new double[nylm];
849 for (
int j=0; j<nylm; j++) {
850 intvec_shift[i*nylm+j] = intvec[j] ;
852 if(shift_int[i*nylm] != -1.0) {
853 for (
int j=0; j<nylm; j++) {
854 intvec_shift[i*nylm+j] *= relax_ylm ;
855 intvec_shift[i*nylm+j] += (1.0 - relax_ylm)
856 * shift_int[i*nylm+j] ;
862 Cmp soscal (source_scal()) ;
863 double* intvec2 =
new double[nylm] ;
866 for (
int j=0; j<nylm; j++) {
867 intvec_shift[3*nylm+j] = intvec2[j] ;
869 if(shift_int[3*nylm] != -1.0) {
870 for (
int i=0; i<nylm; i++) {
871 intvec_shift[3*nylm+i] *= relax_ylm ;
872 intvec_shift[3*nylm+i] += (1.0 - relax_ylm)
873 *shift_int[3*nylm+i] ;
879 source_shift.poisson_vect_ylm(lambda_shift, par_poisson_vect,
883 for (
int i=0; i<4*nylm; i++) {
884 shift_int[i] = intvec_shift[i] ;
887 delete[] intvec_shift ;
903 for (
int i=0; i<3; i++) {
905 + lambda_shift * graddivn(i) ;
908 Tbl tdiff_shift_x =
diffrel(lap_shift(0), source_shift(0)) ;
909 Tbl tdiff_shift_y =
diffrel(lap_shift(1), source_shift(1)) ;
910 Tbl tdiff_shift_z =
diffrel(lap_shift(2), source_shift(2)) ;
912 cout <<
"Relative error in the resolution of the equation for " 913 <<
"shift_auto : " << endl ;
914 cout <<
"x component : " ;
915 for (
int l=0; l<nz; l++) {
916 cout << tdiff_shift_x(l) <<
" " ;
919 cout <<
"y component : " ;
920 for (
int l=0; l<nz; l++) {
921 cout << tdiff_shift_y(l) <<
" " ;
924 cout <<
"z component : " ;
925 for (
int l=0; l<nz; l++) {
926 cout << tdiff_shift_z(l) <<
" " ;
930 diff_shift_x =
max(
abs(tdiff_shift_x)) ;
931 diff_shift_y =
max(
abs(tdiff_shift_y)) ;
932 diff_shift_z =
max(
abs(tdiff_shift_z)) ;
949 diff_ent = diff_ent_tbl(0) ;
950 for (
int l=1; l<
nzet; l++) {
951 diff_ent += diff_ent_tbl(l) ;
957 for (
int i=0; i<nylm; i++) {
980 double relax_poisson,
1004 int l_b =
nzet - 1 ;
1005 int i_b = mg->
get_nr(l_b) - 1 ;
1015 double& diff_ent = diff.
set(0) ;
1016 double& diff_vel_pot = diff.
set(1) ;
1017 double& diff_logn = diff.
set(2) ;
1018 double& diff_beta = diff.
set(3) ;
1019 double& diff_shift_x = diff.
set(4) ;
1020 double& diff_shift_y = diff.
set(5) ;
1021 double& diff_shift_z = diff.
set(6) ;
1027 int nitermax = 100 ;
1029 int adapt_flag = 1 ;
1032 int nz_search =
nzet ;
1034 double precis_secant = 1.e-14 ;
1036 double reg_map = 1. ;
1040 par_adapt.
add_int(nitermax, 0) ;
1045 par_adapt.
add_int(nz_search, 2) ;
1047 par_adapt.
add_int(adapt_flag, 3) ;
1063 par_adapt.
add_tbl(ent_limit, 0) ;
1069 double precis_poisson = 1.e-16 ;
1071 Param par_poisson1 ;
1073 par_poisson1.
add_int(mermax_poisson, 0) ;
1083 Param par_poisson2 ;
1085 par_poisson2.
add_int(mermax_poisson, 0) ;
1095 Param par_poisson_vect ;
1097 par_poisson_vect.
add_int(mermax_poisson, 0) ;
1099 par_poisson_vect.
add_double(relax_poisson, 0) ;
1100 par_poisson_vect.
add_double(precis_poisson, 1) ;
1123 cout <<
"We don't have those ylm programmed yet!!!!" << endl ;
1127 int nylm = (l_max+1) * (l_max+1) ;
1129 Cmp** ylmvec =
new Cmp* [nylm] ;
1135 for(
int mer=0 ; mer<mermax ; mer++ ) {
1137 cout <<
"-----------------------------------------------" << endl ;
1138 cout <<
"step: " << mer << endl ;
1139 cout <<
"diff_ent = " << diff_ent << endl ;
1148 precis_poisson, relax_potvit) ;
1159 double logn_auto_c =
logn_auto()(0, 0, 0, 0) ;
1160 double pot_ext_c = pot_ext()(0, 0, 0, 0) ;
1166 double alpha_r2 = 0 ;
1167 for (
int k=0; k<mg->
get_np(l_b); k++) {
1168 for (
int j=0; j<mg->
get_nt(l_b); j++) {
1170 double pot_ext_b = pot_ext()(l_b, k, j, i_b) ;
1171 double logn_auto_b =
logn_auto()(l_b, k, j, i_b) ;
1174 double alpha_r2_jk = ( ent_c - ent_b + pot_ext_c - pot_ext_b)
1175 / ( logn_auto_b - logn_auto_c ) ;
1177 if (alpha_r2_jk > alpha_r2) {
1178 alpha_r2 = alpha_r2_jk ;
1186 alpha_r =
sqrt(alpha_r2) ;
1188 cout <<
"k_b, j_b, alpha_r: " << k_b <<
" " << j_b <<
" " 1189 << alpha_r << endl ;
1210 ent = (ent_c + logn_auto_c + pot_ext_c) -
logn_auto - pot_ext ;
1216 double dentdx =
ent().dsdx()(0, 0, 0, 0) ;
1217 double dentdy =
ent().dsdy()(0, 0, 0, 0) ;
1219 cout <<
"dH/dx|_center = " << dentdx << endl ;
1220 cout <<
"dH/dy|_center = " << dentdy << endl ;
1222 double dec_fact = 1. ;
1226 func_in.
set() = 1. - dec_fact * (dentdx/ent_c) *
mp.
x ;
1232 func_ex.
set() = 1. ;
1238 ent.
set() =
ent() * (func_in() + func_ex()) ;
1242 double dentdx_new =
ent().dsdx()(0, 0, 0, 0) ;
1244 cout <<
"dH/dx|_new = " << dentdx_new << endl ;
1253 double dent_eq =
ent().dsdr().val_point(
ray_eq_pi(),M_PI/2.,M_PI) ;
1254 double dent_pole =
ent().dsdr().val_point(
ray_pole(),0.,0.) ;
1255 double rap_dent = fabs( dent_eq / dent_pole ) ;
1256 cout <<
"| dH/dr_eq / dH/dr_pole | = " << rap_dent << endl ;
1258 if ( rap_dent < thres_adapt ) {
1260 cout <<
"******* FROZEN MAPPING *********" << endl ;
1268 for (
int l=0; l<
nzet; l++) {
1269 ent_limit.
set(l) =
ent()(l, k_b, j_b, i_b) ;
1272 ent_limit.
set(
nzet-1) = ent_b ;
1285 double fact_resize = 1. / alpha_r ;
1286 for (
int l=
nzet; l<nz-1; l++) {
1287 mp_et.
resize(l, fact_resize) ;
1291 double ent_s_max = -1 ;
1294 for (
int k=0; k<mg->
get_np(l_b); k++) {
1295 for (
int j=0; j<mg->
get_nt(l_b); j++) {
1296 double xx = fabs(
ent()(l_b, k, j, i_b) ) ;
1297 if (xx > ent_s_max) {
1304 cout <<
"Max. abs(enthalpy) at the boundary between domains nzet-1" 1305 <<
" and nzet : " << endl ;
1306 cout <<
" " << ent_s_max <<
" reached for k = " << k_s_max
1307 <<
" and j = " << j_s_max << endl ;
1316 for (
int l=0; l<=l_max; l++) {
1317 for (
int m=0; m<= l; m++) {
1319 int index = l*l + 2*m ;
1320 if(m > 0) index -= 1 ;
1321 if(index != oldindex+1) {
1322 cout <<
"error!! " << l <<
" " << m <<
" " << index
1323 <<
" " << oldindex << endl ;
1328 if ((l+m) % 2 == 0) {
1336 if((l+m) % 2 == 0) {
1345 if(oldindex+1 != nylm) {
1346 cout <<
"ERROR!!! " << oldindex <<
" "<< nylm << endl ;
1380 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
1385 xx_cov.
set(0) = xx + sepa ;
1386 xx_cov.
set(1) = yy ;
1387 xx_cov.
set(2) = zz ;
1391 msr = ggrav * mass / r_bh ;
1395 tmp = 1. / ( 1. - 0.25*msr*msr ) ;
1417 - 0.5 * tmp % msr % msr % xdnu / r_bh / r_bh
1418 - tmp % msr % xdbeta / r_bh / r_bh ;
1422 cout <<
"The computation of BH-NS binary systems" 1423 <<
" should be relativistic !!!" << endl ;
1432 double* intvec_logn =
new double[nylm] ;
1438 if(nu_int[0] != -1.0) {
1439 for (
int i=0; i<nylm; i++) {
1440 intvec_logn[i] *= relax_ylm ;
1441 intvec_logn[i] += (1.0 - relax_ylm) * nu_int[i] ;
1445 source().poisson_ylm(par_poisson1,
logn_auto.
set(), nylm,
1448 for (
int i=0; i<nylm; i++) {
1449 nu_int[i] = intvec_logn[i] ;
1452 delete [] intvec_logn ;
1465 "Relative error in the resolution of the equation for logn_auto : " 1468 for (
int l=0; l<nz; l++) {
1469 cout << tdiff_logn(l) <<
" " ;
1472 diff_logn =
max(
abs(tdiff_logn)) ;
1486 - tmp % msr % xdnu / r_bh / r_bh
1487 - 0.5 * tmp % msr %msr % xdbeta / r_bh / r_bh ;
1494 double* intvec_beta =
new double[nylm] ;
1499 if(beta_int[0] != -1.0) {
1500 for (
int i=0; i<nylm; i++) {
1501 intvec_beta[i] *= relax_ylm ;
1502 intvec_beta[i] += (1.0 - relax_ylm) * beta_int[i] ;
1507 nylm, intvec_beta) ;
1509 for (
int i=0; i<nylm; i++) {
1510 beta_int[i] = intvec_beta[i] ;
1513 delete [] intvec_beta ;
1520 cout <<
"Relative error in the resolution of the equation for " 1521 <<
"beta_auto : " << endl ;
1522 for (
int l=0; l<nz; l++) {
1523 cout << tdiff_beta(l) <<
" " ;
1526 diff_beta =
max(
abs(tdiff_beta)) ;
1537 bhtmp = tmp % msr % (3.*msr-8.) % xx_cov / r_bh / r_bh ;
1556 for (
int i=0; i<3; i++) {
1557 for (
int l=0; l<nz; l++) {
1558 if (source_shift(i).get_etat() != ETATZERO)
1579 double lambda_shift = double(1) / double(3) ;
1581 double* intvec_shift =
new double[4*nylm] ;
1582 for (
int i=0; i<3; i++) {
1583 double* intvec =
new double[nylm];
1586 for (
int j=0; j<nylm; j++) {
1587 intvec_shift[i*nylm+j] = intvec[j] ;
1589 if(shift_int[i*nylm] != -1.0) {
1590 for (
int j=0; j<nylm; j++) {
1591 intvec_shift[i*nylm+j] *= relax_ylm ;
1592 intvec_shift[i*nylm+j] += (1.0 - relax_ylm)
1593 * shift_int[i*nylm+j] ;
1599 Cmp soscal (source_scal()) ;
1600 double* intvec2 =
new double[nylm] ;
1603 for (
int j=0; j<nylm; j++) {
1604 intvec_shift[3*nylm+j] = intvec2[j] ;
1606 if(shift_int[3*nylm] != -1.0) {
1607 for (
int i=0; i<nylm; i++) {
1608 intvec_shift[3*nylm+i] *= relax_ylm ;
1609 intvec_shift[3*nylm+i] += (1.0 - relax_ylm)
1610 *shift_int[3*nylm+i] ;
1616 source_shift.poisson_vect_ylm(lambda_shift, par_poisson_vect,
1620 for (
int i=0; i<4*nylm; i++) {
1621 shift_int[i] = intvec_shift[i] ;
1624 delete[] intvec_shift ;
1640 for (
int i=0; i<3; i++) {
1642 + lambda_shift * graddivn(i) ;
1645 Tbl tdiff_shift_x =
diffrel(lap_shift(0), source_shift(0)) ;
1646 Tbl tdiff_shift_y =
diffrel(lap_shift(1), source_shift(1)) ;
1647 Tbl tdiff_shift_z =
diffrel(lap_shift(2), source_shift(2)) ;
1649 cout <<
"Relative error in the resolution of the equation for " 1650 <<
"shift_auto : " << endl ;
1651 cout <<
"x component : " ;
1652 for (
int l=0; l<nz; l++) {
1653 cout << tdiff_shift_x(l) <<
" " ;
1656 cout <<
"y component : " ;
1657 for (
int l=0; l<nz; l++) {
1658 cout << tdiff_shift_y(l) <<
" " ;
1661 cout <<
"z component : " ;
1662 for (
int l=0; l<nz; l++) {
1663 cout << tdiff_shift_z(l) <<
" " ;
1667 diff_shift_x =
max(
abs(tdiff_shift_x)) ;
1668 diff_shift_y =
max(
abs(tdiff_shift_y)) ;
1669 diff_shift_z =
max(
abs(tdiff_shift_z)) ;
1686 diff_ent = diff_ent_tbl(0) ;
1687 for (
int l=1; l<
nzet; l++) {
1688 diff_ent += diff_ent_tbl(l) ;
1694 for (
int i=0; i<nylm; i++) {
void add_tenseur_mod(Tenseur &ti, int position=0)
Adds the address of a new modifiable Tenseur to the list.
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
Radial mapping of rather general form.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Cmp sqrt(const Cmp &)
Square root.
void annule(int l)
Sets the Cmp to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Tenseur pot_centri
Centrifugal potential.
Cmp ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto by mea...
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star...
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)
Tenseur nnn
Total lapse function.
void get_integrals(int nylm, double *intvec, Cmp **ylmvec, Cmp source) const
Computes multipole moments.
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
Tenseur press
Fluid pressure.
bool kerrschild
Indicator of the background metric: true for the Kerr-Shild metric, false for the conformally flat on...
Tenseur d_beta_auto
Gradient of beta_auto (Cartesian components with respect to ref_triad )
void equil_bhns_extr_ylm_cf(double ent_c, const double &mass, const double &sepa, double *nu_int, double *beta_int, double *shift_int, int mermax, int mermax_poisson, double relax_poisson, double relax_ylm, int mermax_potvit, double relax_potvit, int np_filter, double thres_adapt, Tbl &diff)
Computes an equilibrium configuration of a BH-NS binary system in the conformally flat background met...
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
void equil_bhns_extr_ylm_ks(double ent_c, const double &mass, const double &sepa, double *nu_int, double *beta_int, double *shift_int, int mermax, int mermax_poisson, double relax_poisson, double relax_ylm, int mermax_potvit, double relax_potvit, int np_filter, double thres_adapt, Tbl &diff)
Computes an equilibrium configuration of a BH-NS binary system in the Kerr-Schild background metric u...
void hydro_euler_extr(const double &mass, const double &sepa)
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
bool irrotational
true for an irrotational star, false for a corotating one
void get_ylm(int nylm, Cmp **ylmvec) const
Constructs spherical harmonics.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata's prescription [Prog...
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tenseur flat_scalar_prod_desal(const Tenseur &t1, const Tenseur &t2)
Same as flat_scalar_prod but with desaliasing.
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
double velocity_pot_extr(const double &mass, const double &sepa, int mermax, double precis, double relax)
Computes the non-translational part of the velocity scalar potential by solving the continuity equat...
Tenseur skxk(const Tenseur &)
Contraction of the last index of (*this) with or , depending on the type of S .
Tenseur d_logn_auto
Gradient of logn_auto (Cartesian components with respect to ref_triad )
virtual void resize(int l, double lambda)
Rescales the outer boundary of one domain.
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
virtual void homothetie(double lambda)
Sets a new radial scale.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Tenseur khi_shift
Scalar used in the decomposition of shift_auto , following Shibata's prescription [Prog...
Cmp pow(const Cmp &, int)
Power .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Active physical coordinates and mapping derivatives.
int nzet
Number of domains of *mp occupied by the star.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tenseur a_car
Total conformal factor .
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one. ...
double ray_pole() const
Coordinate radius at [r_unit].
Cmp ssjm1_beta
Effective source at the previous step for the resolution of the Poisson equation for beta_auto by mea...
virtual void reevaluate_symy(const Map *mp_prev, int nzet, Cmp &uu) const =0
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Tenseur loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Coord y
y coordinate centered on the grid
Cmp abs(const Cmp &)
Absolute value.
virtual void reevaluate(const Map *mp_prev, int nzet, Cmp &uu) const =0
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
void resize_extr(double lambda)
Rescales the outer boundary of the outermost domain in the case of non-compactified external domain...
Coord x
x coordinate centered on the grid
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Tenseur ener_euler
Total energy density in the Eulerian frame.
Coord z
z coordinate centered on the grid
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Cmp ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Tenseur ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for by means...