29char et_bin_bhns_extr_equil_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_equil.C,v 1.11 2014/10/13 08:52:54 j_novak Exp $" ;
77#include "et_bin_bhns_extr.h"
84#include "utilitaires.h"
89 const double& sepa,
int mermax,
93 double relax_potvit,
int np_filter,
114 int i_b = mg->
get_nr(l_b) - 1 ;
124 double& diff_ent = diff.
set(0) ;
125 double& diff_vel_pot = diff.
set(1) ;
126 double& diff_logn = diff.
set(2) ;
127 double& diff_beta = diff.
set(3) ;
128 double& diff_shift_x = diff.
set(4) ;
129 double& diff_shift_y = diff.
set(5) ;
130 double& diff_shift_z = diff.
set(6) ;
141 int nz_search =
nzet ;
143 double precis_secant = 1.e-14 ;
145 double reg_map = 1. ;
149 par_adapt.
add_int(nitermax, 0) ;
154 par_adapt.
add_int(nz_search, 2) ;
156 par_adapt.
add_int(adapt_flag, 3) ;
172 par_adapt.
add_tbl(ent_limit, 0) ;
178 double precis_poisson = 1.e-16 ;
182 par_poisson1.
add_int(mermax_poisson, 0) ;
194 par_poisson2.
add_int(mermax_poisson, 0) ;
204 Param par_poisson_vect ;
206 par_poisson_vect.
add_int(mermax_poisson, 0) ;
208 par_poisson_vect.
add_double(relax_poisson, 0) ;
209 par_poisson_vect.
add_double(precis_poisson, 1) ;
232 for(
int mer=0 ; mer<mermax ; mer++ ) {
234 cout <<
"-----------------------------------------------" << endl ;
235 cout <<
"step: " << mer << endl ;
236 cout <<
"diff_ent = " << diff_ent << endl ;
245 precis_poisson, relax_potvit) ;
256 double logn_auto_c =
logn_auto()(0, 0, 0, 0) ;
257 double pot_ext_c = pot_ext()(0, 0, 0, 0) ;
263 double alpha_r2 = 0 ;
264 for (
int k=0; k<mg->
get_np(l_b); k++) {
265 for (
int j=0; j<mg->
get_nt(l_b); j++) {
267 double pot_ext_b = pot_ext()(l_b, k, j, i_b) ;
268 double logn_auto_b =
logn_auto()(l_b, k, j, i_b) ;
271 double alpha_r2_jk = ( ent_c - ent_b + pot_ext_c - pot_ext_b)
272 / ( logn_auto_b - logn_auto_c ) ;
274 if (alpha_r2_jk > alpha_r2) {
275 alpha_r2 = alpha_r2_jk ;
283 alpha_r =
sqrt(alpha_r2) ;
285 cout <<
"k_b, j_b, alpha_r: " << k_b <<
" " << j_b <<
" "
307 ent = (ent_c + logn_auto_c + pot_ext_c) -
logn_auto - pot_ext ;
314 double dentdx =
ent().dsdx()(0, 0, 0, 0) ;
315 double dentdy =
ent().dsdy()(0, 0, 0, 0) ;
317 cout <<
"dH/dx|_center = " << dentdx << endl ;
318 cout <<
"dH/dy|_center = " << dentdy << endl ;
320 double dec_fact = 1. ;
324 func_in.
set() = 1. - dec_fact * (dentdx/ent_c) *
mp.
x
325 - dec_fact * (dentdy/ent_c) *
mp.
y ;
337 ent.
set() =
ent() * (func_in() + func_ex()) ;
341 double dentdx_new =
ent().dsdx()(0, 0, 0, 0) ;
342 double dentdy_new =
ent().dsdy()(0, 0, 0, 0) ;
343 cout <<
"dH/dx|_new = " << dentdx_new << endl ;
344 cout <<
"dH/dy|_new = " << dentdy_new << endl ;
353 double dent_eq =
ent().dsdr().val_point(
ray_eq_pi(),M_PI/2.,M_PI) ;
354 double dent_pole =
ent().dsdr().val_point(
ray_pole(),0.,0.) ;
355 double rap_dent = fabs( dent_eq / dent_pole ) ;
356 cout <<
"| dH/dr_eq / dH/dr_pole | = " << rap_dent << endl ;
358 if ( rap_dent < thres_adapt ) {
360 cout <<
"******* FROZEN MAPPING *********" << endl ;
368 for (
int l=0; l<
nzet; l++) {
369 ent_limit.
set(l) =
ent()(l, k_b, j_b, i_b) ;
372 ent_limit.
set(
nzet-1) = ent_b ;
385 double fact_resize = 1. / alpha_r ;
386 for (
int l=
nzet; l<nz-1; l++) {
387 mp_et.
resize(l, fact_resize) ;
391 double ent_s_max = -1 ;
394 for (
int k=0; k<mg->
get_np(l_b); k++) {
395 for (
int j=0; j<mg->
get_nt(l_b); j++) {
396 double xx = fabs(
ent()(l_b, k, j, i_b) ) ;
397 if (xx > ent_s_max) {
404 cout <<
"Max. abs(enthalpy) at the boundary between domains nzet-1"
405 <<
" and nzet : " << endl ;
406 cout <<
" " << ent_s_max <<
" reached for k = " << k_s_max
407 <<
" and j = " << j_s_max << endl ;
435 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
440 xx_cov.
set(0) = xx + sepa ;
446 xsr_cov = xx_cov / r_bh ;
450 msr = ggrav * mass / r_bh ;
454 lapse_bh = 1. /
sqrt( 1.+2.*msr ) ;
458 lapse_bh2 = 1. / (1.+2.*msr) ;
474 for (
int i=0; i<3; i++)
475 for (
int j=0; j<3; j++)
476 lltkij.
set() += xsr_cov(i) * xsr_cov(j) *
tkij_auto(i, j) ;
509 + 2.*lapse_bh2 % msr % (ldnu % ldbeta + ldldnu)
510 + lapse_bh2 % lapse_bh2 % msr % (2.*(ldnu + 4.*msr % ldnu)
512 - (4.*
a_car % lapse_bh2 % lapse_bh2 % msr / 3. /
nnn / r_bh)
513 * (2.+3.*msr) * (3.+4.*msr) * lltkij
514 + (2.*
a_car % lapse_bh2 % lapse_bh2 % lapse_bh % msr
515 /
nnn / r_bh / r_bh) * (2.+10.*msr+9.*msr%msr) * lshift
516 + (4.*
pow(lapse_bh2, 3.) % msr % msr / 3. / r_bh / r_bh)
519 - 3.*(
a_car%lapse_bh/
nnn - 1.)*(2.+10.*msr+9.*msr%msr)) ;
523 cout <<
"The computation of BH-NS binary systems"
524 <<
" should be relativistic !!!" << endl ;
535 source().poisson_falloff(par_poisson1,
logn_auto.
set(), k_falloff) ;
548 "Relative error in the resolution of the equation for logn_auto : "
551 for (
int l=0; l<nz; l++) {
552 cout << tdiff_logn(l) <<
" " ;
555 diff_logn =
max(
abs(tdiff_logn)) ;
569 + lapse_bh2 % msr % (ldnu%ldnu + ldbeta%ldbeta + 2.*ldldbeta)
570 + lapse_bh2 % lapse_bh2 % msr % (2.*(1.+4.*msr) * ldbeta
572 - (
a_car % lapse_bh2 % lapse_bh2 % msr /
nnn / r_bh)
573 * (2.+3.*msr) * (3.+4.*msr) * lltkij
574 + (2.*
a_car % lapse_bh2 % lapse_bh2 % lapse_bh % msr
575 /
nnn / r_bh / r_bh) * (2.+10.*msr+9.*msr%msr) * lshift
576 + (2.*
pow(lapse_bh2, 3.) % msr % msr / r_bh / r_bh)
579 - 2.*(
a_car%lapse_bh/
nnn - 1.)*(2.+10.*msr+9.*msr%msr)) ;
594 cout <<
"Relative error in the resolution of the equation for "
595 <<
"beta_auto : " << endl ;
596 for (
int l=0; l<nz; l++) {
597 cout << tdiff_beta(l) <<
" " ;
600 diff_beta =
max(
abs(tdiff_beta)) ;
611 xx_con.
set(0) = xx + sepa ;
617 xsr_con = xx_con / r_bh ;
659 eldn.
set(0) = ldn_cov(0) ;
660 eldn.
set(1) = ldn_cov(1) ;
661 eldn.
set(2) = ldn_cov(2) ;
665 Tenseur ldivn = xsr_con % divn ;
686 evtmp.
set(0) = vtmp(0) ;
687 evtmp.
set(1) = vtmp(1) ;
688 evtmp.
set(2) = vtmp(2) ;
702 - 2.*
nnn % lapse_bh2 * msr / r_bh
704 + 2.*lapse_bh2 * msr * (3.*ldldn + ldldivn) / 3.
705 - lapse_bh2 * msr / r_bh
706 * (4.*ldivn - lapse_bh2 % (3.*ldn_con + 8.*msr * ldn_con)
707 - (eldn + 2.*lapse_bh2*(9.+11.*msr)*lldn_cov%xsr_con) / 3.)
708 - 2.*lapse_bh2 % lapse_bh2 * msr / r_bh / r_bh
710 - lapse_bh2 * (12.+51.*msr+46.*msr*msr) * ln % xsr_con )
712 + 8.*
pow(lapse_bh2, 4.) * msr / r_bh / r_bh
713 % (lapse_ns - 1.) * (2.+10.*msr+9.*msr*msr) * xsr_con / 3.
714 + 2.*
pow(lapse_bh2, 3.) * msr / r_bh * (2.+3.*msr)
715 * ( (1.+2.*msr) * evtmp - (3.+2.*msr) * lvtmp * xsr_con) / 3. ;
724 for (
int i=0; i<3; i++) {
725 for (
int l=0; l<nz; l++) {
726 if (source_shift(i).
get_etat() != ETATZERO)
747 double lambda_shift = double(1) / double(3) ;
750 shift_falloff =
new int[4] ;
751 shift_falloff[0] = 1 ;
752 shift_falloff[1] = 1 ;
753 shift_falloff[2] = 2 ;
754 shift_falloff[3] = 1 ;
756 source_shift.poisson_vect_falloff(lambda_shift, par_poisson_vect,
760 delete[] shift_falloff ;
776 for (
int i=0; i<3; i++) {
778 + lambda_shift * graddivn(i) ;
781 Tbl tdiff_shift_x =
diffrel(lap_shift(0), source_shift(0)) ;
782 Tbl tdiff_shift_y =
diffrel(lap_shift(1), source_shift(1)) ;
783 Tbl tdiff_shift_z =
diffrel(lap_shift(2), source_shift(2)) ;
785 cout <<
"Relative error in the resolution of the equation for "
786 <<
"shift_auto : " << endl ;
787 cout <<
"x component : " ;
788 for (
int l=0; l<nz; l++) {
789 cout << tdiff_shift_x(l) <<
" " ;
792 cout <<
"y component : " ;
793 for (
int l=0; l<nz; l++) {
794 cout << tdiff_shift_y(l) <<
" " ;
797 cout <<
"z component : " ;
798 for (
int l=0; l<nz; l++) {
799 cout << tdiff_shift_z(l) <<
" " ;
803 diff_shift_x =
max(
abs(tdiff_shift_x)) ;
804 diff_shift_y =
max(
abs(tdiff_shift_y)) ;
805 diff_shift_z =
max(
abs(tdiff_shift_z)) ;
822 diff_ent = diff_ent_tbl(0) ;
823 for (
int l=1; l<
nzet; l++) {
824 diff_ent += diff_ent_tbl(l) ;
840 const double& sepa,
int mermax,
842 double relax_poisson,
844 double relax_potvit,
int np_filter,
865 int i_b = mg->
get_nr(l_b) - 1 ;
875 double& diff_ent = diff.
set(0) ;
876 double& diff_vel_pot = diff.
set(1) ;
877 double& diff_logn = diff.
set(2) ;
878 double& diff_beta = diff.
set(3) ;
879 double& diff_shift_x = diff.
set(4) ;
880 double& diff_shift_y = diff.
set(5) ;
881 double& diff_shift_z = diff.
set(6) ;
892 int nz_search =
nzet ;
894 double precis_secant = 1.e-14 ;
896 double reg_map = 1. ;
900 par_adapt.
add_int(nitermax, 0) ;
905 par_adapt.
add_int(nz_search, 2) ;
907 par_adapt.
add_int(adapt_flag, 3) ;
923 par_adapt.
add_tbl(ent_limit, 0) ;
929 double precis_poisson = 1.e-16 ;
933 par_poisson1.
add_int(mermax_poisson, 0) ;
945 par_poisson2.
add_int(mermax_poisson, 0) ;
955 Param par_poisson_vect ;
957 par_poisson_vect.
add_int(mermax_poisson, 0) ;
959 par_poisson_vect.
add_double(relax_poisson, 0) ;
960 par_poisson_vect.
add_double(precis_poisson, 1) ;
983 for(
int mer=0 ; mer<mermax ; mer++ ) {
985 cout <<
"-----------------------------------------------" << endl ;
986 cout <<
"step: " << mer << endl ;
987 cout <<
"diff_ent = " << diff_ent << endl ;
996 precis_poisson, relax_potvit) ;
1007 double logn_auto_c =
logn_auto()(0, 0, 0, 0) ;
1008 double pot_ext_c = pot_ext()(0, 0, 0, 0) ;
1014 double alpha_r2 = 0 ;
1015 for (
int k=0; k<mg->
get_np(l_b); k++) {
1016 for (
int j=0; j<mg->
get_nt(l_b); j++) {
1018 double pot_ext_b = pot_ext()(l_b, k, j, i_b) ;
1019 double logn_auto_b =
logn_auto()(l_b, k, j, i_b) ;
1022 double alpha_r2_jk = ( ent_c - ent_b + pot_ext_c - pot_ext_b)
1023 / ( logn_auto_b - logn_auto_c ) ;
1025 if (alpha_r2_jk > alpha_r2) {
1026 alpha_r2 = alpha_r2_jk ;
1034 alpha_r =
sqrt(alpha_r2) ;
1036 cout <<
"k_b, j_b, alpha_r: " << k_b <<
" " << j_b <<
" "
1037 << alpha_r << endl ;
1058 ent = (ent_c + logn_auto_c + pot_ext_c) -
logn_auto - pot_ext ;
1064 double dentdx =
ent().dsdx()(0, 0, 0, 0) ;
1065 double dentdy =
ent().dsdy()(0, 0, 0, 0) ;
1067 cout <<
"dH/dx|_center = " << dentdx << endl ;
1068 cout <<
"dH/dy|_center = " << dentdy << endl ;
1070 double dec_fact = 1. ;
1074 func_in.
set() = 1. - dec_fact * (dentdx/ent_c) *
mp.
x ;
1080 func_ex.
set() = 1. ;
1086 ent.
set() =
ent() * (func_in() + func_ex()) ;
1090 double dentdx_new =
ent().dsdx()(0, 0, 0, 0) ;
1092 cout <<
"dH/dx|_new = " << dentdx_new << endl ;
1101 double dent_eq =
ent().dsdr().val_point(
ray_eq_pi(),M_PI/2.,M_PI) ;
1102 double dent_pole =
ent().dsdr().val_point(
ray_pole(),0.,0.) ;
1103 double rap_dent = fabs( dent_eq / dent_pole ) ;
1104 cout <<
"| dH/dr_eq / dH/dr_pole | = " << rap_dent << endl ;
1106 if ( rap_dent < thres_adapt ) {
1108 cout <<
"******* FROZEN MAPPING *********" << endl ;
1116 for (
int l=0; l<
nzet; l++) {
1117 ent_limit.
set(l) =
ent()(l, k_b, j_b, i_b) ;
1120 ent_limit.
set(
nzet-1) = ent_b ;
1133 double fact_resize = 1. / alpha_r ;
1134 for (
int l=
nzet; l<nz-1; l++) {
1135 mp_et.
resize(l, fact_resize) ;
1139 double ent_s_max = -1 ;
1142 for (
int k=0; k<mg->
get_np(l_b); k++) {
1143 for (
int j=0; j<mg->
get_nt(l_b); j++) {
1144 double xx = fabs(
ent()(l_b, k, j, i_b) ) ;
1145 if (xx > ent_s_max) {
1152 cout <<
"Max. abs(enthalpy) at the boundary between domains nzet-1"
1153 <<
" and nzet : " << endl ;
1154 cout <<
" " << ent_s_max <<
" reached for k = " << k_s_max
1155 <<
" and j = " << j_s_max << endl ;
1183 r_bh.
set() =
pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
1188 xx_cov.
set(0) = xx + sepa ;
1189 xx_cov.
set(1) = yy ;
1190 xx_cov.
set(2) = zz ;
1194 msr = ggrav * mass / r_bh ;
1198 tmp = 1. / ( 1. - 0.25*msr*msr ) ;
1220 - 0.5 * tmp % msr % msr % xdnu / r_bh / r_bh
1221 - tmp % msr % xdbeta / r_bh / r_bh ;
1225 cout <<
"The computation of BH-NS binary systems"
1226 <<
" should be relativistic !!!" << endl ;
1237 source().poisson_falloff(par_poisson1,
logn_auto.
set(), k_falloff) ;
1250 "Relative error in the resolution of the equation for logn_auto : "
1253 for (
int l=0; l<nz; l++) {
1254 cout << tdiff_logn(l) <<
" " ;
1257 diff_logn =
max(
abs(tdiff_logn)) ;
1271 - tmp % msr % xdnu / r_bh / r_bh
1272 - 0.5 * tmp % msr %msr % xdbeta / r_bh / r_bh ;
1279 source().poisson_falloff(par_poisson2,
beta_auto.
set(),
1287 cout <<
"Relative error in the resolution of the equation for "
1288 <<
"beta_auto : " << endl ;
1289 for (
int l=0; l<nz; l++) {
1290 cout << tdiff_beta(l) <<
" " ;
1293 diff_beta =
max(
abs(tdiff_beta)) ;
1304 bhtmp = tmp % msr % (3.*msr-8.) % xx_cov / r_bh / r_bh ;
1323 for (
int i=0; i<3; i++) {
1324 for (
int l=0; l<nz; l++) {
1325 if (source_shift(i).get_etat() != ETATZERO)
1346 double lambda_shift = double(1) / double(3) ;
1348 int* shift_falloff ;
1349 shift_falloff =
new int[4] ;
1350 shift_falloff[0] = 1 ;
1351 shift_falloff[1] = 1 ;
1352 shift_falloff[2] = 2 ;
1353 shift_falloff[3] = 1 ;
1355 source_shift.poisson_vect_falloff(lambda_shift, par_poisson_vect,
1359 delete[] shift_falloff ;
1375 for (
int i=0; i<3; i++) {
1377 + lambda_shift * graddivn(i) ;
1380 Tbl tdiff_shift_x =
diffrel(lap_shift(0), source_shift(0)) ;
1381 Tbl tdiff_shift_y =
diffrel(lap_shift(1), source_shift(1)) ;
1382 Tbl tdiff_shift_z =
diffrel(lap_shift(2), source_shift(2)) ;
1384 cout <<
"Relative error in the resolution of the equation for "
1385 <<
"shift_auto : " << endl ;
1386 cout <<
"x component : " ;
1387 for (
int l=0; l<nz; l++) {
1388 cout << tdiff_shift_x(l) <<
" " ;
1391 cout <<
"y component : " ;
1392 for (
int l=0; l<nz; l++) {
1393 cout << tdiff_shift_y(l) <<
" " ;
1396 cout <<
"z component : " ;
1397 for (
int l=0; l<nz; l++) {
1398 cout << tdiff_shift_z(l) <<
" " ;
1402 diff_shift_x =
max(
abs(tdiff_shift_x)) ;
1403 diff_shift_y =
max(
abs(tdiff_shift_y)) ;
1404 diff_shift_z =
max(
abs(tdiff_shift_z)) ;
1421 diff_ent = diff_ent_tbl(0) ;
1422 for (
int l=1; l<
nzet; l++) {
1423 diff_ent += diff_ent_tbl(l) ;
void filtre_phi(int n, int zone)
Sets the n lasts coefficients in to 0 in the domain zone .
void annule(int l)
Sets the Cmp to zero in a given domain.
Active physical coordinates and mapping derivatives.
void equil_bhns_extr_ks(double ent_c, const double &mass, const double &sepa, int mermax, int mermax_poisson, double relax_poisson, 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...
bool kerrschild
Indicator of the background metric: true for the Kerr-Shild metric, false for the conformally flat on...
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...
void equil_bhns_extr_cf(double ent_c, const double &mass, const double &sepa, int mermax, int mermax_poisson, double relax_poisson, 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 hydro_euler_extr(const double &mass, const double &sepa)
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Tenseur d_beta_auto
Gradient of beta_auto (Cartesian components with respect to ref_triad )
Tenseur d_logn_auto
Gradient of logn_auto (Cartesian components with respect to ref_triad )
Cmp ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
bool irrotational
true for an irrotational star, false for a corotating one
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata's prescription [Prog.
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
Tenseur ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for by means...
Cmp ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto by mea...
Tenseur pot_centri
Centrifugal potential.
Tenseur loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Cmp ssjm1_beta
Effective source at the previous step for the resolution of the Poisson equation for beta_auto by mea...
Tenseur khi_shift
Scalar used in the decomposition of shift_auto , following Shibata's prescription [Prog.
int nzet
Number of domains of *mp occupied by the star.
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Tenseur nnn
Total lapse function.
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Map & mp
Mapping associated with the star.
Tenseur press
Fluid pressure.
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Tenseur ener_euler
Total energy density in the Eulerian frame.
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Tenseur a_car
Total conformal factor .
double ray_pole() const
Coordinate radius at [r_unit].
Radial mapping of rather general form.
void resize_extr(double lambda)
Rescales the outer boundary of the outermost domain in the case of non-compactified external domain.
virtual void homothetie(double lambda)
Sets a new radial scale.
virtual void resize(int l, double lambda)
Rescales the outer boundary of one domain.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Coord y
y coordinate centered on the grid
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.
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.
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
Coord z
z coordinate centered on the grid
Coord x
x coordinate centered on the grid
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.
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
void add_tenseur_mod(Tenseur &ti, int position=0)
Adds the address of a new modifiable Tenseur to the list.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
double & set(int i)
Read/write of a particular element (index i) (1D case)
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 Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
void set_std_base()
Set the standard spectal basis of decomposition for each component.
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
int get_etat() const
Returns the logical state.
Cmp sqrt(const Cmp &)
Square root.
Cmp exp(const Cmp &)
Exponential.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp pow(const Cmp &, int)
Power .
Cmp abs(const Cmp &)
Absolute value.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Tenseur flat_scalar_prod_desal(const Tenseur &t1, const Tenseur &t2)
Same as flat_scalar_prod but with desaliasing.
Standard units of space, time and mass.