Debian Codegraph @

C++/Include/eos_tabul.h

raw symbols SCIP
1 /*
2 * Definition of Lorene classes Eos_tabul
3 * Eos_SLy4
4 * Eos_FPS
5 * Eos_BPAL12
6 * Eos_AkmalPR
7 * Eos_BBB2
8 * Eos_BalbN1H1
9 * Eos_GlendNH3
10 */
11
12 /*
13 * Copyright (c) 2000-2001 Eric Gourgoulhon
14 * (c) 2014 Jerome Novak
15 *
16 * This file is part of LORENE.
17 *
18 * LORENE is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * LORENE is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with LORENE; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 *
32 */
33
34
35 #ifndef __EOS_TABUL_H_
36 #define __EOS_TABUL_H_
37
38 /*
39 * $Id: eos_tabul.h,v 1.16 2015/08/04 14:41:28 j_novak Exp $
40 * $Log: eos_tabul.h,v $
41 * Revision 1.16 2015/08/04 14:41:28 j_novak
42 * Back to previous version for Eos_CompOSE. Enthalpy-consistent EoS can be accessed using Eos_consistent class (derived from Eos_CompOSE).
43 *
44 * Revision 1.15 2015/01/27 14:22:38 j_novak
45 * New methods in Eos_tabul to correct for EoS themro consistency (optional).
46 *
47 * Revision 1.14 2014/10/13 08:52:34 j_novak
48 * Lorene classes and functions now belong to the namespace Lorene.
49 *
50 * Revision 1.13 2014/07/01 09:26:20 j_novak
51 * Improvement of comments
52 *
53 * Revision 1.12 2014/06/30 16:13:18 j_novak
54 * New methods for reading directly from CompOSE files.
55 *
56 * Revision 1.11 2014/03/06 15:53:34 j_novak
57 * Eos_compstar is now Eos_compOSE. Eos_tabul uses strings and contains informations about authors.
58 *
59 * Revision 1.10 2010/02/02 14:26:10 j_novak
60 * *** empty log message ***
61 *
62 * Revision 1.9 2010/02/02 13:21:52 j_novak
63 * New class Eos_Compstar.
64 *
65 * Revision 1.8 2004/03/22 13:12:41 j_novak
66 * Modification of comments to use doxygen instead of doc++
67 *
68 * Revision 1.7 2003/12/08 15:48:43 m_bejger
69 * GlendNH3 EOS (Glendenning 1985, case 3) added
70 *
71 * Revision 1.6 2003/11/25 13:44:15 m_bejger
72 * Declared some vectors for Eos_tabul::read_table()
73 *
74 * Revision 1.5 2003/11/21 16:19:09 m_bejger
75 * Added new tables: lognb, dlpsdlnb
76 *
77 * Revision 1.4 2002/10/16 14:36:29 j_novak
78 * Reorganization of #include instructions of standard C++, in order to
79 * use experimental version 3 of gcc.
80 *
81 * Revision 1.3 2002/09/13 09:17:31 j_novak
82 * Modif. commentaires
83 *
84 * Revision 1.2 2002/04/09 14:32:15 e_gourgoulhon
85 * 1/ Added extra parameters in EOS computational functions (argument par)
86 * 2/ New class MEos for multi-domain EOS
87 *
88 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
89 * LORENE
90 *
91 * Revision 2.5 2001/09/11 16:15:46 eric
92 * Ajout des classes Eos_BBB2 et Eos_BalbN1H1
93 *
94 * Revision 2.4 2001/09/11 15:05:48 eric
95 * Ajout de la classe Eos_AkmalPR
96 *
97 * Revision 2.3 2001/03/23 13:40:23 eric
98 * Modifs commentaires.
99 *
100 * Revision 2.2 2001/02/07 09:45:28 eric
101 * Suppression de la fonction derent_ent_p.
102 * Ajout des fonctions donnant les derivees de l'EOS:
103 * der_nbar_ent_p
104 * der_ener_ent_p
105 * der_press_ent_p
106 *
107 * Revision 2.1 2000/11/23 22:33:48 eric
108 * Ajout de Eos_BPAL12.
109 *
110 * Revision 2.0 2000/11/22 19:29:18 eric
111 * *** empty log message ***
112 *
113 *
114 * $Header: /cvsroot/Lorene/C++/Include/eos_tabul.h,v 1.16 2015/08/04 14:41:28 j_novak Exp $
115 *
116 */
117
118 // Standard C++
119 #include <string>
120 #include "headcpp.h"
121
122 // Headers C
123 #include <cstdio>
124
125 // Lorene classes
126 namespace Lorene {
127 class Tbl ;
128
129
130 //------------------------------------//
131 // class Eos_tabul //
132 //------------------------------------//
133
134
135 /**
136 * Base class for tabulated equations of state. \ingroup (eos)
137 *
138 * The interpolation through the tables is
139 * a cubic Hermite interpolation, which is
140 * thermodynamically consistent, i.e. preserves the
141 * Gibbs-Duhem relation. It is defined in
142 * [Nozawa, Stergioulas, Gourgoulhon \& Eriguchi,
143 * \a Astron. \a Astrophys. Suppl. Ser. \b 132 , 431 (1998)],
144 * and derives from a general technique presented in
145 * [Swesty, \a J. \a Comp. \a Phys. \b 127 , 118 (1996)].
146 *
147 *
148 */
149 class Eos_tabul : public Eos {
150
151 // Data :
152 // -----
153
154 protected:
155 /// Name of the file containing the tabulated data
156 string tablename ;
157
158 string authors ; ///<Authors - reference for the table
159
160 /// Lower boundary of the enthalpy interval
161 double hmin ;
162
163 /// Upper boundary of the enthalpy interval
164 double hmax ;
165
166 /// Table of \f$\log H\f$
167 Tbl* logh ;
168
169 /// Table of \f$\log p\f$
170 Tbl* logp ;
171
172 /// Table of \f$d\log P/d\log H\f$
173 Tbl* dlpsdlh ;
174
175 /// Table of \f$\log n_b\f$
176 Tbl* lognb ;
177
178 /// Table of \f$d\log P/d\log nb\f$
179 Tbl* dlpsdlnb ;
180
181 double* press ;
182 double* nb ;
183 double* ro ;
184
185
186 // Constructors - Destructor
187 // -------------------------
188 protected:
189
190 /** Standard constructor.
191 *
192 * @param name_i Name of the equation of state
193 * @param table Name of the file containing the EOS table
194 * @param path Path to the directory containing the EOS file
195 */
196 Eos_tabul(const char* name_i, const char* table, const char* path) ;
197
198 /** Standard constructor from the full filename.
199 *
200 * @param name_i Name of the equation of state
201 * @param table Full name of the file containing the EOS table
202 * (including the absolute path).
203 */
204 Eos_tabul(const char* name_i, const char* file_name) ;
205
206 Eos_tabul(const Eos_tabul& ) ; ///< Copy constructor
207
208 Eos_tabul(const char* name_i) ; ///< Standard constructor with a name
209
210 protected:
211
212 /** Constructor from a binary file (created by the function
213 * \c sauve(FILE*) ).
214 * This constructor is protected because any EOS construction
215 * from a binary file must be done via the function
216 * \c Eos::eos_from_file(FILE*) .
217 */
218 Eos_tabul(FILE* ) ;
219
220 /** Constructor from a formatted file.
221 * This constructor is protected because any EOS construction
222 * from a formatted file must be done via the function
223 * \c Eos::eos_from_file(ifstream\& ) .
224 *
225 * @param ist input file stream containing a name as first line
226 * and the path to the directory containing the EOS file
227 * as second line
228 * @param table Name of the file containing the EOS table
229 */
230 Eos_tabul(ifstream& ist, const char* table) ;
231
232 /** Constructor from a formatted file.
233 * This constructor is protected because any EOS construction
234 * from a formatted file must be done via the function
235 * \c Eos::eos_from_file(ifstream\& ) .
236 *
237 * @param ist input file stream containing a name as first line
238 * and the full filename (including the path) containing
239 * the EOS file as second line
240 * @param table Name of the file containing the EOS table
241 */
242 Eos_tabul(ifstream& ist) ;
243
244 /// The construction functions from a file
245 friend Eos* Eos::eos_from_file(FILE* ) ;
246 friend Eos* Eos::eos_from_file(ifstream& ) ;
247
248 public:
249 virtual ~Eos_tabul() ; ///< Destructor
250
251
252 // Miscellaneous
253 // -------------
254
255 protected:
256 /** Reads the file containing the table and initializes
257 * in the arrays \c logh , \c logp and \c dlpsdlh .
258 */
259 void read_table() ;
260
261
262 // Outputs
263 // -------
264
265 public:
266 virtual void sauve(FILE* ) const ; ///< Save in a file
267
268
269 // Computational functions
270 // -----------------------
271
272 public:
273 /** Computes the baryon density from the log-enthalpy.
274 *
275 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
276 *
277 * @return baryon density \e n [unit: \f$n_{\rm nuc} := 0.1 \ {\rm fm}^{-3}\f$]
278 *
279 */
280 virtual double nbar_ent_p(double ent, const Param* par=0x0) const ;
281 /* mb test version for linear interpolation
282
283 virtual double nbar_ent_p_mbtest(double ent, const Param* par=0x0) const ;
284 */
285
286 /** Computes the total energy density from the log-enthalpy.
287 *
288 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
289 *
290 * @return energy density \e e [unit: \f$\rho_{\rm nuc} c^2\f$], where
291 * \f$\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3\f$
292 */
293 virtual double ener_ent_p(double ent, const Param* par=0x0) const ;
294
295 /** Computes the pressure from the log-enthalpy.
296 *
297 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
298 *
299 * @return pressure \e p [unit: \f$\rho_{\rm nuc} c^2\f$], where
300 * \f$\rho_{\rm nuc} := 1.66\ 10^{17} \ {\rm kg/m}^3\f$
301 */
302 virtual double press_ent_p(double ent, const Param* par=0x0) const ;
303 /* mb test version for linear interpolation
304 virtual double press_ent_p_mbtest(double ent, const Param* par=0x0) const ;
305 */
306
307 /** Computes the logarithmic derivative \f$d\ln n/d\ln H\f$
308 * from the log-enthalpy.
309 *
310 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
311 *
312 * @return dln(n)/dln(H)
313 */
314 virtual double der_nbar_ent_p(double ent, const Param* par=0x0) const ;
315
316 /** Computes the logarithmic derivative \f$d\ln e/d\ln H\f$
317 * from the log-enthalpy.
318 *
319 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
320 *
321 * @return dln(e)/dln(H)
322 */
323 virtual double der_ener_ent_p(double ent, const Param* par=0x0) const ;
324
325 /** Computes the logarithmic derivative \f$d\ln p/d\ln H\f$
326 * from the log-enthalpy.
327 *
328 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
329 *
330 * @return dln(p)/dln(H)
331 */
332 virtual double der_press_ent_p(double ent, const Param* par=0x0) const ;
333
334 /** Computes the logarithmic derivative \f$d\ln p/d\ln n\f$
335 * from the log-enthalpy.
336 *
337 * @param ent [input, unit: \f$c^2\f$] log-enthalpy \e H
338 *
339 * @return dln(p)/dln(n)
340 */
341
342 virtual double der_press_nbar_p(double ent, const Param* par=0x0) const ;
343
344 };
345
346 //------------------------------------//
347 // class Eos_SLy4 //
348 //------------------------------------//
349
350
351 /**
352 * Equation of state SLy4 (Douchin \& Haensel 2001).\ingroup (eos)
353 *
354 * Interior: neutrons, protons, electrons and muons described by the Skyrme
355 * Lyon 4 potential.
356 *
357 * Inner crust: Douchin \& Haensel 2001
358 *
359 * Outer crust: Haensel \& Pichon, \a Astron. \a Astrophys. \b 283 ,
360 * 313 (1994)
361 *
362 */
363 class Eos_SLy4 : public Eos_tabul {
364
365
366 // Constructors - Destructor
367 // -------------------------
368 public:
369
370 /** Standard constructor.
371 *
372 * @param path Path to the directory containing the EOS file
373 */
374 Eos_SLy4(const char* path) ;
375
376
377 protected:
378 /** Constructor from a binary file (created by the function
379 * \c sauve(FILE*) ).
380 * This constructor is protected because any EOS construction
381 * from a binary file must be done via the function
382 * \c Eos::eos_from_file(FILE*) .
383 */
384 Eos_SLy4(FILE* ) ;
385
386 /** Constructor from a formatted file.
387 * This constructor is protected because any EOS construction
388 * from a formatted file must be done via the function
389 * \c Eos::eos_from_file(ifstream\& ) .
390 */
391 Eos_SLy4(ifstream& ) ;
392
393 private:
394 /** Copy constructor (private to make \c Eos_SLy4
395 * a non-copiable class)
396 */
397 Eos_SLy4(const Eos_SLy4& ) ;
398
399
400 /// The construction functions from a file
401 friend Eos* Eos::eos_from_file(FILE* ) ;
402 friend Eos* Eos::eos_from_file(ifstream& ) ;
403
404 public:
405 virtual ~Eos_SLy4() ; ///< Destructor
406
407 // Miscellaneous
408 // -------------
409
410 public :
411 /// Comparison operator (egality)
412 virtual bool operator==(const Eos& ) const ;
413
414 /// Comparison operator (difference)
415 virtual bool operator!=(const Eos& ) const ;
416
417 /** Returns a number to identify the sub-classe of \c Eos the
418 * object belongs to.
419 */
420 virtual int identify() const ;
421
422 // Outputs
423 // -------
424
425 protected:
426 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
427
428
429 };
430
431 //------------------------------------//
432 // class Eos_FPS //
433 //------------------------------------//
434
435
436 /**
437 * Equation of state FPS (Friedman-Pandharipande + Skyrme).\ingroup (eos)
438 * Authors: Lorenz, Ravenhall \& Pethick (unpublished).
439 *
440 *
441 */
442 class Eos_FPS : public Eos_tabul {
443
444
445 // Constructors - Destructor
446 // -------------------------
447 public:
448
449 /** Standard constructor.
450 *
451 * @param path Path to the directory containing the EOS file
452 */
453 Eos_FPS(const char* path) ;
454
455
456 protected:
457 /** Constructor from a binary file (created by the function
458 * \c sauve(FILE*) ).
459 * This constructor is protected because any EOS construction
460 * from a binary file must be done via the function
461 * \c Eos::eos_from_file(FILE*) .
462 */
463 Eos_FPS(FILE* ) ;
464
465 /** Constructor from a formatted file.
466 * This constructor is protected because any EOS construction
467 * from a formatted file must be done via the function
468 * \c Eos::eos_from_file(ifstream\& ) .
469 */
470 Eos_FPS(ifstream& ) ;
471
472 private:
473 /** Copy constructor (private to make \c Eos_FPS
474 * a non-copiable class)
475 */
476 Eos_FPS(const Eos_FPS& ) ;
477
478
479 /// The construction functions from a file
480 friend Eos* Eos::eos_from_file(FILE* ) ;
481 friend Eos* Eos::eos_from_file(ifstream& ) ;
482
483 public:
484 virtual ~Eos_FPS() ; ///< Destructor
485
486 // Miscellaneous
487 // -------------
488
489 public :
490 /// Comparison operator (egality)
491 virtual bool operator==(const Eos& ) const ;
492
493 /// Comparison operator (difference)
494 virtual bool operator!=(const Eos& ) const ;
495
496 /** Returns a number to identify the sub-classe of \c Eos the
497 * object belongs to.
498 */
499 virtual int identify() const ;
500
501 // Outputs
502 // -------
503
504 protected:
505 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
506
507
508 };
509
510 //------------------------------------//
511 // class Eos_BPAL12 //
512 //------------------------------------//
513
514
515 /**
516 * Equation of state BPAL12 (Bombaci et al 1995).\ingroup (eos)
517 *
518 *
519 */
520 class Eos_BPAL12 : public Eos_tabul {
521
522
523 // Constructors - Destructor
524 // -------------------------
525 public:
526
527 /** Standard constructor.
528 *
529 * @param path Path to the directory containing the EOS file
530 */
531 Eos_BPAL12(const char* path) ;
532
533
534 protected:
535 /** Constructor from a binary file (created by the function
536 * \c sauve(FILE*) ).
537 * This constructor is protected because any EOS construction
538 * from a binary file must be done via the function
539 * \c Eos::eos_from_file(FILE*) .
540 */
541 Eos_BPAL12(FILE* ) ;
542
543 /** Constructor from a formatted file.
544 * This constructor is protected because any EOS construction
545 * from a formatted file must be done via the function
546 * \c Eos::eos_from_file(ifstream\& ) .
547 */
548 Eos_BPAL12(ifstream& ) ;
549
550 private:
551 /** Copy constructor (private to make \c Eos_BPAL12
552 * a non-copiable class)
553 */
554 Eos_BPAL12(const Eos_BPAL12& ) ;
555
556
557 /// The construction functions from a file
558 friend Eos* Eos::eos_from_file(FILE* ) ;
559 friend Eos* Eos::eos_from_file(ifstream& ) ;
560
561 public:
562 virtual ~Eos_BPAL12() ; ///< Destructor
563
564 // Miscellaneous
565 // -------------
566
567 public :
568 /// Comparison operator (egality)
569 virtual bool operator==(const Eos& ) const ;
570
571 /// Comparison operator (difference)
572 virtual bool operator!=(const Eos& ) const ;
573
574 /** Returns a number to identify the sub-classe of \c Eos the
575 * object belongs to.
576 */
577 virtual int identify() const ;
578
579 // Outputs
580 // -------
581
582 protected:
583 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
584
585
586 };
587
588
589 //------------------------------------//
590 // class Eos_AkmalPR //
591 //------------------------------------//
592
593
594 /**
595 * Equation of state AkmalPR (Akmal, Pandharipande \& Ravenhall 1998).
596 *
597 * Interior: neutrons, protons, electrons and muons described by the
598 * A18+dv+UIX* model of Akmal, Pandharipande \& Ravenhall,
599 * Phys. Rev. C \b 58 , 1804 (1998) \ingroup (eos)
600 *
601 * Inner crust: SLy4
602 *
603 * Outer crust: BPS + Haensel \& Pichon, \a Astron. \a Astrophys. \b 283 ,
604 * 313 (1994)
605 *
606 */
607 class Eos_AkmalPR : public Eos_tabul {
608
609
610 // Constructors - Destructor
611 // -------------------------
612 public:
613
614 /** Standard constructor.
615 *
616 * @param path Path to the directory containing the EOS file
617 */
618 Eos_AkmalPR(const char* path) ;
619
620
621 protected:
622 /** Constructor from a binary file (created by the function
623 * \c sauve(FILE*) ).
624 * This constructor is protected because any EOS construction
625 * from a binary file must be done via the function
626 * \c Eos::eos_from_file(FILE*) .
627 */
628 Eos_AkmalPR(FILE* ) ;
629
630 /** Constructor from a formatted file.
631 * This constructor is protected because any EOS construction
632 * from a formatted file must be done via the function
633 * \c Eos::eos_from_file(ifstream\& ) .
634 */
635 Eos_AkmalPR(ifstream& ) ;
636
637 private:
638 /** Copy constructor (private to make \c Eos_AkmalPR
639 * a non-copiable class)
640 */
641 Eos_AkmalPR(const Eos_AkmalPR& ) ;
642
643
644 /// The construction functions from a file
645 friend Eos* Eos::eos_from_file(FILE* ) ;
646 friend Eos* Eos::eos_from_file(ifstream& ) ;
647
648 public:
649 virtual ~Eos_AkmalPR() ; ///< Destructor
650
651 // Miscellaneous
652 // -------------
653
654 public :
655 /// Comparison operator (egality)
656 virtual bool operator==(const Eos& ) const ;
657
658 /// Comparison operator (difference)
659 virtual bool operator!=(const Eos& ) const ;
660
661 /** Returns a number to identify the sub-classe of \c Eos the
662 * object belongs to.
663 */
664 virtual int identify() const ;
665
666 // Outputs
667 // -------
668
669 protected:
670 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
671
672
673 };
674
675 //------------------------------------//
676 // class Eos_BBB2 //
677 //------------------------------------//
678
679
680 /**
681 * Equation of state BBB2 (Baldo, Bombaci \& Burgio 1997).
682 *
683 * Interior: BHF (Paris +TBF) model of Baldo, Bombaci \& Burgio,
684 * \a Astron. \a Astrophys. \b 328 , 274 (1997)
685 *
686 * Crust: SLy \ingroup (eos)
687 *
688 *
689 */
690 class Eos_BBB2 : public Eos_tabul {
691
692
693 // Constructors - Destructor
694 // -------------------------
695 public:
696
697 /** Standard constructor.
698 *
699 * @param path Path to the directory containing the EOS file
700 */
701 Eos_BBB2(const char* path) ;
702
703
704 protected:
705 /** Constructor from a binary file (created by the function
706 * \c sauve(FILE*) ).
707 * This constructor is protected because any EOS construction
708 * from a binary file must be done via the function
709 * \c Eos::eos_from_file(FILE*) .
710 */
711 Eos_BBB2(FILE* ) ;
712
713 /** Constructor from a formatted file.
714 * This constructor is protected because any EOS construction
715 * from a formatted file must be done via the function
716 * \c Eos::eos_from_file(ifstream\& ) .
717 */
718 Eos_BBB2(ifstream& ) ;
719
720 private:
721 /** Copy constructor (private to make \c Eos_BBB2
722 * a non-copiable class)
723 */
724 Eos_BBB2(const Eos_BBB2& ) ;
725
726
727 /// The construction functions from a file
728 friend Eos* Eos::eos_from_file(FILE* ) ;
729 friend Eos* Eos::eos_from_file(ifstream& ) ;
730
731 public:
732 virtual ~Eos_BBB2() ; ///< Destructor
733
734 // Miscellaneous
735 // -------------
736
737 public :
738 /// Comparison operator (egality)
739 virtual bool operator==(const Eos& ) const ;
740
741 /// Comparison operator (difference)
742 virtual bool operator!=(const Eos& ) const ;
743
744 /** Returns a number to identify the sub-classe of \c Eos the
745 * object belongs to.
746 */
747 virtual int identify() const ;
748
749 // Outputs
750 // -------
751
752 protected:
753 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
754
755
756 };
757
758
759 //------------------------------------//
760 // class Eos_BalbN1H1 //
761 //------------------------------------//
762
763
764 /**
765 * Equation of state BalbN1H1 (Balberg 2000). \ingroup (eos)
766 *
767 *
768 */
769 class Eos_BalbN1H1 : public Eos_tabul {
770
771
772 // Constructors - Destructor
773 // -------------------------
774 public:
775
776 /** Standard constructor.
777 *
778 * @param path Path to the directory containing the EOS file
779 */
780 Eos_BalbN1H1(const char* path) ;
781
782
783 protected:
784 /** Constructor from a binary file (created by the function
785 * \c sauve(FILE*) ).
786 * This constructor is protected because any EOS construction
787 * from a binary file must be done via the function
788 * \c Eos::eos_from_file(FILE*) .
789 */
790 Eos_BalbN1H1(FILE* ) ;
791
792 /** Constructor from a formatted file.
793 * This constructor is protected because any EOS construction
794 * from a formatted file must be done via the function
795 * \c Eos::eos_from_file(ifstream\& ) .
796 */
797 Eos_BalbN1H1(ifstream& ) ;
798
799 private:
800 /** Copy constructor (private to make \c Eos_BalbN1H1
801 * a non-copiable class)
802 */
803 Eos_BalbN1H1(const Eos_BalbN1H1& ) ;
804
805
806 /// The construction functions from a file
807 friend Eos* Eos::eos_from_file(FILE* ) ;
808 friend Eos* Eos::eos_from_file(ifstream& ) ;
809
810 public:
811 virtual ~Eos_BalbN1H1() ; ///< Destructor
812
813 // Miscellaneous
814 // -------------
815
816 public :
817 /// Comparison operator (egality)
818 virtual bool operator==(const Eos& ) const ;
819
820 /// Comparison operator (difference)
821 virtual bool operator!=(const Eos& ) const ;
822
823 /** Returns a number to identify the sub-classe of \c Eos the
824 * object belongs to.
825 */
826 virtual int identify() const ;
827
828 // Outputs
829 // -------
830
831 protected:
832 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
833
834
835 };
836
837
838
839 //------------------------------------//
840 // class Eos_GlendNH3 //
841 //------------------------------------//
842
843
844 /**
845 * Equation of state GlendNH3 (Glendenning 1985, case 3 ).
846 *
847 *\ingroup (eos)
848 *
849 */
850 class Eos_GlendNH3 : public Eos_tabul {
851
852
853 // Constructors - Destructor
854 // -------------------------
855 public:
856
857 /** Standard constructor.
858 *
859 * @param path Path to the directory containing the EOS file
860 */
861 Eos_GlendNH3(const char* path) ;
862
863
864 protected:
865 /** Constructor from a binary file (created by the function
866 * \c sauve(FILE*) ).
867 * This constructor is protected because any EOS construction
868 * from a binary file must be done via the function
869 * \c Eos::eos_from_file(FILE*) .
870 */
871 Eos_GlendNH3(FILE* ) ;
872
873 /** Constructor from a formatted file.
874 * This constructor is protected because any EOS construction
875 * from a formatted file must be done via the function
876 * \c Eos::eos_from_file(ifstream\& ) .
877 */
878 Eos_GlendNH3(ifstream& ) ;
879
880 private:
881 /** Copy constructor (private to make \c Eos_GlendNH3
882 * a non-copiable class)
883 */
884 Eos_GlendNH3(const Eos_GlendNH3& ) ;
885
886
887 /// The construction functions from a file
888 friend Eos* Eos::eos_from_file(FILE* ) ;
889 friend Eos* Eos::eos_from_file(ifstream& ) ;
890
891 public:
892 virtual ~Eos_GlendNH3() ; ///< Destructor
893
894 // Miscellaneous
895 // -------------
896
897 public :
898 /// Comparison operator (egality)
899 virtual bool operator==(const Eos& ) const ;
900
901 /// Comparison operator (difference)
902 virtual bool operator!=(const Eos& ) const ;
903
904 /** Returns a number to identify the sub-classe of \c Eos the
905 * object belongs to.
906 */
907 virtual int identify() const ;
908
909 // Outputs
910 // -------
911
912 protected:
913 virtual ostream& operator>>(ostream &) const ; ///< Operator >>
914
915
916 };
917
918 }
919 #endif
920