eos.h

00001 /*
00002  *  Definition of Lorene classes Eos
00003  *               Eos_poly
00004  *               Eos_poly_newt
00005  *               Eos_incomp
00006  *               Eos_incomp_newt
00007  *               Eos_strange
00008  *               Eos_strange_c
00009  *
00010  */
00011 
00012 /*
00013  *   Copyright (c) 2000-2001 Eric Gourgoulhon
00014  *
00015  *   This file is part of LORENE.
00016  *
00017  *   LORENE is free software; you can redistribute it and/or modify
00018  *   it under the terms of the GNU General Public License as published by
00019  *   the Free Software Foundation; either version 2 of the License, or
00020  *   (at your option) any later version.
00021  *
00022  *   LORENE is distributed in the hope that it will be useful,
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025  *   GNU General Public License for more details.
00026  *
00027  *   You should have received a copy of the GNU General Public License
00028  *   along with LORENE; if not, write to the Free Software
00029  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00030  *
00031  */
00032 
00033 
00034 #ifndef __EOS_H_ 
00035 #define __EOS_H_ 
00036 
00037 /*
00038  * $Id: eos.h,v 1.17 2011/06/16 10:49:18 j_novak Exp $
00039  * $Log: eos.h,v $
00040  * Revision 1.17  2011/06/16 10:49:18  j_novak
00041  * New class Eos_mag for EOSs depending on density and magnetic field.
00042  *
00043  * Revision 1.16  2010/02/02 13:21:52  j_novak
00044  * New class Eos_Compstar.
00045  *
00046  * Revision 1.15  2010/01/23 16:27:11  e_gourgoulhon
00047  * Improved documentation.
00048  *
00049  * Revision 1.14  2005/05/22 20:49:12  k_taniguchi
00050  * Introduction of a new class Eos_fit_AkmalPR.
00051  *
00052  * Revision 1.13  2004/09/26 18:51:47  k_taniguchi
00053  * Introduction of new classes Eos_fitting, Eos_fit_SLy4, and Eos_fit_FPS
00054  *
00055  * Revision 1.12  2004/05/07 08:08:29  k_taniguchi
00056  * Add the case of Eos_multi_poly.C
00057  *
00058  * Revision 1.11  2004/03/22 16:10:20  j_novak
00059  * Excluding some files
00060  *
00061  * Revision 1.10  2004/03/22 13:12:40  j_novak
00062  * Modification of comments to use doxygen instead of doc++
00063  *
00064  * Revision 1.9  2004/01/14 15:52:26  f_limousin
00065  * Added methods calcule, nbar_ent, der_nbar_ent and der_ener_ent for Scalar.
00066  *
00067  * Revision 1.8  2003/12/08 15:48:12  m_bejger
00068  * GlendNH3 (Glendenning 1985, case 3) added
00069  *
00070  * Revision 1.7  2002/10/16 14:36:28  j_novak
00071  * Reorganization of #include instructions of standard C++, in order to
00072  * use experimental version 3 of gcc.
00073  *
00074  * Revision 1.6  2002/09/13 09:17:31  j_novak
00075  * Modif. commentaires
00076  *
00077  * Revision 1.5  2002/06/17 14:05:16  j_novak
00078  * friend functions are now also declared outside the class definition
00079  *
00080  * Revision 1.4  2002/04/11 13:27:48  e_gourgoulhon
00081  * *** empty log message ***
00082  *
00083  * Revision 1.3  2002/04/09 15:19:03  e_gourgoulhon
00084  * Add EOS number 100 in the comments of eos_from_file
00085  *
00086  * Revision 1.2  2002/04/09 14:32:14  e_gourgoulhon
00087  * 1/ Added extra parameters in EOS computational functions (argument par)
00088  * 2/ New class MEos for multi-domain EOS
00089  *
00090  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00091  * LORENE
00092  *
00093  * Revision 2.15  2001/09/12  15:54:17  eric
00094  * Modif documentation eos_from_file.
00095  *
00096  * Revision 2.14  2001/06/13  14:12:18  eric
00097  *  Modif commentaires (mise en conformite Doc++ 3.4.7)
00098  *
00099  * Revision 2.13  2001/02/07  09:33:42  eric
00100  * Suppression des fonctions derent_ent et derent_ent_p.
00101  * Ajout des fonctions donnant les derivees de l'EOS:
00102  *  der_nbar_ent
00103  *  der_ener_ent
00104  *  der_press_ent
00105  *
00106  * Revision 2.12  2000/11/23  14:45:33  eric
00107  * Ajout de l'EOS Eos_strange_cr.
00108  *
00109  * Revision 2.11  2000/11/22  19:28:45  eric
00110  * Ajout de #include "eos_tabul.h" a la fin.
00111  *
00112  * Revision 2.10  2000/10/25  10:55:08  eric
00113  * Eos_strange: modif commentaires.
00114  *
00115  * Revision 2.9  2000/10/24  15:28:43  eric
00116  * Ajout de l'EOS matiere etrange (Eos_strange).
00117  *
00118  * Revision 2.8  2000/06/20  08:34:20  eric
00119  * Ajout des membres get_gam(), ... a Eos_ploy
00120  *
00121  * Revision 2.7  2000/02/14  14:43:22  eric
00122  * Modif commentaires.
00123  *
00124  * Revision 2.6  2000/02/14  14:32:46  eric
00125  * Ajout des constructeurs par lecture de fichier formate.
00126  *
00127  * Revision 2.5  2000/01/21  16:21:12  eric
00128  * Modif commentaires.
00129  *
00130  * Revision 2.4  2000/01/21  15:16:10  eric
00131  * Ajout de la fonction identify()
00132  * Ajout de la fonction de construction a partir d'un fichier
00133  *   static Eos* Eos::eos_from_file(FILE* ).
00134  * Ajout des operateurs de comparaison == et !=
00135  *
00136  * Revision 2.3  2000/01/18  16:10:57  eric
00137  * Ajout des EOS Eos_incomp et Eos_incomp_newt.
00138  *
00139  * Revision 2.2  2000/01/18  15:13:28  eric
00140  * Ajout de l'equation d'etat Eos_poly_newt.
00141  *
00142  * Revision 2.1  2000/01/18  13:46:50  eric
00143  * Premiere version operationnelle
00144  *
00145  * Revision 2.0  2000/01/18  10:46:08  eric
00146  * *** empty log message ***
00147  *
00148  *
00149  * $Header: /cvsroot/Lorene/C++/Include/eos.h,v 1.17 2011/06/16 10:49:18 j_novak Exp $
00150  *
00151  */
00152 
00153 // Standard C++
00154 #include "headcpp.h"
00155 
00156 // Headers C
00157 #include <stdio.h>
00158 
00159 // Lorene classes
00160 class Tbl ;
00161 class Cmp ;
00162 class Scalar ;
00163 class Param ;
00164 
00165             //------------------------------------//
00166             //      base class Eos        //
00167             //------------------------------------//
00168 
00174 class Eos {
00175 
00176     // Data :
00177     // -----
00178 
00179     protected: 
00180     char name[100] ;        
00181 
00182 
00183     // Constructors - Destructor
00184     // -------------------------
00185     protected:
00186     Eos() ;         
00187 
00189     explicit Eos(const char* name_i) ; 
00190 
00191     Eos(const Eos& ) ;  
00192 
00193     protected:
00200     Eos(FILE* ) ; 
00201 
00207     Eos(ifstream& ) ; 
00208     
00209     
00210     public:
00211     virtual ~Eos() ;            
00212 
00213 
00214     // Name manipulation
00215     // -----------------
00216     public:
00217     const char* get_name() const ;  
00218 
00220     void set_name(const char* name_i) ; 
00221     
00222     // Miscellaneous
00223     // -------------
00224     public:
00228     static Eos* eos_from_file(FILE* ) ; 
00229     
00259     static Eos* eos_from_file(ifstream& ) ; 
00260     
00262     virtual bool operator==(const Eos& ) const = 0 ; 
00263 
00265     virtual bool operator!=(const Eos& ) const = 0 ; 
00266     
00270     virtual int identify() const = 0 ; 
00271 
00272     // Outputs
00273     // -------
00274 
00275     public: 
00276     virtual void sauve(FILE* ) const ;  
00277 
00279     friend ostream& operator<<(ostream& , const Eos& ) ;    
00280 
00281     protected: 
00282     virtual ostream& operator>>(ostream &) const = 0 ;    
00283 
00284 
00285     // Computational functions
00286     // -----------------------
00287     protected:
00305     void calcule(const Cmp& thermo, int nzet, int l_min,
00306              double (Eos::*fait)(double, const Param*) const, const Param* par, Cmp& resu) const ;
00307 
00327     void calcule(const Scalar& thermo, int nzet, int l_min,
00328              double (Eos::*fait)(double, const Param*) const, const Param* par, Scalar& resu) const ;
00329 
00330     public:
00343         virtual double nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
00344 
00365         Cmp nbar_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const  ;
00366 
00388         Scalar nbar_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const  ;
00389 
00402         virtual double ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
00403 
00423         Cmp ener_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00424  
00445     Scalar ener_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00446 
00459         virtual double press_ent_p(double ent, const Param* par=0x0) const = 0 ;
00460 
00461 
00481         Cmp press_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00482 
00503         Scalar press_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00504 
00517         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const = 0 ;
00518 
00540         Cmp der_nbar_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00541 
00564     Scalar der_nbar_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00565 
00578         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const = 0 ;
00579 
00601         Cmp der_ener_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00602   
00625     Scalar der_ener_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00626 
00639         virtual double der_press_ent_p(double ent, const Param* par=0x0) const = 0 ;
00640 
00662         Cmp der_press_ent(const Cmp& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00663 
00686     Scalar der_press_ent(const Scalar& ent, int nzet, int l_min = 0, const Param* par=0x0) const ;
00687 
00688 };
00689 ostream& operator<<(ostream& , const Eos& ) ;   
00690 
00691 
00692             //------------------------------------//
00693             //      class Eos_poly        //
00694             //------------------------------------//
00695 
00696 
00740 class Eos_poly : public Eos {
00741 
00742     // Data :
00743     // -----
00744 
00745     protected:
00747     double gam ;
00748 
00754     double kap ; 
00755 
00759     double m_0 ;
00760 
00765         double mu_0 ;
00766 
00767 
00768 
00769     double gam1 ;       
00770     double unsgam1 ;    
00771     double gam1sgamkap ; 
00772         double rel_mu_0 ;       
00773         double ent_0 ;          
00774 
00775     // Constructors - Destructor
00776     // -------------------------
00777     public:
00778 
00792     Eos_poly(double gamma, double kappa) ;
00793 
00806     Eos_poly(double gamma, double kappa, double mass) ;
00807 
00824     Eos_poly(double gamma, double kappa, double mass, double mu_zero) ;
00825 
00826     Eos_poly(const Eos_poly& ) ;    
00827     
00828     protected:
00835     Eos_poly(FILE* ) ;
00836 
00842     Eos_poly(ifstream& ) ;
00843 
00845     friend Eos* Eos::eos_from_file(FILE* ) ;
00846     friend Eos* Eos::eos_from_file(ifstream& ) ; 
00847 
00848     public:
00849     virtual ~Eos_poly() ;           
00850 
00851     // Assignment
00852     // ----------
00854     void operator=(const Eos_poly& ) ;
00855 
00856 
00857     // Miscellaneous
00858     // -------------
00859 
00860     public :
00862     virtual bool operator==(const Eos& ) const ;
00863 
00865     virtual bool operator!=(const Eos& ) const ;
00866 
00870     virtual int identify() const ; 
00871 
00873     double get_gam() const ;
00874 
00880     double get_kap() const ;
00881     
00886     double get_m_0() const ;
00887 
00891     double get_mu_0() const ;
00892 
00893     protected:
00897     void set_auxiliary() ;
00898 
00899 
00900     // Outputs
00901     // -------
00902 
00903     public:
00904     virtual void sauve(FILE* ) const ;  
00905 
00906     protected:
00907     virtual ostream& operator>>(ostream &) const ;    
00908 
00909 
00910     // Computational functions
00911     // -----------------------
00912 
00913     public:
00923         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
00924 
00934         virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
00935 
00945         virtual double press_ent_p(double ent, const Param* par=0x0) const ;
00946 
00956         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
00957 
00967         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
00968 
00978         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
00979        
00980 };
00981 
00982             //------------------------------------//
00983             //      class Eos_poly_newt   //
00984             //------------------------------------//
00985 
00986 
00987 
01027 class Eos_poly_newt : public Eos_poly {
01028 
01029     // Data :
01030     // -----
01031 
01032     // no new data with respect to Eos_poly 
01033 
01034     // Constructors - Destructor
01035     // -------------------------
01036     public:
01037     
01051     Eos_poly_newt(double gamma, double kappa) ; 
01052 
01053     Eos_poly_newt(const Eos_poly_newt& ) ;  
01054 
01055     protected:
01062     Eos_poly_newt(FILE* ) ; 
01063     
01069     Eos_poly_newt(ifstream& ) ; 
01070     
01072     friend Eos* Eos::eos_from_file(FILE* ) ; 
01073     friend Eos* Eos::eos_from_file(ifstream& ) ; 
01074 
01075 
01076     public:
01077     virtual ~Eos_poly_newt() ;          
01078 
01079     // Assignment
01080     // ----------
01082     void operator=(const Eos_poly_newt& ) ;
01083 
01084     // Miscellaneous
01085     // -------------
01086 
01087     public : 
01089     virtual bool operator==(const Eos& ) const ; 
01090 
01092     virtual bool operator!=(const Eos& ) const ; 
01093     
01097     virtual int identify() const ; 
01098 
01099     // Outputs
01100     // -------
01101 
01102     public: 
01103     virtual void sauve(FILE* ) const ;  
01104 
01105     protected: 
01106     virtual ostream& operator>>(ostream &) const ;    
01107 
01108 
01109     // Computational functions
01110     // -----------------------
01111 
01112     public: 
01121         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ; 
01122     
01131         virtual double ener_ent_p(double ent, const Param* par=0x0) const ; 
01132        
01141         virtual double press_ent_p(double ent, const Param* par=0x0) const ; 
01142        
01151         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ; 
01152        
01161         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ; 
01162        
01171         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ; 
01172        
01173 };
01174 
01175 
01176             //------------------------------------//
01177             //      class Eos_incomp      //
01178             //------------------------------------//
01179 
01180 
01189 class Eos_incomp : public Eos {
01190 
01191     // Data :
01192     // -----
01193 
01194     protected: 
01196     double rho0 ;
01197     
01201     double ent0 ;   
01202 
01203     // Constructors - Destructor
01204     // -------------------------
01205     public:
01206     
01216     Eos_incomp(double rho_c) ;  
01217 
01228     Eos_incomp(double rho_c, double ent_c) ;    
01229 
01230     Eos_incomp(const Eos_incomp& ) ;    
01231 
01232     protected:
01239     Eos_incomp(FILE* ) ; 
01240     
01246     Eos_incomp(ifstream& ) ; 
01247     
01249     friend Eos* Eos::eos_from_file(FILE* ) ; 
01250     friend Eos* Eos::eos_from_file(ifstream& ) ; 
01251 
01252     public:
01253     virtual ~Eos_incomp() ;         
01254 
01255     // Assignment
01256     // ----------
01258     void operator=(const Eos_incomp& ) ;
01259     
01260 
01261     // Miscellaneous
01262     // -------------
01263 
01264     public : 
01266     virtual bool operator==(const Eos& ) const ; 
01267 
01269     virtual bool operator!=(const Eos& ) const ; 
01270     
01274     virtual int identify() const ; 
01275 
01276     // Outputs
01277     // -------
01278 
01279     public: 
01280     virtual void sauve(FILE* ) const ;  
01281 
01282     protected: 
01283     virtual ostream& operator>>(ostream &) const ;    
01284 
01285 
01286     // Computational functions
01287     // -----------------------
01288 
01289     public: 
01297         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ; 
01298     
01306         virtual double ener_ent_p(double ent, const Param* par=0x0) const ; 
01307        
01315         virtual double press_ent_p(double ent, const Param* par=0x0) const ; 
01316        
01324         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ; 
01325        
01333         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ; 
01334        
01342         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ; 
01343 
01344 };
01345 
01346             //------------------------------------//
01347             //     class Eos_incomp_newt      //
01348             //------------------------------------//
01349 
01350 
01359 class Eos_incomp_newt : public Eos_incomp {
01360 
01361     // Data :
01362     // -----
01363 
01364     // no new data with respect to Eos_incomp
01365     
01366     // Constructors - Destructor
01367     // -------------------------
01368     public:
01369     
01379     Eos_incomp_newt(double rho_c) ; 
01380 
01391     Eos_incomp_newt(double rho_c, double ent_c) ;   
01392 
01393     Eos_incomp_newt(const Eos_incomp_newt& ) ;  
01394 
01395     protected:
01402     Eos_incomp_newt(FILE* ) ; 
01403     
01409     Eos_incomp_newt(ifstream& ) ; 
01410     
01412     friend Eos* Eos::eos_from_file(FILE* ) ; 
01413     friend Eos* Eos::eos_from_file(ifstream& ) ; 
01414 
01415     public:
01416     virtual ~Eos_incomp_newt() ;            
01417 
01418     // Assignment
01419     // ----------
01421     void operator=(const Eos_incomp_newt& ) ;
01422     
01423 
01424     // Miscellaneous
01425     // -------------
01426 
01427     public : 
01429     virtual bool operator==(const Eos& ) const ; 
01430 
01432     virtual bool operator!=(const Eos& ) const ; 
01433     
01437     virtual int identify() const ; 
01438 
01439     // Outputs
01440     // -------
01441 
01442     public: 
01443     virtual void sauve(FILE* ) const ;  
01444 
01445     protected: 
01446     virtual ostream& operator>>(ostream &) const ;    
01447 
01448 
01449     // Computational functions
01450     // -----------------------
01451 
01452     public: 
01460         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ; 
01461     
01469         virtual double ener_ent_p(double ent, const Param* par=0x0) const ; 
01470        
01478         virtual double press_ent_p(double ent, const Param* par=0x0) const ; 
01479        
01487         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ; 
01488        
01496         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ; 
01497        
01505         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ; 
01506        
01507 };
01508 
01509 
01510             //------------------------------------//
01511             //      class Eos_strange     //
01512             //------------------------------------//
01513 
01514 
01523 class Eos_strange : public Eos {
01524 
01525     // Data :
01526     // -----
01527 
01528     protected: 
01532     double n0_b60 ; 
01533     
01535     double b60 ;
01536     
01540     double ent0 ;   
01541     
01546     double eps_fit ; 
01547     
01551     double rho0_b60 ; 
01552     
01556     double n0 ; 
01557     
01562     double rho0 ; 
01563 
01567     double b34 ;
01568     
01572     double fach ; 
01573 
01574     // Constructors - Destructor
01575     // -------------------------
01576     public:
01577     
01593     Eos_strange(double n0_b60_i, double b60_i, double ent0_i, 
01594             double eps_fit_i, double rho0_b60_i) ;  
01595 
01596 
01597     Eos_strange(const Eos_strange& ) ;  
01598     
01599     protected:
01606     Eos_strange(FILE* ) ; 
01607     
01613     Eos_strange(ifstream& ) ; 
01614     
01616     friend Eos* Eos::eos_from_file(FILE* ) ; 
01617     friend Eos* Eos::eos_from_file(ifstream& ) ; 
01618 
01619     public:
01620     virtual ~Eos_strange() ;            
01621 
01622     // Assignment
01623     // ----------
01625     void operator=(const Eos_strange& ) ;
01626 
01627 
01628     // Miscellaneous
01629     // -------------
01630 
01631     public : 
01633     virtual bool operator==(const Eos& ) const ; 
01634 
01636     virtual bool operator!=(const Eos& ) const ; 
01637     
01641     virtual int identify() const ; 
01642 
01646     double get_n0_b60() const {return n0_b60;} ; 
01647     
01649     double get_b60() const {return b60;} ;
01650     
01654     double get_ent0() const {return ent0;} ;    
01655     
01660     double get_eps_fit() const {return eps_fit;} ; 
01661     
01665     double get_rho0_b60() const {return rho0_b60;} ; 
01666     
01667     protected:
01672     void set_auxiliary() ; 
01673     
01674 
01675     // Outputs
01676     // -------
01677 
01678     public: 
01679     virtual void sauve(FILE* ) const ;  
01680 
01681     protected: 
01682     virtual ostream& operator>>(ostream &) const ;    
01683 
01684 
01685     // Computational functions
01686     // -----------------------
01687 
01688     public: 
01696         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ; 
01697     
01705         virtual double ener_ent_p(double ent, const Param* par=0x0) const ; 
01706        
01714         virtual double press_ent_p(double ent, const Param* par=0x0) const ; 
01715        
01723         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ; 
01724        
01732         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ; 
01733        
01741         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ; 
01742 
01743 };
01744 
01745 
01746             //------------------------------------//
01747             //      class Eos_strange_cr      //
01748             //------------------------------------//
01749 
01750 
01762 class Eos_strange_cr : public Eos {
01763 
01764     // Data :
01765     // -----
01766 
01767     protected:
01771     double n0_b60 ;
01772     
01774     double b60 ;
01775     
01779     double ent0 ;   
01780     
01785     double eps_fit ;
01786     
01790     double rho0_b60 ;
01791     
01796      double ent_nd ;
01797     
01803      double rho_nd ;
01804     
01808     double gam ;
01809 
01810     // Derived data:
01811     // -------------
01812 
01816     double n0 ;
01817     
01822     double rho0 ;
01823 
01827     double b34 ;
01828     
01832     double fach ;
01833     
01839      double rho_nd_nucl ;
01840     
01844     double x_nd ;
01845 
01847     double ncr_nd ;
01848 
01850     double delent ;
01851 
01853     double unsgam1 ;
01854 
01856     double gam1sx ;
01857 
01858     
01859     // Constructors - Destructor
01860     // -------------------------
01861     public:
01862 
01884     Eos_strange_cr(double n0_b60_i, double b60_i, double ent0_i,
01885             double eps_fit_i, double rho0_b60_i,
01886             double ent_nd_i, double rho_nd_i,
01887             double gam_i) ; 
01888 
01889 
01890     Eos_strange_cr(const Eos_strange_cr& ) ; 
01891     
01892     protected:
01899     Eos_strange_cr(FILE* ) ;
01900     
01906     Eos_strange_cr(ifstream& ) ;
01907     
01909     friend Eos* Eos::eos_from_file(FILE* ) ;
01910     friend Eos* Eos::eos_from_file(ifstream& ) ;
01911 
01912     public:
01913     virtual ~Eos_strange_cr() ;     
01914 
01915     // Assignment
01916     // ----------
01918     void operator=(const Eos_strange_cr& ) ;
01919 
01920 
01921     // Miscellaneous
01922     // -------------
01923 
01924     public :
01926     virtual bool operator==(const Eos& ) const ;
01927 
01929     virtual bool operator!=(const Eos& ) const ;
01930 
01934     virtual int identify() const ;
01935 
01939     double get_n0_b60() const {return n0_b60;} ;
01940     
01942     double get_b60() const {return b60;} ;
01943     
01947     double get_ent0() const {return ent0;} ;    
01948     
01953     double get_eps_fit() const {return eps_fit;} ;
01954     
01958     double get_rho0_b60() const {return rho0_b60;} ;
01959     
01963     double get_ent_nd() const {return ent_nd;} ;
01964     
01970     double get_rho_nd() const {return rho_nd;} ;
01971     
01974     double get_gam() const {return gam;} ;
01975     
01976 
01977 
01978     protected:
01983     void set_auxiliary() ;
01984 
01985 
01986     // Outputs
01987     // -------
01988 
01989     public:
01990     virtual void sauve(FILE* ) const ;  
01991 
01992     protected:
01993     virtual ostream& operator>>(ostream &) const ;    
01994 
01995 
01996     // Computational functions
01997     // -----------------------
01998 
01999     public:
02007         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
02008 
02016         virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
02017 
02025         virtual double press_ent_p(double ent, const Param* par=0x0) const ;
02026 
02034         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ; 
02035        
02043         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ; 
02044        
02052         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
02053 
02054 };
02055 
02056 
02057                 //------------------------------//
02058                 //  EOS with domain dependency //
02059               //------------------------------//
02060 
02066 class MEos : public Eos {
02067 
02068     // Data :
02069     // -----
02070 
02071     protected:
02073     const Eos** mono_eos ;
02074 
02076     int ndom ;
02077 
02079     bool constructed_from_file ;
02080 
02081     // Constructors - Destructor
02082     // -------------------------
02083     public:
02084 
02089     MEos(int ndom_i, const Eos** mono_eos_i) ;
02090 
02092         MEos(const Eos& eos1, const Eos& eos2) ;
02093 
02095         MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3) ;
02096 
02098        MEos(const Eos& eos1, const Eos& eos2, const Eos& eos3, const Eos& eos4) ;
02099 
02100     MEos(const MEos& ) ;    
02101 
02102     protected:
02109     MEos(FILE* ) ;
02110 
02116     MEos(ifstream& ) ;
02117 
02119     friend Eos* Eos::eos_from_file(FILE* ) ;
02120     friend Eos* Eos::eos_from_file(ifstream& ) ;
02121 
02122     public:
02123     virtual ~MEos() ;           
02124 
02125     // Assignment
02126     // ----------
02128     void operator=(const MEos& ) ;
02129 
02130 
02131     // Miscellaneous
02132     // -------------
02133 
02134     public :
02136     virtual bool operator==(const Eos& ) const ;
02137 
02139     virtual bool operator!=(const Eos& ) const ;
02140 
02144     virtual int identify() const ;
02145 
02146     // Outputs
02147     // -------
02148 
02149     public:
02150     virtual void sauve(FILE* ) const ;  
02151 
02152     protected:
02153     virtual ostream& operator>>(ostream &) const ;    
02154 
02155 
02156     // Computational functions
02157     // -----------------------
02158 
02159     public:
02169         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
02170 
02180         virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
02181 
02191         virtual double press_ent_p(double ent, const Param* par=0x0) const ;
02192 
02202         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
02203 
02213         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
02214 
02224         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
02225 
02226 };
02227 
02228 
02229         //------------------//
02230         //  Remaining EOS   //
02231         //------------------//
02232         
02233 #include "eos_tabul.h"
02234 #include "eos_mag.h"        
02235 
02236 #endif

Generated on Tue Feb 7 01:35:16 2012 for LORENE by  doxygen 1.4.6