30char star_rot_equil_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_rot_equil.C,v 1.6 2014/10/13 08:53:39 j_novak Exp $" ;
67#include "utilitaires.h"
120 cout <<
"Star_rot::equilibrium: mer_change_omega < mer_rot !" <<
endl ;
126 cout <<
"Star_rot::equilibrium: mer_fix_omega < mer_change_omega !"
154 diff.set_etat_qcq() ;
218 for (
int i=1;
i<=3;
i++) {
224 for (
int i=1;
i<=3;
i++) {
230 for (
int i=1;
i<=3;
i++) {
313 fichconv <<
"# diff_ent GRV2 max_triax vit_triax" <<
endl ;
320 "# |dH/dr_eq/dH/dr_pole| r_pole/r_eq ent_c"
333 cout <<
"-----------------------------------------------" <<
endl ;
363 bet.std_spectral_base() ;
423 cout <<
"Test of the Poisson equation for nuf :" <<
endl ;
433 if ( mg->
get_np(0) == 1 ) {
435 "Star_rot::equilibrium: np must be stricly greater than 1"
436 <<
endl <<
" to set a triaxial perturbation !" <<
endl ;
459 if ( mg->
get_np(0) > 1 ) {
461 for (
int l=0;
l<nz;
l++) {
490 cout <<
"Test of the Poisson equation for nuq :" <<
endl ;
499 for (
int i=1;
i<=3;
i++) {
512 if ( mg->
get_np(0) == 1 ) {
518 for (
int i=1;
i<=3;
i++) {
526 for (
int i=1;
i<=3;
i++) {
533 cout <<
"Test of the Poisson equation for shift_x :" <<
endl ;
537 cout <<
"Test of the Poisson equation for shift_y :" <<
endl ;
573 tmp.std_spectral_base() ;
594 cout <<
"U > c for l, i : " <<
l <<
" " <<
i
595 <<
" U = " <<
u1 <<
endl ;
600 cout <<
"**** VELOCITY OF LIGHT REACHED ****" <<
endl ;
602 cout <<
"New rotation frequency : "
667 cout <<
"ent < 0 for l, i : " <<
l <<
" " <<
i
674 cout <<
"**** KEPLERIAN VELOCITY REACHED ****" <<
endl ;
676 cout <<
"New rotation frequency : "
703 cout <<
"******* FROZEN MAPPING *********" <<
endl ;
811 cout <<
"Discrep. baryon mass <-> wanted bar. mass : " <<
xx
816 cout <<
"Discrep. grav. mass <-> wanted grav. mass : " <<
xx
822 double ax = .5 * ( 2. +
xx ) / (1. +
xx ) ;
824 cout <<
" xprog, xx, ax, fact : " <<
xprog <<
" " <<
884 for (
int i=1;
i<=3;
i++) {
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Active physical coordinates and mapping derivatives.
Time evolution with partial storage (*** under development ***).
Basic integer array class.
Radial mapping of rather general form.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
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 adapt(const Cmp &ent, const Param &par, int nbr=0)=0
Adaptation of the mapping to a given scalar field.
const Cmp & cmp_zero() const
Returns the null Cmp defined on *this.
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
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.
Coord phi
coordinate centered on the grid
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
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 field of valence 0 (or component of a tensorial field).
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
const Scalar & dsdr() const
Returns of *this .
Valeur & set_spectral_va()
Returns va (read/write version)
const Valeur & get_spectral_va() const
Returns va (read only version)
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
void set_dzpuis(int)
Modifies the dzpuis flag.
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
Scalar ssjm1_tggg
Effective source at the previous step for the resolution of the Poisson equation for tggg .
Sym_tensor tkij
Tensor related to the extrinsic curvature tensor by .
Scalar tggg
Metric potential .
Vector w_shift
Vector used in the decomposition of shift , following Shibata's prescription [Prog.
Scalar bbb
Metric factor B.
virtual double mass_b() const
Baryon mass.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
double omega
Rotation angular velocity ([f_unit] )
Scalar uuu
Norm of u_euler.
Scalar nphi
Metric coefficient .
void update_metric()
Computes metric coefficients from known potentials.
virtual double mass_g() const
Gravitational mass.
Scalar ssjm1_nuq
Effective source at the previous step for the resolution of the Poisson equation for nuq by means of ...
Scalar nuf
Part of the Metric potential = logn generated by the matter terms.
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Scalar dzeta
Metric potential .
Scalar a_car
Square of the metric factor A.
Scalar ssjm1_nuf
Effective source at the previous step for the resolution of the Poisson equation for nuf by means of ...
Scalar nuq
Part of the Metric potential = logn generated by the quadratic terms.
Vector ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for .
virtual void equilibrium(double ent_c, double omega0, double fact_omega, int nzadapt, const Tbl &ent_limit, const Itbl &icontrol, const Tbl &control, double mbar_wanted, double aexp_mass, Tbl &diff, Param *=0x0)
Computes an equilibrium configuration.
virtual double grv2() const
Error on the virial identity GRV2.
virtual void partial_display(ostream &) const
Printing of some informations, excluding all global quantities.
Scalar khi_shift
Scalar used in the decomposition of shift , following Shibata's prescription [Prog.
void fait_nphi()
Computes tnphi and nphi from the Cartesian components of the shift, stored in shift .
Scalar logn
Logarithm of the lapse N .
Scalar nn
Lapse function N .
Scalar nbar
Baryon density in the fluid frame.
Scalar ener_euler
Total energy density in the Eulerian frame.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
double ray_eq() const
Coordinate radius at , [r_unit].
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Scalar press
Fluid pressure.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Map & mp
Mapping associated with the star.
int nzet
Number of domains of *mp occupied by the star.
double ray_pole() const
Coordinate radius at [r_unit].
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Values and coefficients of a (real-value) function.
Tensor field of valence 1.
Scalar & set(int)
Read/write access to a component.
Cmp sqrt(const Cmp &)
Square root.
Cmp log10(const Cmp &)
Basis 10 logarithm.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
Cmp abs(const Cmp &)
Absolute value.
Cmp log(const Cmp &)
Neperian logarithm.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Standard units of space, time and mass.