00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef __EOS_FITTING_H_
00030 #define __EOS_FITTING_H_
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #include "headcpp.h"
00049
00050
00051 #include <stdio.h>
00052 #include <assert.h>
00053
00054
00055 #include "eos.h"
00056 #include "param.h"
00057
00058
00059 class Tbl ;
00060 class Cmp ;
00061 class Param ;
00062 class Eos ;
00063
00064
00065
00066
00067
00073 class Eos_fitting : public Eos {
00074
00075
00076
00077 protected:
00079 char dataname[160] ;
00080
00082 double* pp ;
00083
00084
00085
00086 protected:
00087
00094 Eos_fitting(const char* name_i, const char* data, const char* path) ;
00095
00096
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
00125
00126 public:
00127 virtual void sauve(FILE *) const ;
00128
00129
00130
00131 protected:
00135 void read_coef() ;
00136
00137
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
00206
00207
00212 class Eos_fit_SLy4 : public Eos_fitting {
00213
00214
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
00251
00252 protected:
00253 virtual ostream& operator>>(ostream &) const ;
00254
00255
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
00274
00275
00280 class Eos_fit_FPS : public Eos_fitting {
00281
00282
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
00319
00320 protected:
00321 virtual ostream& operator>>(ostream &) const ;
00322
00323
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
00342
00343
00348 class Eos_fit_AkmalPR : public Eos_fitting {
00349
00350
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
00387
00388 protected:
00389 virtual ostream& operator>>(ostream &) const ;
00390
00391
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