eos_fitting.h

00001 /*
00002  *  Definition of Lorene class Eos_fitting
00003  *                             Eos_fit_SLy4
00004  *                             Eos_fit_FPS
00005  *                             Eos_fit_AkmalPR
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 2004 Keisuke Taniguchi
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License version 2
00016  *   as published by the Free Software Foundation.
00017  *
00018  *   LORENE is distributed in the hope that it will be useful,
00019  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *   GNU General Public License for more details.
00022  *
00023  *   You should have received a copy of the GNU General Public License
00024  *   along with LORENE; if not, write to the Free Software
00025  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  */
00028 
00029 #ifndef __EOS_FITTING_H_ 
00030 #define __EOS_FITTING_H_ 
00031 
00032 /*
00033  * $Id: eos_fitting.h,v 1.2 2005/05/22 20:50:39 k_taniguchi Exp $
00034  * $Log: eos_fitting.h,v $
00035  * Revision 1.2  2005/05/22 20:50:39  k_taniguchi
00036  * Introduction of a new class Eos_fit_AkmalPR.
00037  *
00038  * Revision 1.1  2004/09/26 18:50:00  k_taniguchi
00039  * Initial revision
00040  *
00041  *
00042  *
00043  * $Header: /cvsroot/Lorene/C++/Include/eos_fitting.h,v 1.2 2005/05/22 20:50:39 k_taniguchi Exp $
00044  *
00045  */
00046 
00047 // Standard C++
00048 #include "headcpp.h"
00049 
00050 // Headers C
00051 #include <stdio.h>
00052 #include <assert.h>
00053 
00054 // Lorene classes
00055 #include "eos.h"
00056 #include "param.h"
00057 
00058 // External classes which appear in the declaration of class Eos_fitting:
00059 class Tbl ; 
00060 class Cmp ;
00061 class Param ;
00062 class Eos ;
00063 
00064 //-----------------------------------------------------------------------//
00065 //     class Eos_fitting for the analytical fitting of realistic EOS     //
00066 //-----------------------------------------------------------------------//
00067 
00073 class Eos_fitting : public Eos {
00074 
00075     // Data : 
00076     // -----
00077     protected:
00079         char dataname[160] ;
00080 
00082     double* pp ;
00083 
00084     // Constructors - Destructor
00085     // -------------------------
00086     protected:
00087 
00094     Eos_fitting(const char* name_i, const char* data, const char* path) ;
00095 
00096     //  Eos_fitting(const Eos_fitting& ) ;  ///< Copy constructor
00097 
00098     protected:
00105     Eos_fitting(FILE* ) ;
00106 
00115     Eos_fitting(ifstream& ist, const char* data) ;
00116 
00118     friend Eos* Eos::eos_from_file(FILE* ) ;
00119     friend Eos* Eos::eos_from_file(ifstream& ) ;
00120 
00121     public:
00122     virtual ~Eos_fitting() ;        
00123  
00124     // Outputs
00125     // -------
00126     public:
00127     virtual void sauve(FILE *) const ;      
00128 
00129     // Miscellaneous
00130     // -------------
00131     protected:
00135     void read_coef() ;
00136 
00137     // Computational functions
00138     // -----------------------
00139     public:
00149         virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
00150 
00159         virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
00160 
00169         virtual double press_ent_p(double ent, const Param* par=0x0) const ;
00170 
00179         virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
00180 
00189         virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
00190 
00199         virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
00200 
00201 };
00202 
00203 
00204                     //--------------------------------------//
00205                     //          class Eos_fit_SLy4          //
00206                     //--------------------------------------//
00207 
00212 class Eos_fit_SLy4 : public Eos_fitting {
00213 
00214     // Constructors - Destructor
00215     // -------------------------
00216     public:
00217 
00222     Eos_fit_SLy4(const char* path) ;
00223 
00224     protected:
00231     Eos_fit_SLy4(FILE* ) ;
00232 
00241     Eos_fit_SLy4(ifstream& ) ;
00242 
00244     friend Eos* Eos::eos_from_file(FILE* ) ;
00245     friend Eos* Eos::eos_from_file(ifstream& ) ;
00246 
00247     public:
00248     virtual ~Eos_fit_SLy4() ;       
00249  
00250     // Outputs
00251     // -------
00252     protected:
00253     virtual ostream& operator>>(ostream &) const ;    
00254 
00255     // Miscellaneous
00256     // -------------
00257     public :
00259     virtual bool operator==(const Eos& ) const ;
00260 
00262     virtual bool operator!=(const Eos& ) const ;
00263 
00267     virtual int identify() const ;
00268 
00269 };
00270 
00271 
00272                     //-------------------------------------//
00273                     //          class Eos_fit_FPS          //
00274                     //-------------------------------------//
00275 
00280 class Eos_fit_FPS : public Eos_fitting {
00281 
00282     // Constructors - Destructor
00283     // -------------------------
00284     public:
00285 
00290     Eos_fit_FPS(const char* path) ;
00291 
00292     protected:
00299     Eos_fit_FPS(FILE* ) ;
00300 
00309     Eos_fit_FPS(ifstream& ) ;
00310 
00312     friend Eos* Eos::eos_from_file(FILE* ) ;
00313     friend Eos* Eos::eos_from_file(ifstream& ) ;
00314 
00315     public:
00316     virtual ~Eos_fit_FPS() ;        
00317  
00318     // Outputs
00319     // -------
00320     protected:
00321     virtual ostream& operator>>(ostream &) const ;    
00322 
00323     // Miscellaneous
00324     // -------------
00325     public :
00327     virtual bool operator==(const Eos& ) const ;
00328 
00330     virtual bool operator!=(const Eos& ) const ;
00331 
00335     virtual int identify() const ;
00336 
00337 };
00338 
00339 
00340                     //-----------------------------------------//
00341                     //          class Eos_fit_AkmalPR          //
00342                     //-----------------------------------------//
00343 
00348 class Eos_fit_AkmalPR : public Eos_fitting {
00349 
00350     // Constructors - Destructor
00351     // -------------------------
00352     public:
00353 
00358     Eos_fit_AkmalPR(const char* path) ;
00359 
00360     protected:
00367     Eos_fit_AkmalPR(FILE* ) ;
00368 
00377     Eos_fit_AkmalPR(ifstream& ) ;
00378 
00380     friend Eos* Eos::eos_from_file(FILE* ) ;
00381     friend Eos* Eos::eos_from_file(ifstream& ) ;
00382 
00383     public:
00384     virtual ~Eos_fit_AkmalPR() ;        
00385  
00386     // Outputs
00387     // -------
00388     protected:
00389     virtual ostream& operator>>(ostream &) const ;    
00390 
00391     // Miscellaneous
00392     // -------------
00393     public :
00395     virtual bool operator==(const Eos& ) const ;
00396 
00398     virtual bool operator!=(const Eos& ) const ;
00399 
00403     virtual int identify() const ;
00404 
00405 };
00406 
00407 #endif

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