31char et_rot_mag_global_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/et_rot_mag_global.C,v 1.23 2016/11/01 09:12:59 j_novak Exp $" ;
113#include "et_rot_mag.h"
136 ApAp.
set().div_rsint() ;
137 ApAp.
set().div_rsint() ;
140 ApAt.
set().div_rsint() ;
213 return mm*j_unit*
pow(r_unit,4) ;
228 double Q_c = -4*M_PI*(*asymp[1])(Z-1,0,0,0) ;
234 return Q_c *(j_unit/v_unit*
pow(r_unit,3)) ;}
263 return Qi * (j_unit/v_unit*
pow(r_unit,3)) ;
292 p_mass_g =
new double( source().integrale() ) ;
317 dens.
va = (dens.
va).mult_st() ;
324 dens =
nbar() * dens ;
356 p_tsw =
new double( tcin / ( mass_p + tcin -
mass_g() ) ) ;
363 p_tsw =
new double( tcin / fabs(wgrav) ) ;
427 Cmp aa = alpha() - 0.5 * beta() ;
433 cout <<
"Etoile_rot::grv3: the mapping does not belong"
434 <<
" to the class Map_radial !" << endl ;
441 vdaadt = vdaadt.
ssint() ;
454 vtemp = (mpr->
xsr) * vtemp ;
462 source =
bbb() * source() + 0.5 * temp ;
472 double int_grav = source().integrale() ;
486 double int_mat = source().integrale() ;
491 *ost <<
"Etoile_rot::grv3 : gravitational term : " << int_grav
493 *ost <<
"Etoile_rot::grv3 : matter term : " << int_mat
497 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
529 source = qpig *
nbar ;
539 Cmp& csource = source.
set() ;
561 source = 0.5 * source() - 1.5 * temp ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void mult_rsint()
Multiplication by .
int get_etat() const
Returns the logical state.
Valeur va
The numerical value of the Cmp
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
int get_dzpuis() const
Returns dzpuis.
void mult_r()
Multiplication by r everywhere.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
void set_dzpuis(int)
Set a value to dzpuis.
double integrale() const
Computes the integral over all space of *this .
const Cmp & srdsdt() const
Returns of *this .
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Valeur ** asymptot(int n, const int flag=0) const
Asymptotic expansion at r = infinity.
const Cmp & dsdr() const
Returns of *this .
virtual double mom_quad_old() const
Part of the quadrupole moment.
double Q_int() const
Computed charge from the integration of charge density over the star (i.e.
Tenseur Srr_em
rr component of the electromagnetic stress 3-tensor, as measured in the Eulerian frame....
double Q_comput() const
Computed charge deduced from the asymptotic behaviour of At [SI units].
virtual void MHD_comput()
Computes the electromagnetic part of the stress-energy tensor.
Cmp A_phi
-component of the electromagnetic potential 1-form divided by .
Tenseur Spp_em
component of the electromagnetic stress 3-tensor, as measured in the Eulerian frame.
double MagMom() const
Magnetic Momentum in SI units.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
virtual double tsw() const
Ratio T/W.
Cmp A_t
t-component of the elecctromagnetic potential 1-form, divided by .
double GyroMag() const
Gyromagnetic ratio .
virtual double mass_g() const
Gravitational mass.
Cmp j_t
t-component of the current 4-vector
virtual double grv2() const
Error on the virial identity GRV2.
Tenseur E_em
electromagnetic energy density in the Eulerian frame
Tenseur Jp_em
component of the electromagnetic momentum density 3-vector, as measured in the Eulerian frame.
Tenseur Elec() const
Computes the electric field spherical components in Lorene's units.
Cmp B_phi
-component of the magnetic field
Tenseur Magn() const
Computes the magnetic field spherical components in Lorene's units.
virtual double angu_mom() const
Angular momentum.
Tenseur uuu
Norm of u_euler.
double omega
Rotation angular velocity ([f_unit] )
Tenseur & logn
Metric potential = logn_auto.
double * p_mom_quad_old
Part of the quadrupole moment.
Tenseur nphi
Metric coefficient .
virtual double mass_b() const
Baryon mass.
static double lambda_grv2(const Cmp &sou_m, const Cmp &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
Tenseur bbb
Metric factor B.
Tenseur & dzeta
Metric potential = beta_auto.
double * p_grv3
Error on the virial identity GRV3.
double * p_grv2
Error on the virial identity GRV2.
double * p_angu_mom
Angular momentum.
Tenseur b_car
Square of the metric factor B.
Tenseur tnphi
Component of the shift vector.
double * p_mass_g
Gravitational mass.
Tenseur nnn
Total lapse function.
Tenseur nbar
Baryon density in the fluid frame.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
Tenseur ener
Total energy density in the fluid frame.
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 a_car
Total conformal factor .
Base class for pure radial mappings.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
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).
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
int get_etat() const
Returns the logical state.
Values and coefficients of a (real-value) function.
const Valeur & mult_ct() const
Returns applied to *this.
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
const Valeur & ssint() const
Returns of *this.
Cmp sqrt(const Cmp &)
Square root.
Cmp pow(const Cmp &, int)
Power .
Cmp log(const Cmp &)
Neperian logarithm.
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 flat_scalar_prod_desal(const Tenseur &t1, const Tenseur &t2)
Same as flat_scalar_prod but with desaliasing.
Standard electro-magnetic units.
Standard units of space, time and mass.