LORENE
star.C
1 /*
2  * Methods of class Star
3  *
4  * (see file star.h for documentation)
5  */
6 
7 /*
8  * Copyright (c) 2004 Francois Limousin
9  *
10  * Copyright (c) 2000-2001 Eric Gourgoulhon (for preceding class Etoile)
11  * Copyright (c) 2000-2001 Keisuke Taniguchi (for preceding class Etoile)
12  *
13  * This file is part of LORENE.
14  *
15  * LORENE is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * LORENE is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with LORENE; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28  *
29  */
30 
31 
32 
33 
34 /*
35  * $Id: star.C,v 1.22 2016/12/05 16:18:14 j_novak Exp $
36  * $Log: star.C,v $
37  * Revision 1.22 2016/12/05 16:18:14 j_novak
38  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
39  *
40  * Revision 1.21 2014/10/13 08:53:37 j_novak
41  * Lorene classes and functions now belong to the namespace Lorene.
42  *
43  * Revision 1.20 2013/04/20 20:56:15 m_bejger
44  * Fix for three domains in star in Star::equation_of_state from Etoile/etoile.C
45  *
46  * Revision 1.19 2010/02/02 12:45:16 e_gourgoulhon
47  * Improved the display (operator>>)
48  *
49  * Revision 1.18 2010/01/26 16:49:03 e_gourgoulhon
50  * Commented the test on the relativistic character of the EOS: the
51  * relativity parameter is not defined (yet !) in the base class Star.
52  *
53  * Revision 1.17 2007/11/06 16:22:03 j_novak
54  * The data member stress_euler is now a Sym_tensor instead of a Tensor.
55  *
56  * Revision 1.16 2007/06/21 19:53:47 k_taniguchi
57  * Addition of p_ray_eq_3pis2
58  *
59  * Revision 1.15 2005/09/14 12:30:52 f_limousin
60  * Saving of fields lnq and logn in class Star.
61  *
62  * Revision 1.14 2005/09/13 19:38:31 f_limousin
63  * Reintroduction of the resolution of the equations in cartesian coordinates.
64  *
65  * Revision 1.13 2005/02/17 17:29:04 f_limousin
66  * Change the name of some quantities to be consistent with other classes
67  * (for instance nnn is changed to nn, shift to beta, beta to lnq...)
68  *
69  * Revision 1.12 2005/01/05 17:43:03 f_limousin
70  * u_euler is now constructed in the spherical triad to be consistent
71  * with all the others vectors ans tensors.
72  *
73  * Revision 1.11 2004/11/11 16:29:49 j_novak
74  * set_der_0x0 is no longer virtual (to be coherent with Tensor/Scalar classes).
75  *
76  * Revision 1.10 2004/06/22 12:48:08 f_limousin
77  * Change qq, qq_auto and qq_comp to beta, beta_auto and beta_comp.
78  *
79  * Revision 1.9 2004/06/07 16:21:35 f_limousin
80  * Add outputs
81  *
82  * Revision 1.8 2004/04/08 16:32:10 f_limousin
83  * The new variable is ln(Q) instead of Q=psi^2*N. It improves the
84  * convergence of the code.
85  *
86  * Revision 1.7 2004/03/25 10:29:26 j_novak
87  * All LORENE's units are now defined in the namespace Unites (in file unites.h).
88  *
89  * Revision 1.6 2004/03/08 11:48:00 f_limousin
90  * Error in del_deriv() and set_der_0x0() : p_mass_b and p_mass_g were
91  * missing. And so they were never recomputed.
92  *
93  * Revision 1.5 2004/02/27 09:36:46 f_limousin
94  * u_euler is now constructed on a cartesian basis instead
95  * of a spherical one.
96  *
97  * Revision 1.4 2004/02/21 17:05:13 e_gourgoulhon
98  * Method Scalar::point renamed Scalar::val_grid_point.
99  * Method Scalar::set_point renamed Scalar::set_grid_point.
100  *
101  * Revision 1.3 2004/01/20 15:16:58 f_limousin
102  * First version
103  *
104  *
105  * $Header: /cvsroot/Lorene/C++/Source/Star/star.C,v 1.22 2016/12/05 16:18:14 j_novak Exp $
106  *
107  */
108 
109 // Headers C
110 #include "math.h"
111 
112 // Headers Lorene
113 #include "star.h"
114 #include "eos.h"
115 #include "utilitaires.h"
116 #include "param.h"
117 #include "unites.h"
118 
119 
120  //--------------//
121  // Constructors //
122  //--------------//
123 
124 // Standard constructor
125 // --------------------
126 namespace Lorene {
127 Star::Star(Map& mpi, int nzet_i, const Eos& eos_i)
128  : mp(mpi),
129  nzet(nzet_i),
130  eos(eos_i),
131  ent(mpi),
132  nbar(mpi),
133  ener(mpi),
134  press(mpi),
135  ener_euler(mpi),
136  s_euler(mpi),
137  gam_euler(mpi),
138  u_euler(mpi, CON, mp.get_bvect_spher()),
139  stress_euler(mpi, CON, mp.get_bvect_spher()),
140  logn(mpi),
141  nn(mpi),
142  beta(mpi, CON, mp.get_bvect_spher()),
143  lnq(mpi),
144  gamma(mp.flat_met_spher()){
145 
146 
147  // Check of the EOS
148 // const Eos_poly_newt* p_eos_poly_newt =
149 // dynamic_cast<const Eos_poly_newt*>( &eos ) ;
150 //
151 // const Eos_incomp_newt* p_eos_incomp_newt =
152 // dynamic_cast<const Eos_incomp_newt*>( &eos ) ;
153 //
154 //
155 //
156 // if (p_eos_poly_newt != 0x0) {
157 // cout <<
158 // "Star::Star : the EOS Eos_poly_newt must not be employed"
159 // << " for a relativistic star ! " << endl ;
160 // cout << "(Use Eos_poly instead)" << endl ;
161 // abort() ;
162 // }
163 // if (p_eos_incomp_newt != 0x0) {
164 // cout <<
165 // "Star::Star : the EOS Eos_incomp_newt must not be employed"
166 // << " for a relativistic star ! " << endl ;
167 // cout << "(Use Eos_incomp instead)" << endl ;
168 // abort() ;
169 // }
170 //
171  // Pointers of derived quantities initialized to zero :
172  set_der_0x0() ;
173 
174  // All the matter quantities are initialized to zero :
175  nbar = 0 ;
176  ener = 0 ;
177  press = 0 ;
178  ent = 0 ;
179  ener_euler = 0 ;
180  s_euler = 0 ;
181  gam_euler = 1. ;
185 
186  // The metric is initialized to the flat one :
187  Metric flat(mp.flat_met_spher()) ;
188  flat.cov() ;
189  gamma = flat ;
190 
191  logn = 0 ;
192  nn = 1. ;
193  nn.std_spectral_base() ;
194  beta.set_etat_zero() ;
195  lnq = 0 ;
196 
197 }
198 
199 // Copy constructor
200 // ----------------
201 Star::Star(const Star& et)
202  : mp(et.mp),
203  nzet(et.nzet),
204  eos(et.eos),
205  ent(et.ent),
206  nbar(et.nbar),
207  ener(et.ener),
208  press(et.press),
209  ener_euler(et.ener_euler),
210  s_euler(et.s_euler),
211  gam_euler(et.gam_euler),
212  u_euler(et.u_euler),
213  stress_euler(et.stress_euler),
214  logn(et.logn),
215  nn(et.nn),
216  beta(et.beta),
217  lnq(et.lnq),
218  gamma(et.gamma){
219 
220  set_der_0x0() ;
221 
222 }
223 
224 // Constructor from a file
225 // -----------------------
226 Star::Star(Map& mpi, const Eos& eos_i, FILE* fich)
227  : mp(mpi),
228  eos(eos_i),
229  ent(mpi),
230  nbar(mpi),
231  ener(mpi),
232  press(mpi),
233  ener_euler(mpi),
234  s_euler(mpi),
235  gam_euler(mpi),
236  u_euler(mpi, CON, mp.get_bvect_spher()),
237  stress_euler(mpi, CON, mp.get_bvect_spher()),
238  logn(mpi, *(mpi.get_mg()), fich),
239  nn(mpi),
240  beta(mpi, CON, mp.get_bvect_spher()),
241  lnq(mpi, *(mpi.get_mg()), fich),
242  gamma(mpi.flat_met_spher()){
243 
244  // Star parameters
245  // -----------------
246 
247  // nzet is read in the file:
248  int xx ;
249  fread_be(&xx, sizeof(int), 1, fich) ;
250  nzet = xx ;
251 
252  // Equation of state
253  // -----------------
254 
255  // Read of the saved EOS
256  Eos* p_eos_file = Eos::eos_from_file(fich) ;
257 
258  // Comparison with the assigned EOS:
259  if (eos != *p_eos_file) {
260  cout <<
261  "Star::Star(const Map&, const Eos&, FILE*) : the EOS given in "
262  << endl <<
263  " argument and that read in the file are different !" << endl ;
264  abort() ;
265  }
266 
267  // p_eos_file is no longer required (it was used only for checking the
268  // EOS compatibility)
269  delete p_eos_file ;
270 
271  // Read of the saved fields:
272  // ------------------------
273  Scalar ent_file(mp, *(mp.get_mg()), fich) ;
274  ent = ent_file ;
277  nn = 1 ;
278  beta.set_etat_zero() ;
279 
280  // Pointers of derived quantities initialized to zero
281  // --------------------------------------------------
282  set_der_0x0() ;
283 
284 }
285 
286  //------------//
287  // Destructor //
288  //------------//
289 
291 
292  del_deriv() ;
293 
294 }
295 
296 
297  //----------------------------------//
298  // Management of derived quantities //
299  //----------------------------------//
300 
301 void Star::del_deriv() const {
302 
303  if (p_mass_b != 0x0) delete p_mass_b ;
304  if (p_mass_g != 0x0) delete p_mass_g ;
305  if (p_ray_eq != 0x0) delete p_ray_eq ;
306  if (p_ray_eq_pis2 != 0x0) delete p_ray_eq_pis2 ;
307  if (p_ray_eq_pi != 0x0) delete p_ray_eq_pi ;
308  if (p_ray_eq_3pis2 != 0x0) delete p_ray_eq_3pis2 ;
309  if (p_ray_pole != 0x0) delete p_ray_pole ;
310  if (p_l_surf != 0x0) delete p_l_surf ;
311  if (p_xi_surf != 0x0) delete p_xi_surf ;
312 
313  Star::set_der_0x0() ;
314 }
315 
316 
317 
318 
319 void Star::set_der_0x0() const {
320 
321  p_mass_b = 0x0 ;
322  p_mass_g = 0x0 ;
323  p_ray_eq = 0x0 ;
324  p_ray_eq_pis2 = 0x0 ;
325  p_ray_eq_pi = 0x0 ;
326  p_ray_eq_3pis2 = 0x0 ;
327  p_ray_pole = 0x0 ;
328  p_l_surf = 0x0 ;
329  p_xi_surf = 0x0 ;
330 
331 }
332 
334 
340 
341  del_deriv() ;
342 
343 }
344 
345 
346 
347 
348  //--------------//
349  // Assignment //
350  //--------------//
351 
352 // Assignment to another Star
353 // ----------------------------
354 void Star::operator=(const Star& et) {
355 
356  assert( &(et.mp) == &mp ) ; // Same mapping
357  assert( &(et.eos) == &eos ) ; // Same EOS
358 
359  nzet = et.nzet ;
360  ent = et.ent ;
361  nbar = et.nbar ;
362  ener = et.ener ;
363  press = et.press ;
364  ener_euler = et.ener_euler ;
365  s_euler = et.s_euler ;
366  gam_euler = et.gam_euler ;
367  u_euler = et.u_euler ;
369  logn = et.logn ;
370  nn = et.nn ;
371  beta = et.beta ;
372  lnq = et.lnq ;
373  gamma = et.gamma ;
374 
375  del_deriv() ; // Deletes all derived quantities
376 
377 }
378 
379 // Assignment of the enthalpy field
380 // --------------------------------
381 
382 void Star::set_enthalpy(const Scalar& ent_i) {
383 
384  ent = ent_i ;
385 
386  // Update of (nbar, ener, press) :
387  equation_of_state() ;
388 
389  // The derived quantities are obsolete:
390  del_deriv() ;
391 
392 }
393 
394  //--------------//
395  // Outputs //
396  //--------------//
397 
398 // Save in a file
399 // --------------
400 void Star::sauve(FILE* fich) const {
401 
402  logn.sauve(fich) ;
403  lnq.sauve(fich) ;
404 
405  int xx = nzet ;
406  fwrite_be(&xx, sizeof(int), 1, fich) ;
407 
408  eos.sauve(fich) ;
409  ent.sauve(fich) ;
410 }
411 
412 // Printing
413 // --------
414 
415 ostream& operator<<(ostream& ost, const Star& et) {
416  et >> ost ;
417  return ost ;
418 }
419 
420 ostream& Star::operator>>(ostream& ost) const {
421 
422  using namespace Unites ;
423 
424  ost << endl ;
425 
426  ost << "Number of domains occupied by the star : " << nzet << endl ;
427 
428  ost << "Equation of state : " << endl ;
429  ost << eos << endl ;
430 
431  ost << endl << "Central enthalpy : " << ent.val_grid_point(0,0,0,0) << " c^2" << endl ;
432  ost << "Central proper baryon density : " << nbar.val_grid_point(0,0,0,0)
433  << " x 0.1 fm^-3" << endl ;
434  ost << "Central proper energy density : " << ener.val_grid_point(0,0,0,0)
435  << " rho_nuc c^2" << endl ;
436  ost << "Central pressure : " << press.val_grid_point(0,0,0,0)
437  << " rho_nuc c^2" << endl ;
438 
439  ost << endl ;
440  ost << "Central lapse N : " << nn.val_grid_point(0,0,0,0) << endl ;
441 // ost << "Central value of lnq : " << lnq.val_grid_point(0,0,0,0) << endl ;
442 
443  ost << endl
444  << "Coordinate equatorial radius (phi=0) a1 = "
445  << ray_eq()/km << " km" << endl ;
446  ost << "Coordinate equatorial radius (phi=pi/2) a2 = "
447  << ray_eq_pis2()/km << " km" << endl ;
448  ost << "Coordinate equatorial radius (phi=pi): "
449  << ray_eq_pi()/km << " km" << endl ;
450  ost << "Coordinate polar radius a3 = "
451  << ray_pole()/km << " km" << endl ;
452  ost << "Axis ratio a2/a1 = " << ray_eq_pis2() / ray_eq()
453  << " a3/a1 = " << ray_pole() / ray_eq() << endl ;
454  ost << endl << "Baryon mass : " << mass_b() / msol << " M_sol" << endl ;
455  ost << "Gravitational mass : " << mass_g() / msol << " M_sol" << endl ;
456 
457 
458  return ost ;
459 }
460 
461  //-----------------------------------------//
462  // Computation of hydro quantities //
463  //-----------------------------------------//
464 
466 
467  Scalar ent_eos = ent ;
468 
469 
470  // Slight rescale of the enthalpy field in case of 2 domains inside the
471  // star
472 
473 
474  double epsilon = 1.e-12 ;
475 
476  const Mg3d* mg = mp.get_mg() ;
477  int nz = mg->get_nzone() ;
478 
479  Mtbl xi(mg) ;
480  xi.set_etat_qcq() ;
481  for (int l=0; l<nz; l++) {
482  xi.t[l]->set_etat_qcq() ;
483  for (int k=0; k<mg->get_np(l); k++) {
484  for (int j=0; j<mg->get_nt(l); j++) {
485  for (int i=0; i<mg->get_nr(l); i++) {
486  xi.set(l,k,j,i) =
487  mg->get_grille3d(l)->x[i] ;
488  }
489  }
490  }
491 
492  }
493 
494  Scalar fact_ent(mp) ;
495  fact_ent.allocate_all() ;
496 
497  fact_ent.set_domain(0) = 1 + epsilon * xi(0) * xi(0) ;
498  fact_ent.set_domain(1) = 1 - 0.25 * epsilon * (xi(1) - 1) * (xi(1) - 1) ;
499 
500  for (int l=nzet; l<nz; l++) {
501  fact_ent.set_domain(l) = 1 ;
502  }
503 
504  if (nzet > 1) {
505 
506  if(nzet == 3) {
507  fact_ent.set_domain(1) = 1 - 0.5 * epsilon * (xi(1) - 0.5) * (xi(1) - 0.5) ;
508  fact_ent.set_domain(2) = 1 - 0.25 * epsilon * (xi(2) - 1) * (xi(2) - 1) ;
509  }
510 
511  if (nzet > 3) {
512 
513  cout << "Star::equation_of_state: not ready yet for nzet > 3 !"
514  << endl ;
515  }
516 
517  ent_eos = fact_ent * ent_eos ;
518  ent_eos.std_spectral_base() ;
519  }
520 
521 
522 
523 
524 
525  // Call to the EOS (the EOS is called domain by domain in order to
526  // allow for the use of MEos)
527 
528  Scalar tempo(mp) ;
529 
530  nbar.set_etat_qcq() ;
531  nbar = 0 ;
532  for (int l=0; l<nzet; l++) {
533 
534  Param par ; // Paramater for multi-domain equation of state
535  par.add_int(l) ;
536 
537  tempo = eos.nbar_ent(ent_eos, 1, l, &par) ;
538 
539  nbar = nbar + tempo ;
540 
541  }
542 
543  ener.set_etat_qcq() ;
544  ener = 0 ;
545  for (int l=0; l<nzet; l++) {
546 
547  Param par ; // Paramater for multi-domain equation of state
548  par.add_int(l) ;
549 
550  tempo = eos.ener_ent(ent_eos, 1, l, &par) ;
551 
552  ener = ener + tempo ;
553 
554  }
555 
556  press.set_etat_qcq() ;
557  press = 0 ;
558  for (int l=0; l<nzet; l++) {
559 
560  Param par ; // Paramater for multi-domain equation of state
561  par.add_int(l) ;
562 
563  tempo = eos.press_ent(ent_eos, 1, l, &par) ;
564 
565  press = press + tempo ;
566 
567  }
568 
569 
570  // Set the bases for spectral expansion
574 
575  // The derived quantities are obsolete
576  del_deriv() ;
577 
578 }
579 
581 
582  cout <<
583  "Star::hydro_euler : hydro_euler must be called via a derived class"
584  << endl << " of Star !" << endl ;
585 
586  abort() ;
587 
588 }
589 }
double * p_mass_b
Baryon mass.
Definition: star.h:268
Metric for tensor calculation.
Definition: metric.h:90
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
Definition: grilles.h:517
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition: star.C:319
Cmp ener_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the total energy density from the log-enthalpy and extra parameters.
Definition: eos.C:387
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition: param.C:249
Map & mp
Mapping associated with the star.
Definition: star.h:180
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition: grilles.h:479
double * p_ray_eq_3pis2
Coordinate radius at , .
Definition: star.h:251
double * p_ray_eq_pi
Coordinate radius at , .
Definition: star.h:248
Metric gamma
3-metric
Definition: star.h:235
Multi-domain array.
Definition: mtbl.h:118
Lorene prototypes.
Definition: app_hor.h:67
const Eos & eos
Equation of state of the stellar matter.
Definition: star.h:185
Standard units of space, time and mass.
Equation of state base class.
Definition: eos.h:209
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Definition: star.h:212
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:783
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
Definition: tensor.C:498
Base class for coordinate mappings.
Definition: map.h:688
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Definition: scalar.C:790
virtual void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition: scalar.C:371
Scalar nbar
Baryon density in the fluid frame.
Definition: star.h:192
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Definition: scalar.C:350
Scalar ent
Log-enthalpy.
Definition: star.h:190
Base class for stars.
Definition: star.h:175
double * x
Array of values of at the nr collocation points.
Definition: grilles.h:215
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Definition: star.h:201
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: scalar.C:359
Vector beta
Shift vector.
Definition: star.h:228
double * p_ray_eq
Coordinate radius at , .
Definition: star.h:242
Tbl & set_domain(int l)
Read/write of the value in a given domain.
Definition: scalar.h:621
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Definition: scalar.h:643
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
Definition: star.h:266
virtual void sauve(FILE *) const
Save in a file.
Definition: eos.C:189
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tbl.C:364
double * p_ray_eq_pis2
Coordinate radius at , .
Definition: star.h:245
void operator=(const Star &)
Assignment to another Star.
Definition: star.C:354
int nzet
Number of domains of *mp occupied by the star.
Definition: star.h:183
Cmp nbar_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the baryon density field from the log-enthalpy field and extra parameters.
Definition: eos.C:362
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition: star.h:204
virtual void sauve(FILE *) const
Save in a file.
Definition: scalar.C:692
Scalar ener
Total energy density in the fluid frame.
Definition: star.h:193
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition: star.C:580
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
Scalar press
Fluid pressure.
Definition: star.h:194
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
Definition: star.C:127
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Definition: star_global.C:141
double * p_ray_pole
Coordinate radius at .
Definition: star.h:254
Parameter storage.
Definition: param.h:125
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:465
virtual ~Star()
Destructor.
Definition: star.C:290
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Definition: star.h:207
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Definition: star_global.C:189
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Definition: fwrite_be.C:73
Scalar logn
Logarithm of the lapse N .
Definition: star.h:222
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: mtbl.C:302
Tbl & set(int l)
Read/write of the Tbl in a given domain.
Definition: mtbl.h:221
double ray_pole() const
Coordinate radius at [r_unit].
Definition: star_global.C:281
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Definition: fread_be.C:72
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition: grilles.h:469
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric.C:283
Multi-domain grid.
Definition: grilles.h:279
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: star.C:301
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
Definition: star.C:333
Scalar nn
Lapse function N .
Definition: star.h:225
double ray_eq() const
Coordinate radius at , [r_unit].
Definition: star_global.C:111
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition: star.C:420
virtual double mass_b() const =0
Baryon mass.
Definition: star_global.C:310
virtual void sauve(FILE *) const
Save in a file.
Definition: star.C:400
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Definition: tensor.C:506
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition: grilles.h:474
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Definition: star.C:465
Tbl ** t
Array (size nzone ) of pointers on the Tbl &#39;s.
Definition: mtbl.h:132
Scalar ener_euler
Total energy density in the Eulerian frame.
Definition: star.h:198
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...
Definition: star.h:260
double * p_mass_g
Gravitational mass.
Definition: star.h:269
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Definition: map.C:324
void set_enthalpy(const Scalar &)
Assignment of the enthalpy field.
Definition: star.C:382
virtual double mass_g() const =0
Gravitational mass.
Definition: star_global.C:330
Cmp press_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the pressure from the log-enthalpy and extra parameters.
Definition: eos.C:409