76 #include "et_rot_mag.h" 77 #include "utilitaires.h" 91 const Eos& eos_i,
bool magnetisation,
94 use_B_in_eos(B_eos), include_magnetisation(magnetisation),
97 J_I(mp_i, COV, mp_i.get_bvect_spher()),
98 Sij_I(mp_i, COV, mp_i.get_bvect_spher())
101 if (tmp_p_eos == 0x0) {
102 cerr <<
"Et_magnetisation::Et_magnetisation : " << endl ;
103 cerr <<
"Only magnetised EoS is admitted for this class!" << endl ;
104 cerr <<
"Aborting ... " << endl ;
108 cerr <<
"Et_magnetisation::Et_magnetisation : " << endl ;
109 cerr <<
"Magnetisation terms can be included only if " 110 <<
"the magnetic field is used in the EoS!" << endl;
111 cerr <<
"Aborting ... " << endl ;
125 use_B_in_eos(true), include_magnetisation(true),
128 J_I(mp_i, COV, mp_i.get_bvect_spher()),
129 Sij_I(mp_i, COV, mp_i.get_bvect_spher())
159 use_B_in_eos(et.use_B_in_eos), include_magnetisation(et.include_magnetisation),
195 assert (mageos != 0x0) ;
200 double epsilon = 1.e-12 ;
207 for (
int l=0; l<nz; l++) {
209 for (
int k=0; k<mg->
get_np(l); k++) {
210 for (
int j=0; j<mg->
get_nt(l); j++) {
211 for (
int i=0; i<mg->
get_nr(l); i++) {
222 fact_ent.
set(0) = 1 + epsilon * xi(0) * xi(0) ;
223 fact_ent.
set(1) = 1 - 0.25 * epsilon * (xi(1) - 1) * (xi(1) - 1) ;
225 for (
int l=
nzet; l<nz; l++) {
226 fact_ent.
set(l) = 1 ;
232 fact_ent.
set(1) = 1 - 0.5 * epsilon * (xi(1) - 0.5) * (xi(1) - 0.5) ;
233 fact_ent.
set(2) = 1 - 0.25 * epsilon * (xi(2) - 1) * (xi(2) - 1) ;
237 cerr <<
"Et_magnetisation::equation_of_state: " 238 <<
"not ready yet for nzet > 3 !" << endl ;
241 ent_eos = fact_ent * ent_eos ;
255 norm_b =
sqrt(
a_car() * ( Bmag(0)*Bmag(0) + Bmag(1)*Bmag(1) ))
270 for (
int l=0; l< nz; l++) {
271 Tbl* tent = ent_eos.
va.
c->
t[l] ;
283 for (
int k=0; k < mg->
get_np(l); k++) {
284 for (
int j=0; j < mg->
get_nt(l); j++) {
285 for (
int i=0; i < mg->
get_nr(l); i++) {
286 magb0 = norm_b(l, k, j, i) ;
287 double ent0 = ent_eos(l, k, j, i) ;
351 ost <<
"Rotating magnetized neutron star" 354 ost <<
"Using magnetic field in the EoS" << endl ;
356 ost <<
"Including magnetisation terms in the equations" << endl ;
357 ost <<
"Maximal value of the magnetization scalar x : " 371 double fact_omega,
int nzadapt,
const Tbl& ent_limit,
372 const Itbl& icontrol,
const Tbl& control,
double mbar_wanted,
373 double magmom_wanted,
374 double aexp_mass,
Tbl& diff,
double Q0,
double a_j0,
375 Cmp (*f_j)(
const Cmp&,
const double),
376 Cmp (*M_j)(
const Cmp& x,
const double)) {
384 char display_bold[]=
"x[1m" ; display_bold[0] = 27 ;
385 char display_normal[] =
"x[0m" ; display_normal[0] = 27 ;
400 int i_b = mg->
get_nr(l_b) - 1 ;
401 int j_b = mg->
get_nt(l_b) - 1 ;
405 double ent_b = ent_limit(
nzet-1) ;
410 int mer_max = icontrol(0) ;
411 int mer_rot = icontrol(1) ;
412 int mer_change_omega = icontrol(2) ;
413 int mer_fix_omega = icontrol(3) ;
414 int mer_mass = icontrol(4) ;
415 int mermax_poisson = icontrol(5) ;
416 int delta_mer_kep = icontrol(6) ;
417 int mer_mag = icontrol(7) ;
418 int mer_change_mag = icontrol(8) ;
419 int mer_fix_mag = icontrol(9) ;
420 int mer_magmom = icontrol(10) ;
423 if (mer_change_omega < mer_rot) {
424 cerr <<
"Et_magnetisation::equilibrium_mag: mer_change_omega < mer_rot !" 426 cerr <<
" mer_change_omega = " << mer_change_omega << endl ;
427 cerr <<
" mer_rot = " << mer_rot << endl ;
430 if (mer_fix_omega < mer_change_omega) {
431 cerr <<
"Et_magnetisation::equilibrium_mag: mer_fix_omega < mer_change_omega !" 433 cerr <<
" mer_fix_omega = " << mer_fix_omega << endl ;
434 cerr <<
" mer_change_omega = " << mer_change_omega << endl ;
440 bool change_ent = true ;
443 mer_mass =
abs(mer_mass) ;
446 double precis = control(0) ;
447 double omega_ini = control(1) ;
448 double relax = control(2) ;
449 double relax_prev = double(1) - relax ;
450 double relax_poisson = control(3) ;
451 double thres_adapt = control(4) ;
452 double precis_adapt = control(5) ;
453 double Q_ini = control(6) ;
454 double a_j_ini = control (7) ;
460 double& diff_ent = diff.
set(0) ;
471 int nz_search =
nzet + 1 ;
474 double reg_map = 1. ;
476 par_adapt.
add_int(nitermax, 0) ;
478 par_adapt.
add_int(nzadapt, 1) ;
481 par_adapt.
add_int(nz_search, 2) ;
483 par_adapt.
add_int(adapt_flag, 3) ;
503 par_adapt.
add_tbl(ent_limit, 0) ;
510 double precis_poisson = 1.e-16 ;
512 Param par_poisson_nuf ;
513 par_poisson_nuf.
add_int(mermax_poisson, 0) ;
514 par_poisson_nuf.
add_double(relax_poisson, 0) ;
515 par_poisson_nuf.
add_double(precis_poisson, 1) ;
519 Param par_poisson_nuq ;
520 par_poisson_nuq.
add_int(mermax_poisson, 0) ;
521 par_poisson_nuq.
add_double(relax_poisson, 0) ;
522 par_poisson_nuq.
add_double(precis_poisson, 1) ;
526 Param par_poisson_tggg ;
527 par_poisson_tggg.
add_int(mermax_poisson, 0) ;
528 par_poisson_tggg.
add_double(relax_poisson, 0) ;
529 par_poisson_tggg.
add_double(precis_poisson, 1) ;
535 Param par_poisson_dzeta ;
542 Param par_poisson_vect ;
544 par_poisson_vect.
add_int(mermax_poisson, 0) ;
545 par_poisson_vect.
add_double(relax_poisson, 0) ;
546 par_poisson_vect.
add_double(precis_poisson, 1) ;
554 Param par_poisson_At ;
557 par_poisson_At.
add_int(mermax_poisson, 0) ;
559 par_poisson_At.
add_double(precis_poisson, 1) ;
563 Param par_poisson_Avect ;
568 par_poisson_Avect.
add_int(mermax_poisson, 0) ;
569 par_poisson_Avect.
add_double(relax_poisson, 0) ;
570 par_poisson_Avect.
add_double(precis_poisson, 1) ;
583 double accrois_omega = (omega0 - omega_ini)
584 /
double(mer_fix_omega - mer_change_omega) ;
585 double accrois_Q = (Q0 - Q_ini)
586 /
double(mer_fix_mag - mer_change_mag);
587 double accrois_a_j = (a_j0 - a_j_ini)
588 /
double(mer_fix_mag - mer_change_mag);
639 ofstream fichconv(
"convergence.d") ;
640 fichconv <<
"# diff_ent GRV2 " << endl ;
642 ofstream fichfreq(
"frequency.d") ;
643 fichfreq <<
"# f [Hz]" << endl ;
645 ofstream fichevol(
"evolution.d") ;
647 "# |dH/dr_eq/dH/dr_pole| r_pole/r_eq ent_c" 651 double err_grv2 = 1 ;
657 for(
int mer=0 ; (diff_ent > precis) && (mer<mer_max) ; mer++ ) {
659 cout <<
"-----------------------------------------------" << endl ;
660 cout <<
"step: " << mer << endl ;
661 cout <<
"diff_ent = " << display_bold << diff_ent << display_normal
663 cout <<
"err_grv2 = " << err_grv2 << endl ;
668 if (mer >= mer_rot) {
670 if (mer < mer_change_omega) {
674 if (mer <= mer_fix_omega) {
675 omega = omega_ini + accrois_omega *
676 (mer - mer_change_omega) ;
682 if (mer >= mer_mag) {
683 if (mer < mer_change_mag) {
688 if (mer <= mer_fix_mag) {
689 Q = Q_ini + accrois_Q * (mer - mer_change_mag) ;
690 a_j = a_j_ini + accrois_a_j * (mer - mer_change_mag) ;
698 magnet_comput(adapt_flag, f_j, par_poisson_At, par_poisson_Avect) ;
704 SrrplusStt = SrrplusStt /
a_car ;
731 source_nuf = qpig *
nbar ;
740 source_dzf = 2 * qpig *
a_car 753 * ( 2*
press + SrrplusStt ) ;
756 (source_tggg.
set()).mult_rsint() ;
775 mtmp.set_etat_qcq() ;
791 for (
int i=0; i<3; i++) {
792 source_shift.set(i) += squad(i) ;
795 if (mtmp.get_etat() == ETATQCQ) {
796 if (source_shift.get_etat() == ETATZERO) {
797 source_shift.set_etat_qcq() ;
798 for (
int i=0; i<3; i++) {
799 source_shift.set(i) = mtmp(i) ;
800 source_shift.set(i).va.coef_i() ;
804 for (
int i=0; i<3; i++)
805 source_shift.set(i) += mtmp(i) ;
808 source_shift.set_std_base() ;
814 source_nuf().poisson(par_poisson_nuf,
nuf.
set()) ;
822 source_nuq().poisson(par_poisson_nuq,
nuq.
set()) ;
829 if (source_shift.get_etat() != ETATZERO) {
831 for (
int i=0; i<3; i++) {
832 if(source_shift(i).dz_nonzero()) {
833 assert( source_shift(i).get_dzpuis() == 4 ) ;
836 (source_shift.set(i)).set_dzpuis(4) ;
844 double lambda_shift = double(1) / double(3) ;
846 if ( mg->
get_np(0) == 1 ) {
850 source_shift.poisson_vect(lambda_shift, par_poisson_vect,
865 if (mer > mer_fix_omega + delta_mer_kep) {
867 omega *= fact_omega ;
870 bool omega_trop_grand = false ;
877 bool superlum = true ;
893 ((
uuu.
set()).va).set_base( (tmp.
va).base ) ;
900 for (
int l=0; l<
nzet; l++) {
901 for (
int i=0; i<mg->
get_nr(l); i++) {
903 double u1 =
uuu()(l, 0, j_b, i) ;
906 cout <<
"U > c for l, i : " << l <<
" " << i
907 <<
" U = " << u1 << endl ;
912 cout <<
"**** VELOCITY OF LIGHT REACHED ****" << endl ;
913 omega /= fact_omega ;
914 cout <<
"New rotation frequency : " 915 <<
omega/(2.*M_PI) * f_unit <<
" Hz" << endl ;
916 omega_trop_grand = true ;
936 mlngamma = - 0.5 *
uuu*
uuu ;
946 double nuf_b =
nuf()(l_b, k_b, j_b, i_b) ;
947 double nuq_b =
nuq()(l_b, k_b, j_b, i_b) ;
948 double mlngamma_b = mlngamma()(l_b, k_b, j_b, i_b) ;
949 double mag_b = mag()(l_b, k_b, j_b, i_b) ;
952 double nuf_c =
nuf()(0,0,0,0) ;
953 double nuq_c =
nuq()(0,0,0,0) ;
954 double mlngamma_c = 0 ;
955 double mag_c = mag()(0,0,0,0) ;
959 double alpha_r2 = ( ent_c - ent_b + mlngamma_c - mlngamma_b
960 + nuq_c - nuq_b + mag_c - mag_b)
961 / ( nuf_b - nuf_c ) ;
962 alpha_r =
sqrt(alpha_r2) ;
963 cout <<
"alpha_r = " << alpha_r << endl ;
969 double nu_c =
logn()(0,0,0,0) ;
973 ent = (ent_c + nu_c + mlngamma_c + mag_c) -
logn - mlngamma - mag ;
980 for (
int l=0; l<
nzet; l++) {
981 int imax = mg->
get_nr(l) - 1 ;
982 if (l == l_b) imax-- ;
983 for (
int i=0; i<imax; i++) {
984 if (
ent()(l, 0, j_b, i) < 0. ) {
986 cout <<
"ent < 0 for l, i : " << l <<
" " << i
987 <<
" ent = " <<
ent()(l, 0, j_b, i) << endl ;
993 cout <<
"**** KEPLERIAN VELOCITY REACHED ****" << endl ;
994 omega /= fact_omega ;
995 cout <<
"New rotation frequency : " 996 <<
omega/(2.*M_PI) * f_unit <<
" Hz" << endl ;
997 omega_trop_grand = true ;
1002 if ( omega_trop_grand ) {
1004 fact_omega =
sqrt( fact_omega ) ;
1005 cout <<
"**** New fact_omega : " << fact_omega << endl ;
1015 double dent_eq =
ent().dsdr()(l_b, k_b, j_b, i_b) ;
1016 double dent_pole =
ent().dsdr()(l_b, k_b, 0, i_b) ;
1017 double rap_dent = fabs( dent_eq / dent_pole ) ;
1018 cout <<
"| dH/dr_eq / dH/dr_pole | = " << rap_dent << endl ;
1020 if ( rap_dent < thres_adapt ) {
1022 cout <<
"******* FROZEN MAPPING *********" << endl ;
1074 err_grv2 = lbda_grv2 - 1;
1075 cout <<
"GRV2: " << err_grv2 << endl ;
1089 logn = relax *
logn + relax_prev * logn_prev ;
1091 dzeta = relax *
dzeta + relax_prev * dzeta_prev ;
1103 fichfreq <<
" " <<
omega / (2*M_PI) * f_unit ;
1104 fichevol <<
" " << rap_dent ;
1106 fichevol <<
" " << ent_c ;
1112 if (mer > mer_mass) {
1115 if (mbar_wanted > 0.) {
1116 xx =
mass_b() / mbar_wanted - 1. ;
1117 cout <<
"Discrep. baryon mass <-> wanted bar. mass : " << xx
1121 xx =
mass_g() / fabs(mbar_wanted) - 1. ;
1122 cout <<
"Discrep. grav. mass <-> wanted grav. mass : " << xx
1125 double xprog = ( mer > 2*mer_mass) ? 1. :
1126 double(mer-mer_mass)/double(mer_mass) ;
1128 double ax = .5 * ( 2. + xx ) / (1. + xx ) ;
1129 double fact =
pow(ax, aexp_mass) ;
1130 cout <<
" xprog, xx, ax, fact : " << xprog <<
" " <<
1131 xx <<
" " << ax <<
" " << fact << endl ;
1137 if (mer%4 == 0)
omega *= fact ;
1145 if (mer > mer_magmom) {
1154 double xx =
MagMom() / magmom_wanted - 1. ;
1155 cout <<
"Discrep. mag. moment <-> wanted mag. moment : " << xx
1158 double xprog = ( mer > 2*mer_magmom) ? 1. :
1159 double(mer-mer_magmom)/double(mer_magmom) ;
1161 double ax = .5 * ( 2. + xx ) / (1. + xx ) ;
1162 double fact =
pow(ax, aexp_mass) ;
1163 cout <<
" xprog, xx, ax, fact : " << xprog <<
" " <<
1164 xx <<
" " << ax <<
" " << fact << endl ;
1174 diff_ent = diff_ent_tbl(0) ;
1175 for (
int l=1; l<
nzet; l++) {
1176 diff_ent += diff_ent_tbl(l) ;
1180 fichconv <<
" " <<
log10( fabs(diff_ent) + 1.e-16 ) ;
1181 fichconv <<
" " <<
log10( fabs(err_grv2) + 1.e-16 ) ;
1189 dzeta_prev =
dzeta ;
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
Tbl maxabs(const Tensor &aa, const char *comment=0x0, ostream &ost=cout, bool verb=true)
Maxima in each domain of the absolute values of the tensor components.
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
Tenseur khi_shift
Scalar used in the decomposition of shift , following Shibata's prescription [Prog.
Cmp log(const Cmp &)
Neperian logarithm.
virtual void sauve(FILE *) const
Save in a binary file.
void add_tenseur_mod(Tenseur &ti, int position=0)
Adds the address of a new modifiable Tenseur to the list.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Tenseur E_em
electromagnetic energy density in the Eulerian frame
Cmp ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
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.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
const Cmp & cmp_zero() const
Returns the null Cmp defined on *this.
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.
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void annule(int l)
Sets the Cmp to zero in a given domain.
Et_magnetisation(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i, bool include_mag=true, bool use_B=true)
Standard constructor.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
void fait_nphi()
Computes tnphi and nphi from the Cartesian components of the shift, stored in shift ...
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
double Q
In the case of a perfect conductor, the requated baryonic charge.
Tenseur w_shift
Vector used in the decomposition of shift , following Shibata's prescription [Prog.
Scalar E_I
Interaction (magnetisation) energy density.
Equation of state base class.
Tenseur ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for ...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int get_etat() const
Returns the logical state.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Tenseur nnn
Total lapse function.
Tensor field of valence 0 (or component of a tensorial field).
Tenseur nphi
Metric coefficient .
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
double ray_eq() const
Coordinate radius at , [r_unit].
Base class for coordinate mappings.
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...
Tenseur b_car
Square of the metric factor B.
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
Tenseur Magn() const
Computes the magnetic field spherical components in Lorene's units.
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
Basic integer array class.
virtual void exponential_filter_r(int lzmin, int lzmax, int p, double alpha=-16.)
Applies an exponential filter to the spectral coefficients in the radial direction.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void sauve(FILE *) const
Save in a binary file.
int get_etat() const
Gives the logical state.
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Tenseur press
Fluid pressure.
double * x
Array of values of at the nr collocation points.
Tensor field of valence 1.
Tenseur shift
Total shift vector.
Tbl & set_domain(int l)
Read/write of the value in a given domain.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
void add_double_mod(double &x, int position=0)
Adds the address of a new modifiable double to the list.
Cmp A_phi
-component of the electromagnetic potential 1-form divided by .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void update_metric()
Computes metric coefficients from known potentials.
virtual void sauve(FILE *) const
Save in a file.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Cmp ssjm1_nuq
Effective source at the previous step for the resolution of the Poisson equation for nuq by means of ...
void operator=(const Et_rot_mag &)
Assignment to another Et_rot_mag.
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
double a_j
Amplitude of the curent/charge function.
virtual void poisson2d(const Cmp &source_mat, const Cmp &source_quad, Param &par, Cmp &uu) const =0
Computes the solution of a 2-D Poisson equation.
bool is_conduct() const
Tells if the star is made of conducting or isolating material.
Vector J_I
Interaction momentum density 3-vector.
Tenseur nbar
Baryon density in the fluid frame.
Scalar xmag
The magnetisation scalar.
bool use_B_in_eos
Flag : true if the value of the magnetic field is used in the Eos.
Class for magnetized (isolator or perfect conductor), rigidly rotating stars.
double mag_ent_p(double ent, const Param *par=0x0) const
Computes the magnetisation.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Mtbl * c
Values of the function at the points of the multi-grid.
bool include_magnetisation
Flag : true if magnetisation terms are included in the equations.
virtual double mass_b() const
Baryon mass.
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
void mult_rsint()
Multiplication by .
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
const Eos & eos
Equation of state of the stellar matter.
virtual void homothetie(double lambda)
Sets a new radial scale.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp ssjm1_nuf
Effective source at the previous step for the resolution of the Poisson equation for nuf by means of ...
virtual void sauve(FILE *) const
Save in a file.
int get_etat() const
Returns the logical state.
virtual void del_deriv() const
Deletes all the derived quantities.
void operator=(const Et_magnetisation &)
Assignment to another Et_rot_mag.
Tenseur bbb
Metric factor B.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Cmp pow(const Cmp &, int)
Power .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Class for a magnetized (tabulated) equation of state.
Tenseur uuu
Norm of u_euler.
Tbl & set(int l)
Read/write of the Tbl in a given domain.
Tenseur tggg
Metric potential .
double omega
Rotation angular velocity ([f_unit] )
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Tenseur nuf
Part of the Metric potential = logn generated by the matter terms.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
int nzet
Number of domains of *mp occupied by the star.
virtual double grv2() const
Error on the virial identity GRV2.
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 .
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one. ...
double ray_pole() const
Coordinate radius at [r_unit].
Tbl & set(int l)
Read/write of the value in a given domain.
Tenseur ener
Total energy density in the fluid frame.
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
void equilibrium_mag(double ent_c, double omega0, double fact_omega, int nzadapt, const Tbl &ent_limit, const Itbl &icontrol, const Tbl &control, double mbar_wanted, double magmom_wanted, double aexp_mass, Tbl &diff, double Q0, double a_j0, Cmp(*f_j)(const Cmp &x, const double), Cmp(*M_j)(const Cmp &x, const double))
Computes an equilibrium configuration.
Cmp log10(const Cmp &)
Basis 10 logarithm.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
virtual void sauve(FILE *) const
Save in a file.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Cmp abs(const Cmp &)
Absolute value.
virtual void magnet_comput(const int adapt_flag, Cmp(*f_j)(const Cmp &x, const double), Param &par_poisson_At, Param &par_poisson_Avect)
Computes the electromagnetic quantities solving the Maxwell equations (6) and (7) of [Bocquet...
Sym_tensor Sij_I
Interaction stress 3-tensor.
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.
virtual double mass_g() const
Gravitational mass.
Cmp A_t
t-component of the elecctromagnetic potential 1-form, divided by .
Tenseur & logn
Metric potential = logn_auto.
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c )...
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
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.
virtual ~Et_magnetisation()
Destructor.
double MagMom() const
Magnetic Momentum in SI units.
Tenseur nuq
Part of the Metric potential = logn generated by the quadratic terms.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
Tenseur ener_euler
Total energy density in the Eulerian frame.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
void annule_hard()
Sets the Tbl to zero in a hard way.
Tenseur & dzeta
Metric potential = beta_auto.
Valeur va
The numerical value of the Cmp.
Cmp ssjm1_tggg
Effective source at the previous step for the resolution of the Poisson equation for tggg ...
Tenseur_sym tkij
Tensor related to the extrinsic curvature tensor by .
Class intended to describe valence-2 symmetric tensors.
Standard electro-magnetic units.
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.
Tenseur Jp_em
component of the electromagnetic momentum density 3-vector, as measured in the Eulerian frame...
virtual void MHD_comput()
Computes the electromagnetic part of the stress-energy tensor.