LORENE
eos.h
1 /*
2  * Definition of Lorene classes Eos
3  * Eos_poly
4  * Eos_poly_newt
5  * Eos_incomp
6  * Eos_incomp_newt
7  * Eos_strange
8  * Eos_strange_c
9  *
10  */
11 
12 /*
13  * Copyright (c) 2000-2001 Eric Gourgoulhon
14  *
15  * This file is part of LORENE.
16  *
17  * LORENE is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation; either version 2 of the License, or
20  * (at your option) any later version.
21  *
22  * LORENE is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with LORENE; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  *
31  */
32 
33 
34 #ifndef __EOS_H_
35 #define __EOS_H_
36 
37 /*
38  * $Id: eos.h,v 1.22 2015/08/04 14:41:28 j_novak Exp $
39  * $Log: eos.h,v $
40  * Revision 1.22 2015/08/04 14:41:28 j_novak
41  * Back to previous version for Eos_CompOSE. Enthalpy-consistent EoS can be accessed using Eos_consistent class (derived from Eos_CompOSE).
42  *
43  * Revision 1.21 2015/03/17 14:19:59 j_novak
44  * New class Hot_eos to deal with temperature-dependent EOSs.
45  *
46  * Revision 1.20 2014/10/13 08:52:33 j_novak
47  * Lorene classes and functions now belong to the namespace Lorene.
48  *
49  * Revision 1.19 2014/10/06 15:09:39 j_novak
50  * Modified #include directives to use c++ syntax.
51  *
52  * Revision 1.18 2012/10/26 14:09:13 e_gourgoulhon
53  * Added new class Eos_Fermi
54  *
55  * Revision 1.17 2011/06/16 10:49:18 j_novak
56  * New class Eos_mag for EOSs depending on density and magnetic field.
57  *
58  * Revision 1.16 2010/02/02 13:21:52 j_novak
59  * New class Eos_Compstar.
60  *
61  * Revision 1.15 2010/01/23 16:27:11 e_gourgoulhon
62  * Improved documentation.
63  *
64  * Revision 1.14 2005/05/22 20:49:12 k_taniguchi
65  * Introduction of a new class Eos_fit_AkmalPR.
66  *
67  * Revision 1.13 2004/09/26 18:51:47 k_taniguchi
68  * Introduction of new classes Eos_fitting, Eos_fit_SLy4, and Eos_fit_FPS
69  *
70  * Revision 1.12 2004/05/07 08:08:29 k_taniguchi
71  * Add the case of Eos_multi_poly.C
72  *
73  * Revision 1.11 2004/03/22 16:10:20 j_novak
74  * Excluding some files
75  *
76  * Revision 1.10 2004/03/22 13:12:40 j_novak
77  * Modification of comments to use doxygen instead of doc++
78  *
79  * Revision 1.9 2004/01/14 15:52:26 f_limousin
80  * Added methods calcule, nbar_ent, der_nbar_ent and der_ener_ent for Scalar.
81  *
82  * Revision 1.8 2003/12/08 15:48:12 m_bejger
83  * GlendNH3 (Glendenning 1985, case 3) added
84  *
85  * Revision 1.7 2002/10/16 14:36:28 j_novak
86  * Reorganization of #include instructions of standard C++, in order to
87  * use experimental version 3 of gcc.
88  *
89  * Revision 1.6 2002/09/13 09:17:31 j_novak
90  * Modif. commentaires
91  *
92  * Revision 1.5 2002/06/17 14:05:16 j_novak
93  * friend functions are now also declared outside the class definition
94  *
95  * Revision 1.4 2002/04/11 13:27:48 e_gourgoulhon
96  * *** empty log message ***
97  *
98  * Revision 1.3 2002/04/09 15:19:03 e_gourgoulhon
99  * Add EOS number 100 in the comments of eos_from_file
100  *
101  * Revision 1.2 2002/04/09 14:32:14 e_gourgoulhon
102  * 1/ Added extra parameters in EOS computational functions (argument par)
103  * 2/ New class MEos for multi-domain EOS
104  *
105  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
106  * LORENE
107  *
108  * Revision 2.15 2001/09/12 15:54:17 eric
109  * Modif documentation eos_from_file.
110  *
111  * Revision 2.14 2001/06/13 14:12:18 eric
112  * Modif commentaires (mise en conformite Doc++ 3.4.7)
113  *
114  * Revision 2.13 2001/02/07 09:33:42 eric
115  * Suppression des fonctions derent_ent et derent_ent_p.
116  * Ajout des fonctions donnant les derivees de l'EOS:
117  * der_nbar_ent
118  * der_ener_ent
119  * der_press_ent
120  *
121  * Revision 2.12 2000/11/23 14:45:33 eric
122  * Ajout de l'EOS Eos_strange_cr.
123  *
124  * Revision 2.11 2000/11/22 19:28:45 eric
125  * Ajout de #include "eos_tabul.h" a la fin.
126  *
127  * Revision 2.10 2000/10/25 10:55:08 eric
128  * Eos_strange: modif commentaires.
129  *
130  * Revision 2.9 2000/10/24 15:28:43 eric
131  * Ajout de l'EOS matiere etrange (Eos_strange).
132  *
133  * Revision 2.8 2000/06/20 08:34:20 eric
134  * Ajout des membres get_gam(), ... a Eos_ploy
135  *
136  * Revision 2.7 2000/02/14 14:43:22 eric
137  * Modif commentaires.
138  *
139  * Revision 2.6 2000/02/14 14:32:46 eric
140  * Ajout des constructeurs par lecture de fichier formate.
141  *
142  * Revision 2.5 2000/01/21 16:21:12 eric
143  * Modif commentaires.
144  *
145  * Revision 2.4 2000/01/21 15:16:10 eric
146  * Ajout de la fonction identify()
147  * Ajout de la fonction de construction a partir d'un fichier
148  * static Eos* Eos::eos_from_file(FILE* ).
149  * Ajout des operateurs de comparaison == et !=
150  *
151  * Revision 2.3 2000/01/18 16:10:57 eric
152  * Ajout des EOS Eos_incomp et Eos_incomp_newt.
153  *
154  * Revision 2.2 2000/01/18 15:13:28 eric
155  * Ajout de l'equation d'etat Eos_poly_newt.
156  *
157  * Revision 2.1 2000/01/18 13:46:50 eric
158  * Premiere version operationnelle
159  *
160  * Revision 2.0 2000/01/18 10:46:08 eric
161  * *** empty log message ***
162  *
163  *
164  * $Header: /cvsroot/Lorene/C++/Include/eos.h,v 1.22 2015/08/04 14:41:28 j_novak Exp $
165  *
166  */
167 
168 // Standard C++
169 #include "headcpp.h"
170 
171 // Headers C
172 #include <cstdio>
173 
174 // Lorene classes
175 namespace Lorene {
176 class Tbl ;
177 class Cmp ;
178 class Scalar ;
179 class Param ;
180 
181  //------------------------------------//
182  // base class Eos //
183  //------------------------------------//
184 
190 class Eos {
191 
192  // Data :
193  // -----
194 
195  protected:
196  char name[100] ;
197 
198 
199  // Constructors - Destructor
200  // -------------------------
201  protected:
202  Eos() ;
203 
205  explicit Eos(const char* name_i) ;
206 
207  Eos(const Eos& ) ;
208 
209  protected:
216  Eos(FILE* ) ;
217 
223  Eos(ifstream& ) ;
224 
225 
226  public:
227  virtual ~Eos() ;
228 
229 
230  // Name manipulation
231  // -----------------
232  public:
233  const char* get_name() const ;
234 
236  void set_name(const char* name_i) ;
237 
238  // Miscellaneous
239  // -------------
240  public:
244  static Eos* eos_from_file(FILE* ) ;
245 
276  static Eos* eos_from_file(ifstream& ) ;
277 
279  virtual bool operator==(const Eos& ) const = 0 ;
280 
282  virtual bool operator!=(const Eos& ) const = 0 ;
283 
287  virtual int identify() const = 0 ;
288 
289  // Outputs
290  // -------
291 
292  public:
293  virtual void sauve(FILE* ) const ;
294 
296  friend ostream& operator<<(ostream& , const Eos& ) ;
297 
298  protected:
299  virtual ostream& operator>>(ostream &) const = 0 ;
300 
301 
302  // Computational functions
303  // -----------------------
304  protected:
322  void calcule(const Cmp& thermo, int nzet, int l_min,
323  double (Eos::*fait)(double, const Param*) const, const Param* par, Cmp& resu) const ;
324 
344  void calcule(const Scalar& thermo, int nzet, int l_min,
345  double (Eos::*fait)(double, const Param*) const, const Param* par, Scalar& resu) const ;
346 
347  public:
360  virtual double nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
361 
382  Cmp nbar_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
383 
405  Scalar nbar_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
406 
419  virtual double ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
420 
440  Cmp ener_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
441 
462  Scalar ener_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
463 
476  virtual double press_ent_p(double ent, const Param* par=0x0) const = 0 ;
477 
478 
498  Cmp press_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
499 
520  Scalar press_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
521 
534  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
535 
557  Cmp der_nbar_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
558 
581  Scalar der_nbar_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
582 
595  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
596 
618  Cmp der_ener_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
619 
642  Scalar der_ener_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
643 
656  virtual double der_press_ent_p(double ent, const Param* par=0x0) const = 0 ;
657 
679  Cmp der_press_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
680 
703  Scalar der_press_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
704 
705 };
706 ostream& operator<<(ostream& , const Eos& ) ;
707 
708 
709  //------------------------------------//
710  // class Eos_poly //
711  //------------------------------------//
712 
713 
757 class Eos_poly : public Eos {
758 
759  // Data :
760  // -----
761 
762  protected:
764  double gam ;
765 
771  double kap ;
772 
776  double m_0 ;
777 
782  double mu_0 ;
783 
784 
785 
786  double gam1 ;
787  double unsgam1 ;
788  double gam1sgamkap ;
789  double rel_mu_0 ;
790  double ent_0 ;
791 
792  // Constructors - Destructor
793  // -------------------------
794  public:
795 
809  Eos_poly(double gamma, double kappa) ;
810 
823  Eos_poly(double gamma, double kappa, double mass) ;
824 
841  Eos_poly(double gamma, double kappa, double mass, double mu_zero) ;
842 
843  Eos_poly(const Eos_poly& ) ;
844 
845  protected:
852  Eos_poly(FILE* ) ;
853 
859  Eos_poly(ifstream& ) ;
860 
862  friend Eos* Eos::eos_from_file(FILE* ) ;
863  friend Eos* Eos::eos_from_file(ifstream& ) ;
864 
865  public:
866  virtual ~Eos_poly() ;
867 
868  // Assignment
869  // ----------
871  void operator=(const Eos_poly& ) ;
872 
873 
874  // Miscellaneous
875  // -------------
876 
877  public :
879  virtual bool operator==(const Eos& ) const ;
880 
882  virtual bool operator!=(const Eos& ) const ;
883 
887  virtual int identify() const ;
888 
890  double get_gam() const ;
891 
897  double get_kap() const ;
898 
903  double get_m_0() const ;
904 
908  double get_mu_0() const ;
909 
910  protected:
914  void set_auxiliary() ;
915 
916 
917  // Outputs
918  // -------
919 
920  public:
921  virtual void sauve(FILE* ) const ;
922 
923  protected:
924  virtual ostream& operator>>(ostream &) const ;
925 
926 
927  // Computational functions
928  // -----------------------
929 
930  public:
940  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
941 
951  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
952 
962  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
963 
973  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
974 
984  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
985 
995  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
996 
997 };
998 
999  //------------------------------------//
1000  // class Eos_poly_newt //
1001  //------------------------------------//
1002 
1003 
1004 
1044 class Eos_poly_newt : public Eos_poly {
1045 
1046  // Data :
1047  // -----
1048 
1049  // no new data with respect to Eos_poly
1050 
1051  // Constructors - Destructor
1052  // -------------------------
1053  public:
1054 
1068  Eos_poly_newt(double gamma, double kappa) ;
1069 
1070  Eos_poly_newt(const Eos_poly_newt& ) ;
1071 
1072  protected:
1079  Eos_poly_newt(FILE* ) ;
1080 
1086  Eos_poly_newt(ifstream& ) ;
1087 
1089  friend Eos* Eos::eos_from_file(FILE* ) ;
1090  friend Eos* Eos::eos_from_file(ifstream& ) ;
1091 
1092 
1093  public:
1094  virtual ~Eos_poly_newt() ;
1095 
1096  // Assignment
1097  // ----------
1099  void operator=(const Eos_poly_newt& ) ;
1100 
1101  // Miscellaneous
1102  // -------------
1103 
1104  public :
1106  virtual bool operator==(const Eos& ) const ;
1107 
1109  virtual bool operator!=(const Eos& ) const ;
1110 
1114  virtual int identify() const ;
1115 
1116  // Outputs
1117  // -------
1118 
1119  public:
1120  virtual void sauve(FILE* ) const ;
1121 
1122  protected:
1123  virtual ostream& operator>>(ostream &) const ;
1124 
1125 
1126  // Computational functions
1127  // -----------------------
1128 
1129  public:
1138  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1139 
1148  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1149 
1158  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1159 
1168  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1169 
1178  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1179 
1188  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1189 
1190 };
1191 
1192 
1193  //------------------------------------//
1194  // class Eos_incomp //
1195  //------------------------------------//
1196 
1197 
1206 class Eos_incomp : public Eos {
1207 
1208  // Data :
1209  // -----
1210 
1211  protected:
1213  double rho0 ;
1214 
1218  double ent0 ;
1219 
1220  // Constructors - Destructor
1221  // -------------------------
1222  public:
1223 
1233  Eos_incomp(double rho_c) ;
1234 
1245  Eos_incomp(double rho_c, double ent_c) ;
1246 
1247  Eos_incomp(const Eos_incomp& ) ;
1248 
1249  protected:
1256  Eos_incomp(FILE* ) ;
1257 
1263  Eos_incomp(ifstream& ) ;
1264 
1266  friend Eos* Eos::eos_from_file(FILE* ) ;
1267  friend Eos* Eos::eos_from_file(ifstream& ) ;
1268 
1269  public:
1270  virtual ~Eos_incomp() ;
1271 
1272  // Assignment
1273  // ----------
1275  void operator=(const Eos_incomp& ) ;
1276 
1277 
1278  // Miscellaneous
1279  // -------------
1280 
1281  public :
1283  virtual bool operator==(const Eos& ) const ;
1284 
1286  virtual bool operator!=(const Eos& ) const ;
1287 
1291  virtual int identify() const ;
1292 
1293  // Outputs
1294  // -------
1295 
1296  public:
1297  virtual void sauve(FILE* ) const ;
1298 
1299  protected:
1300  virtual ostream& operator>>(ostream &) const ;
1301 
1302 
1303  // Computational functions
1304  // -----------------------
1305 
1306  public:
1314  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1315 
1323  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1324 
1332  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1333 
1341  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1342 
1350  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1351 
1359  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1360 
1361 };
1362 
1363  //------------------------------------//
1364  // class Eos_incomp_newt //
1365  //------------------------------------//
1366 
1367 
1376 class Eos_incomp_newt : public Eos_incomp {
1377 
1378  // Data :
1379  // -----
1380 
1381  // no new data with respect to Eos_incomp
1382 
1383  // Constructors - Destructor
1384  // -------------------------
1385  public:
1386 
1396  Eos_incomp_newt(double rho_c) ;
1397 
1408  Eos_incomp_newt(double rho_c, double ent_c) ;
1409 
1410  Eos_incomp_newt(const Eos_incomp_newt& ) ;
1411 
1412  protected:
1419  Eos_incomp_newt(FILE* ) ;
1420 
1426  Eos_incomp_newt(ifstream& ) ;
1427 
1429  friend Eos* Eos::eos_from_file(FILE* ) ;
1430  friend Eos* Eos::eos_from_file(ifstream& ) ;
1431 
1432  public:
1433  virtual ~Eos_incomp_newt() ;
1434 
1435  // Assignment
1436  // ----------
1438  void operator=(const Eos_incomp_newt& ) ;
1439 
1440 
1441  // Miscellaneous
1442  // -------------
1443 
1444  public :
1446  virtual bool operator==(const Eos& ) const ;
1447 
1449  virtual bool operator!=(const Eos& ) const ;
1450 
1454  virtual int identify() const ;
1455 
1456  // Outputs
1457  // -------
1458 
1459  public:
1460  virtual void sauve(FILE* ) const ;
1461 
1462  protected:
1463  virtual ostream& operator>>(ostream &) const ;
1464 
1465 
1466  // Computational functions
1467  // -----------------------
1468 
1469  public:
1477  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1478 
1486  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1487 
1495  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1496 
1504  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1505 
1513  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1514 
1522  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1523 
1524 };
1525 
1526 
1527  //------------------------------------//
1528  // class Eos_strange //
1529  //------------------------------------//
1530 
1531 
1540 class Eos_strange : public Eos {
1541 
1542  // Data :
1543  // -----
1544 
1545  protected:
1549  double n0_b60 ;
1550 
1552  double b60 ;
1553 
1557  double ent0 ;
1558 
1563  double eps_fit ;
1564 
1568  double rho0_b60 ;
1569 
1573  double n0 ;
1574 
1579  double rho0 ;
1580 
1584  double b34 ;
1585 
1589  double fach ;
1590 
1591  // Constructors - Destructor
1592  // -------------------------
1593  public:
1594 
1610  Eos_strange(double n0_b60_i, double b60_i, double ent0_i,
1611  double eps_fit_i, double rho0_b60_i) ;
1612 
1613 
1614  Eos_strange(const Eos_strange& ) ;
1615 
1616  protected:
1623  Eos_strange(FILE* ) ;
1624 
1630  Eos_strange(ifstream& ) ;
1631 
1633  friend Eos* Eos::eos_from_file(FILE* ) ;
1634  friend Eos* Eos::eos_from_file(ifstream& ) ;
1635 
1636  public:
1637  virtual ~Eos_strange() ;
1638 
1639  // Assignment
1640  // ----------
1642  void operator=(const Eos_strange& ) ;
1643 
1644 
1645  // Miscellaneous
1646  // -------------
1647 
1648  public :
1650  virtual bool operator==(const Eos& ) const ;
1651 
1653  virtual bool operator!=(const Eos& ) const ;
1654 
1658  virtual int identify() const ;
1659 
1663  double get_n0_b60() const {return n0_b60;} ;
1664 
1666  double get_b60() const {return b60;} ;
1667 
1671  double get_ent0() const {return ent0;} ;
1672 
1677  double get_eps_fit() const {return eps_fit;} ;
1678 
1682  double get_rho0_b60() const {return rho0_b60;} ;
1683 
1684  protected:
1689  void set_auxiliary() ;
1690 
1691 
1692  // Outputs
1693  // -------
1694 
1695  public:
1696  virtual void sauve(FILE* ) const ;
1697 
1698  protected:
1699  virtual ostream& operator>>(ostream &) const ;
1700 
1701 
1702  // Computational functions
1703  // -----------------------
1704 
1705  public:
1713  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
1714 
1722  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
1723 
1731  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
1732 
1740  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
1741 
1749  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
1750 
1758  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
1759 
1760 };
1761 
1762 
1763  //------------------------------------//
1764  // class Eos_strange_cr //
1765  //------------------------------------//
1766 
1767 
1779 class Eos_strange_cr : public Eos {
1780 
1781  // Data :
1782  // -----
1783 
1784  protected:
1788  double n0_b60 ;
1789 
1791  double b60 ;
1792 
1796  double ent0 ;
1797 
1802  double eps_fit ;
1803 
1807  double rho0_b60 ;
1808 
1813  double ent_nd ;
1814 
1820  double rho_nd ;
1821 
1825  double gam ;
1826 
1827  // Derived data:
1828  // -------------
1829 
1833  double n0 ;
1834 
1839  double rho0 ;
1840 
1844  double b34 ;
1845 
1849  double fach ;
1850 
1856  double rho_nd_nucl ;
1857 
1861  double x_nd ;
1862 
1864  double ncr_nd ;
1865 
1867  double delent ;
1868 
1870  double unsgam1 ;
1871 
1873  double gam1sx ;
1874 
1875 
1876  // Constructors - Destructor
1877  // -------------------------
1878  public:
1879 
1901  Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i,
1902  double eps_fit_i, double rho0_b60_i,
1903  double ent_nd_i, double rho_nd_i,
1904  double gam_i) ;
1905 
1906 
1907  Eos_strange_cr(const Eos_strange_cr& ) ;
1908 
1909  protected:
1916  Eos_strange_cr(FILE* ) ;
1917 
1923  Eos_strange_cr(ifstream& ) ;
1924 
1926  friend Eos* Eos::eos_from_file(FILE* ) ;
1927  friend Eos* Eos::eos_from_file(ifstream& ) ;
1928 
1929  public:
1930  virtual ~Eos_strange_cr() ;
1931 
1932  // Assignment
1933  // ----------
1935  void operator=(const Eos_strange_cr& ) ;
1936 
1937 
1938  // Miscellaneous
1939  // -------------
1940 
1941  public :
1943  virtual bool operator==(const Eos& ) const ;
1944 
1946  virtual bool operator!=(const Eos& ) const ;
1947 
1951  virtual int identify() const ;
1952 
1956  double get_n0_b60() const {return n0_b60;} ;
1957 
1959  double get_b60() const {return b60;} ;
1960 
1964  double get_ent0() const {return ent0;} ;
1965 
1970  double get_eps_fit() const {return eps_fit;} ;
1971 
1975  double get_rho0_b60() const {return rho0_b60;} ;
1976 
1980  double get_ent_nd() const {return ent_nd;} ;
1981 
1987  double get_rho_nd() const {return rho_nd;} ;
1988 
1991  double get_gam() const {return gam;} ;
1992 
1993 
1994 
1995  protected:
2000  void set_auxiliary() ;
2001 
2002 
2003  // Outputs
2004  // -------
2005 
2006  public:
2007  virtual void sauve(FILE* ) const ;
2008 
2009  protected:
2010  virtual ostream& operator>>(ostream &) const ;
2011 
2012 
2013  // Computational functions
2014  // -----------------------
2015 
2016  public:
2024  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2025 
2033  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2034 
2042  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2043 
2051  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2052 
2060  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2061 
2069  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2070 
2071 };
2072 
2073 
2074  //----------------------------//
2075  // class Eos_Fermi //
2076  //----------------------------//
2077 
2078 
2090 class Eos_Fermi : public Eos {
2091 
2092  // Data :
2093  // -----
2094 
2095  protected:
2099  double m_0 ;
2100 
2103  int g_s ;
2104 
2105 
2107  double n_0 ;
2108 
2112  double ener_0 ;
2113 
2114 
2118  double p_0 ;
2119 
2120  // Constructors - Destructor
2121  // -------------------------
2122  public:
2123 
2129  Eos_Fermi(double mass) ;
2130 
2137  Eos_Fermi(double mass, int g_degen) ;
2138 
2139  Eos_Fermi(const Eos_Fermi& ) ;
2140 
2141  protected:
2148  Eos_Fermi(FILE* ) ;
2149 
2155  Eos_Fermi(ifstream& ) ;
2156 
2158  friend Eos* Eos::eos_from_file(FILE* ) ;
2159  friend Eos* Eos::eos_from_file(ifstream& ) ;
2160 
2161  public:
2162  virtual ~Eos_Fermi() ;
2163 
2164  // Assignment
2165  // ----------
2167  void operator=(const Eos_Fermi& ) ;
2168 
2169 
2170  // Miscellaneous
2171  // -------------
2172 
2173  public :
2175  virtual bool operator==(const Eos& ) const ;
2176 
2178  virtual bool operator!=(const Eos& ) const ;
2179 
2183  virtual int identify() const ;
2184 
2186  double get_m() const ;
2187 
2189  int get_g_degen() const ;
2190 
2191  protected:
2194  void set_auxiliary() ;
2195 
2196 
2197  // Outputs
2198  // -------
2199 
2200  public:
2201  virtual void sauve(FILE* ) const ;
2202 
2203  protected:
2204  virtual ostream& operator>>(ostream &) const ;
2205 
2206 
2207  // Computational functions
2208  // -----------------------
2209 
2210  public:
2218  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2219 
2227  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2228 
2236  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2237 
2245  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2246 
2254  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2255 
2263  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2264 
2265 };
2266 
2267 
2268 
2269 
2270  //------------------------------//
2271  // EOS with domain dependency //
2272  //------------------------------//
2273 
2279 class MEos : public Eos {
2280 
2281  // Data :
2282  // -----
2283 
2284  protected:
2286  const Eos** mono_eos ;
2287 
2289  int ndom ;
2290 
2293 
2294  // Constructors - Destructor
2295  // -------------------------
2296  public:
2297 
2302  MEos(int ndom_i, const Eos** mono_eos_i) ;
2303 
2305  MEos(const Eos& eos1, const Eos& eos2) ;
2306 
2308  MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3) ;
2309 
2311  MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3, const Eos& eos4) ;
2312 
2313  MEos(const MEos& ) ;
2314 
2315  protected:
2322  MEos(FILE* ) ;
2323 
2329  MEos(ifstream& ) ;
2330 
2332  friend Eos* Eos::eos_from_file(FILE* ) ;
2333  friend Eos* Eos::eos_from_file(ifstream& ) ;
2334 
2335  public:
2336  virtual ~MEos() ;
2337 
2338  // Assignment
2339  // ----------
2341  void operator=(const MEos& ) ;
2342 
2343 
2344  // Miscellaneous
2345  // -------------
2346 
2347  public :
2349  virtual bool operator==(const Eos& ) const ;
2350 
2352  virtual bool operator!=(const Eos& ) const ;
2353 
2357  virtual int identify() const ;
2358 
2359  // Outputs
2360  // -------
2361 
2362  public:
2363  virtual void sauve(FILE* ) const ;
2364 
2365  protected:
2366  virtual ostream& operator>>(ostream &) const ;
2367 
2368 
2369  // Computational functions
2370  // -----------------------
2371 
2372  public:
2382  virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
2383 
2393  virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
2394 
2404  virtual double press_ent_p(double ent, const Param* par=0x0) const ;
2405 
2415  virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
2416 
2426  virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
2427 
2437  virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
2438 
2439 };
2440 
2441 }
2442  //------------------//
2443  // Remaining EOS //
2444  //------------------//
2445 
2446 #include "eos_tabul.h"
2447 #include "eos_compose.h"
2448 #include "eos_mag.h"
2449 
2450 #endif
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:446
Degenerate ideal Fermi gas.
Definition: eos.h:2090
double get_m() const
Returns the fermion mass in eV/c2.
Definition: eos_fermi.C:162
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_fermi.C:230
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_fermi.C:264
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:311
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_fermi.C:248
int get_g_degen() const
Returns the degeneracy factor.
Definition: eos_fermi.C:166
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_fermi.C:221
double ener_0
Energy density scale [unit: ], where ].
Definition: eos.h:2112
virtual ~Eos_Fermi()
Destructor.
Definition: eos_fermi.C:123
void operator=(const Eos_Fermi &)
Assignment to another Eos_Fermi.
Definition: eos_fermi.C:132
int g_s
Degeneracy parameter.
Definition: eos.h:2103
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_fermi.C:210
double m_0
Individual particule mass [unit: eV/c2].
Definition: eos.h:2099
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_fermi.C:177
double p_0
Pressure scale [unit: ], where ].
Definition: eos.h:2118
double n_0
Number density scale [unit: ].
Definition: eos.h:2107
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:321
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_fermi.C:282
Eos_Fermi(double mass)
Standard constructor (sets g_s to 2).
Definition: eos_fermi.C:62
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_fermi.C:301
void set_auxiliary()
Computes the auxiliary quantities n_0 , ener_0.
Definition: eos_fermi.C:148
Equation of state of incompressible matter (Newtonian case).
Definition: eos.h:1376
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
virtual ~Eos_incomp_newt()
Destructor.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
Eos_incomp_newt(double rho_c)
Standard constructor.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
void operator=(const Eos_incomp_newt &)
Assignment to another Eos_incomp_newt.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual void sauve(FILE *) const
Save in a file.
Equation of state of incompressible matter (relativistic case).
Definition: eos.h:1206
virtual ~Eos_incomp()
Destructor.
Definition: eos_incomp.C:145
Eos_incomp(double rho_c)
Standard constructor.
Definition: eos_incomp.C:99
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_incomp.C:254
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:283
void operator=(const Eos_incomp &)
Assignment to another Eos_incomp.
Definition: eos_incomp.C:154
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_incomp.C:220
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_incomp.C:211
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_incomp.C:199
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:297
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_incomp.C:240
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_incomp.C:167
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_incomp.C:311
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_incomp.C:268
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
Definition: eos.h:1218
double rho0
Constant density .
Definition: eos.h:1213
Polytropic equation of state (Newtonian case).
Definition: eos.h:1044
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
void operator=(const Eos_poly_newt &)
Assignment to another Eos_poly_newt.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the specific enthalpy.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the specific enthalpy.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
virtual ~Eos_poly_newt()
Destructor.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the specific enthalpy.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the specific enthalpy.
Eos_poly_newt(double gamma, double kappa)
Standard constructor.
Definition: eos_poly_newt.C:94
Polytropic equation of state (relativistic case).
Definition: eos.h:757
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:469
double ent_0
Enthalpy at zero pressure ( )
Definition: eos.h:790
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:438
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_poly.C:382
double kap
Pressure coefficient (cf.
Definition: eos.h:771
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_poly.C:335
Eos_poly(double gamma, double kappa)
Standard constructor (sets both m_0 and mu_0 to 1).
Definition: eos_poly.C:126
double get_mu_0() const
Return the relativistic chemical potential at zero pressure [unit: , with ].
Definition: eos_poly.C:268
double get_gam() const
Returns the adiabatic index (cf. Eq. (3))
Definition: eos_poly.C:256
double gam1sgamkap
Definition: eos.h:788
double unsgam1
Definition: eos.h:787
double gam
Adiabatic index (cf. Eq. (3))
Definition: eos.h:764
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_poly.C:368
void operator=(const Eos_poly &)
Assignment to another Eos_poly.
Definition: eos_poly.C:224
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_poly.C:400
double m_0
Individual particule mass (cf.
Definition: eos.h:776
double mu_0
Relativistic chemical potential at zero pressure [unit: , with ].
Definition: eos.h:782
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_poly.C:418
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_poly.C:324
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_poly.C:278
virtual ~Eos_poly()
Destructor.
Definition: eos_poly.C:215
double get_m_0() const
Return the individual particule mass (cf.
Definition: eos_poly.C:264
double get_kap() const
Returns the pressure coefficient (cf.
Definition: eos_poly.C:260
double rel_mu_0
Definition: eos.h:789
double gam1
Definition: eos.h:786
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_poly.C:347
void set_auxiliary()
Computes the auxiliary quantities gam1 , unsgam1 , gam1sgamkap from the values of gam and kap.
Definition: eos_poly.C:242
Strange matter EOS (MIT Bag model) with crust.
Definition: eos.h:1779
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
double delent
Enthalpy shift in quark phase.
Definition: eos.h:1867
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho0
Energy density at zero pressure.
Definition: eos.h:1839
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double get_rho0_b60() const
Returns the energy density at zero pressure divided by .
Definition: eos.h:1975
double rho_nd_nucl
Energy density at neutron drip point, defining the boundary between crust and core [unit: rho_unit ].
Definition: eos.h:1856
virtual ~Eos_strange_cr()
Destructor.
double rho_nd
Energy density at neutron drip point, defining the boundary between crust and core [unit: ].
Definition: eos.h:1820
double rho0_b60
Energy density at zero pressure divided by .
Definition: eos.h:1807
double get_ent0() const
Returns the log-enthalpy threshold for setting the energy density to a non zero value (should be nega...
Definition: eos.h:1964
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
Definition: eos.h:1796
double ent_nd
Log-enthalpy at neutron drip point, defining the boundary between crust and core.
Definition: eos.h:1813
double get_eps_fit() const
Returns the fitting parameter related to the square of sound velocity by .
Definition: eos.h:1970
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
double get_gam() const
Returns the adiabatic index for the crust model.
Definition: eos.h:1991
double n0_b60
Baryon density at zero pressure divided by .
Definition: eos.h:1788
double b60
Bag constant [unit: ].
Definition: eos.h:1791
Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i, double ent_nd_i, double rho_nd_i, double gam_i)
Standard constructor.
double ncr_nd
Rescaled number density at neutron drip point.
Definition: eos.h:1864
double x_nd
Ratio of pressure to energy density at neutron drip point.
Definition: eos.h:1861
double get_ent_nd() const
Returns the log-enthalpy at neutron drip point, defining the boundary between crust and core.
Definition: eos.h:1980
virtual ostream & operator>>(ostream &) const
Operator >>
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double get_n0_b60() const
Returns the baryon density at zero pressure divided by [unit: ].
Definition: eos.h:1956
void operator=(const Eos_strange_cr &)
Assignment to another Eos_strange.
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters.
double get_rho_nd() const
Returns the energy density at neutron drip point, defining the boundary between crust and core [unit:...
Definition: eos.h:1987
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual void sauve(FILE *) const
Save in a file.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
double eps_fit
Fitting parameter related to the square of sound velocity by .
Definition: eos.h:1802
double get_b60() const
Returns the bag constant [unit: ].
Definition: eos.h:1959
double n0
Baryon density at zero pressure.
Definition: eos.h:1833
double fach
Factor .
Definition: eos.h:1849
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
double gam
Adiabatic index for the crust model.
Definition: eos.h:1825
Strange matter EOS (MIT Bag model).
Definition: eos.h:1540
double get_ent0() const
Returns the log-enthalpy threshold for setting the energy density to a non zero value (should be nega...
Definition: eos.h:1671
double rho0
Energy density at zero pressure.
Definition: eos.h:1579
double get_b60() const
Returns the bag constant [unit: ].
Definition: eos.h:1666
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_strange.C:265
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: eos_strange.C:347
double eps_fit
Fitting parameter related to the square of sound velocity by .
Definition: eos.h:1563
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: eos_strange.C:329
double n0
Baryon density at zero pressure.
Definition: eos.h:1573
virtual void sauve(FILE *) const
Save in a file.
Definition: eos_strange.C:275
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:397
double fach
Factor .
Definition: eos.h:1589
Eos_strange(double n0_b60_i, double b60_i, double ent0_i, double eps_fit_i, double rho0_b60_i)
Standard constructor.
Definition: eos_strange.C:98
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_strange.C:211
void set_auxiliary()
Computes the auxiliary quantities n0 , rh0 , b34 and fach from the values of the other parameters.
Definition: eos_strange.C:191
double b60
Bag constant [unit: ].
Definition: eos.h:1552
double get_eps_fit() const
Returns the fitting parameter related to the square of sound velocity by .
Definition: eos.h:1677
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:379
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
Definition: eos.h:1557
virtual ~Eos_strange()
Destructor.
Definition: eos_strange.C:162
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: eos_strange.C:364
double get_rho0_b60() const
Returns the energy density at zero pressure divided by .
Definition: eos.h:1682
double rho0_b60
Energy density at zero pressure divided by .
Definition: eos.h:1568
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
double get_n0_b60() const
Returns the baryon density at zero pressure divided by [unit: ].
Definition: eos.h:1663
void operator=(const Eos_strange &)
Assignment to another Eos_strange.
Definition: eos_strange.C:172
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_strange.C:287
double n0_b60
Baryon density at zero pressure divided by .
Definition: eos.h:1549
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: eos_strange.C:314
Equation of state base class.
Definition: eos.h:190
Cmp der_press_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:452
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Cmp nbar_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the baryon density field from the log-enthalpy field and extra parameters.
Definition: eos.C:338
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
virtual double press_ent_p(double ent, const Param *par=0x0) const =0
Computes the pressure from the log-enthalpy and extra parameters (virtual function implemented in the...
Cmp ener_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy and extra parameters.
Definition: eos.C:363
void calcule(const Cmp &thermo, int nzet, int l_min, double(Eos::*fait)(double, const Param *) const, const Param *par, Cmp &resu) const
General computational method for Cmp 's.
Definition: eos.C:203
virtual bool operator==(const Eos &) const =0
Comparison operator (egality)
virtual double der_press_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
friend ostream & operator<<(ostream &, const Eos &)
Display.
Definition: eos.C:191
virtual ~Eos()
Destructor.
Definition: eos.C:152
Cmp der_ener_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:430
virtual void sauve(FILE *) const
Save in a file.
Definition: eos.C:179
const char * get_name() const
Returns the EOS name.
Definition: eos.C:169
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy with extra parameters (virtual function im...
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
Cmp press_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the pressure from the log-enthalpy and extra parameters.
Definition: eos.C:385
Eos()
Standard constructor.
Definition: eos.C:108
virtual bool operator!=(const Eos &) const =0
Comparison operator (difference)
virtual double ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the total energy density from the log-enthalpy and extra parameters (virtual function implem...
virtual ostream & operator>>(ostream &) const =0
Operator >>
char name[100]
EOS name.
Definition: eos.h:196
virtual double nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the baryon density from the log-enthalpy and extra parameters (virtual function implemented ...
void set_name(const char *name_i)
Sets the EOS name.
Definition: eos.C:163
Cmp der_nbar_ent(const Cmp &ent, int nzet, int l_min=0, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Definition: eos.C:407
EOS with domain dependency.
Definition: eos.h:2279
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: meos.C:202
virtual ~MEos()
Destructor.
Definition: meos.C:162
void operator=(const MEos &)
Assignment to another MEos.
Definition: meos.C:178
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
Definition: meos.C:275
MEos(int ndom_i, const Eos **mono_eos_i)
Standard constructor.
Definition: meos.C:72
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
Definition: meos.C:264
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:315
virtual void sauve(FILE *) const
Save in a file.
Definition: meos.C:190
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:305
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
Definition: meos.C:295
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: meos.C:222
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
Definition: meos.C:285
bool constructed_from_file
Indicates wether the EOS has been constructed from a file.
Definition: eos.h:2292
const Eos ** mono_eos
Array (upon the domains) containing the various EOS.
Definition: eos.h:2286
int ndom
Number of domains.
Definition: eos.h:2289
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: meos.C:250
Parameter storage.
Definition: param.h:125
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:387
Lorene prototypes.
Definition: app_hor.h:64