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
00030
00031
00032
00033
00034 #ifndef __EOS_TABUL_H_
00035 #define __EOS_TABUL_H_
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 #include "headcpp.h"
00101
00102
00103 #include <stdio.h>
00104
00105
00106 class Tbl ;
00107 class Cmp ;
00108
00109
00110
00111
00112
00113
00114
00129 class Eos_tabul : public Eos {
00130
00131
00132
00133
00134 protected:
00136 char tablename[160] ;
00137
00139 double hmin ;
00140
00142 double hmax ;
00143
00145 Tbl* logh ;
00146
00148 Tbl* logp ;
00149
00151 Tbl* dlpsdlh ;
00152
00154 Tbl* lognb ;
00155
00157 Tbl* dlpsdlnb ;
00158
00159 double* press ;
00160 double* nb ;
00161 double* ro ;
00162
00163
00164
00165
00166 protected:
00167
00174 Eos_tabul(const char* name_i, const char* table, const char* path) ;
00175
00182 Eos_tabul(const char* name_i, const char* file_name) ;
00183
00184 Eos_tabul(const Eos_tabul& ) ;
00185
00186 protected:
00187
00194 Eos_tabul(FILE* ) ;
00195
00206 Eos_tabul(ifstream& ist, const char* table) ;
00207
00218 Eos_tabul(ifstream& ist) ;
00219
00221 friend Eos* Eos::eos_from_file(FILE* ) ;
00222 friend Eos* Eos::eos_from_file(ifstream& ) ;
00223
00224 public:
00225 virtual ~Eos_tabul() ;
00226
00227
00228
00229
00230
00231 protected:
00235 void read_table() ;
00236
00237
00238
00239
00240
00241 public:
00242 virtual void sauve(FILE* ) const ;
00243
00244
00245
00246
00247
00248 public:
00256 virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
00257
00258
00259
00260
00261
00269 virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
00270
00278 virtual double press_ent_p(double ent, const Param* par=0x0) const ;
00279
00280
00281
00282
00290 virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
00291
00299 virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
00300
00308 virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
00309
00318 virtual double der_press_nbar_p(double ent, const Param* par=0x0) const ;
00319
00320 };
00321
00322
00323
00324
00325
00326
00339 class Eos_SLy4 : public Eos_tabul {
00340
00341
00342
00343
00344 public:
00345
00350 Eos_SLy4(const char* path) ;
00351
00352
00353 protected:
00360 Eos_SLy4(FILE* ) ;
00361
00367 Eos_SLy4(ifstream& ) ;
00368
00369 private:
00373 Eos_SLy4(const Eos_SLy4& ) ;
00374
00375
00377 friend Eos* Eos::eos_from_file(FILE* ) ;
00378 friend Eos* Eos::eos_from_file(ifstream& ) ;
00379
00380 public:
00381 virtual ~Eos_SLy4() ;
00382
00383
00384
00385
00386 public :
00388 virtual bool operator==(const Eos& ) const ;
00389
00391 virtual bool operator!=(const Eos& ) const ;
00392
00396 virtual int identify() const ;
00397
00398
00399
00400
00401 protected:
00402 virtual ostream& operator>>(ostream &) const ;
00403
00404
00405 };
00406
00407
00408
00409
00410
00411
00418 class Eos_FPS : public Eos_tabul {
00419
00420
00421
00422
00423 public:
00424
00429 Eos_FPS(const char* path) ;
00430
00431
00432 protected:
00439 Eos_FPS(FILE* ) ;
00440
00446 Eos_FPS(ifstream& ) ;
00447
00448 private:
00452 Eos_FPS(const Eos_FPS& ) ;
00453
00454
00456 friend Eos* Eos::eos_from_file(FILE* ) ;
00457 friend Eos* Eos::eos_from_file(ifstream& ) ;
00458
00459 public:
00460 virtual ~Eos_FPS() ;
00461
00462
00463
00464
00465 public :
00467 virtual bool operator==(const Eos& ) const ;
00468
00470 virtual bool operator!=(const Eos& ) const ;
00471
00475 virtual int identify() const ;
00476
00477
00478
00479
00480 protected:
00481 virtual ostream& operator>>(ostream &) const ;
00482
00483
00484 };
00485
00486
00487
00488
00489
00490
00496 class Eos_BPAL12 : public Eos_tabul {
00497
00498
00499
00500
00501 public:
00502
00507 Eos_BPAL12(const char* path) ;
00508
00509
00510 protected:
00517 Eos_BPAL12(FILE* ) ;
00518
00524 Eos_BPAL12(ifstream& ) ;
00525
00526 private:
00530 Eos_BPAL12(const Eos_BPAL12& ) ;
00531
00532
00534 friend Eos* Eos::eos_from_file(FILE* ) ;
00535 friend Eos* Eos::eos_from_file(ifstream& ) ;
00536
00537 public:
00538 virtual ~Eos_BPAL12() ;
00539
00540
00541
00542
00543 public :
00545 virtual bool operator==(const Eos& ) const ;
00546
00548 virtual bool operator!=(const Eos& ) const ;
00549
00553 virtual int identify() const ;
00554
00555
00556
00557
00558 protected:
00559 virtual ostream& operator>>(ostream &) const ;
00560
00561
00562 };
00563
00564
00565
00566
00567
00568
00569
00583 class Eos_AkmalPR : public Eos_tabul {
00584
00585
00586
00587
00588 public:
00589
00594 Eos_AkmalPR(const char* path) ;
00595
00596
00597 protected:
00604 Eos_AkmalPR(FILE* ) ;
00605
00611 Eos_AkmalPR(ifstream& ) ;
00612
00613 private:
00617 Eos_AkmalPR(const Eos_AkmalPR& ) ;
00618
00619
00621 friend Eos* Eos::eos_from_file(FILE* ) ;
00622 friend Eos* Eos::eos_from_file(ifstream& ) ;
00623
00624 public:
00625 virtual ~Eos_AkmalPR() ;
00626
00627
00628
00629
00630 public :
00632 virtual bool operator==(const Eos& ) const ;
00633
00635 virtual bool operator!=(const Eos& ) const ;
00636
00640 virtual int identify() const ;
00641
00642
00643
00644
00645 protected:
00646 virtual ostream& operator>>(ostream &) const ;
00647
00648
00649 };
00650
00651
00652
00653
00654
00655
00666 class Eos_BBB2 : public Eos_tabul {
00667
00668
00669
00670
00671 public:
00672
00677 Eos_BBB2(const char* path) ;
00678
00679
00680 protected:
00687 Eos_BBB2(FILE* ) ;
00688
00694 Eos_BBB2(ifstream& ) ;
00695
00696 private:
00700 Eos_BBB2(const Eos_BBB2& ) ;
00701
00702
00704 friend Eos* Eos::eos_from_file(FILE* ) ;
00705 friend Eos* Eos::eos_from_file(ifstream& ) ;
00706
00707 public:
00708 virtual ~Eos_BBB2() ;
00709
00710
00711
00712
00713 public :
00715 virtual bool operator==(const Eos& ) const ;
00716
00718 virtual bool operator!=(const Eos& ) const ;
00719
00723 virtual int identify() const ;
00724
00725
00726
00727
00728 protected:
00729 virtual ostream& operator>>(ostream &) const ;
00730
00731
00732 };
00733
00734
00735
00736
00737
00738
00739
00745 class Eos_BalbN1H1 : public Eos_tabul {
00746
00747
00748
00749
00750 public:
00751
00756 Eos_BalbN1H1(const char* path) ;
00757
00758
00759 protected:
00766 Eos_BalbN1H1(FILE* ) ;
00767
00773 Eos_BalbN1H1(ifstream& ) ;
00774
00775 private:
00779 Eos_BalbN1H1(const Eos_BalbN1H1& ) ;
00780
00781
00783 friend Eos* Eos::eos_from_file(FILE* ) ;
00784 friend Eos* Eos::eos_from_file(ifstream& ) ;
00785
00786 public:
00787 virtual ~Eos_BalbN1H1() ;
00788
00789
00790
00791
00792 public :
00794 virtual bool operator==(const Eos& ) const ;
00795
00797 virtual bool operator!=(const Eos& ) const ;
00798
00802 virtual int identify() const ;
00803
00804
00805
00806
00807 protected:
00808 virtual ostream& operator>>(ostream &) const ;
00809
00810
00811 };
00812
00813
00814
00815
00816
00817
00818
00819
00826 class Eos_GlendNH3 : public Eos_tabul {
00827
00828
00829
00830
00831 public:
00832
00837 Eos_GlendNH3(const char* path) ;
00838
00839
00840 protected:
00847 Eos_GlendNH3(FILE* ) ;
00848
00854 Eos_GlendNH3(ifstream& ) ;
00855
00856 private:
00860 Eos_GlendNH3(const Eos_GlendNH3& ) ;
00861
00862
00864 friend Eos* Eos::eos_from_file(FILE* ) ;
00865 friend Eos* Eos::eos_from_file(ifstream& ) ;
00866
00867 public:
00868 virtual ~Eos_GlendNH3() ;
00869
00870
00871
00872
00873 public :
00875 virtual bool operator==(const Eos& ) const ;
00876
00878 virtual bool operator!=(const Eos& ) const ;
00879
00883 virtual int identify() const ;
00884
00885
00886
00887
00888 protected:
00889 virtual ostream& operator>>(ostream &) const ;
00890
00891
00892 };
00893
00894
00895
00896
00897
00898
00910 class Eos_Compstar : public Eos_tabul {
00911
00912
00913
00914
00915 public:
00916
00922 Eos_Compstar(const char* file_name) ;
00923
00924
00925 protected:
00932 Eos_Compstar(FILE* ) ;
00933
00939 Eos_Compstar(ifstream& ) ;
00940
00941 private:
00945 Eos_Compstar(const Eos_Compstar& ) ;
00946
00947
00949 friend Eos* Eos::eos_from_file(FILE* ) ;
00950 friend Eos* Eos::eos_from_file(ifstream& ) ;
00951
00952 public:
00953 virtual ~Eos_Compstar() ;
00954
00955
00956
00957
00958 public :
00960 virtual bool operator==(const Eos& ) const ;
00961
00963 virtual bool operator!=(const Eos& ) const ;
00964
00968 virtual int identify() const ;
00969
00970
00971
00972
00973 protected:
00974 virtual ostream& operator>>(ostream &) const ;
00975
00976
00977 };
00978
00979
00980
00981 #endif
00982