LORENE
eos_bpal12.C
1 /*
2  * Methods of class Eos_BPAL12
3  *
4  * (see file eos_tabul.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2000-2001 Eric Gourgoulhon
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * LORENE is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with LORENE; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26  *
27  */
28 
29 
30 
31 
32 /*
33  * $Id: eos_bpal12.C,v 1.4 2016/12/05 16:17:51 j_novak Exp $
34  * $Log: eos_bpal12.C,v $
35  * Revision 1.4 2016/12/05 16:17:51 j_novak
36  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
37  *
38  * Revision 1.3 2014/10/13 08:52:52 j_novak
39  * Lorene classes and functions now belong to the namespace Lorene.
40  *
41  * Revision 1.2 2002/10/16 14:36:35 j_novak
42  * Reorganization of #include instructions of standard C++, in order to
43  * use experimental version 3 of gcc.
44  *
45  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
46  * LORENE
47  *
48  * Revision 2.0 2000/11/23 22:34:24 eric
49  * *** empty log message ***
50  *
51  *
52  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_bpal12.C,v 1.4 2016/12/05 16:17:51 j_novak Exp $
53  *
54  */
55 
56 // Headers Lorene
57 #include "headcpp.h"
58 #include "eos.h"
59 
60  //----------------------------//
61  // Constructors //
62  //----------------------------//
63 
64 // Standard constructor
65 // --------------------
66 namespace Lorene {
67 Eos_BPAL12::Eos_BPAL12(const char* path)
68  : Eos_tabul("EOS BPAL12",
69  "eos_bpal12.d", path)
70 {}
71 
72 
73 // Constructor from binary file
74 // ----------------------------
75 Eos_BPAL12::Eos_BPAL12(FILE* fich) : Eos_tabul(fich) {}
76 
77 
78 
79 // Constructor from a formatted file
80 // ---------------------------------
81 Eos_BPAL12::Eos_BPAL12(ifstream& fich) :
82  Eos_tabul(fich, "eos_bpal12.d") {}
83 
84 
85 
86  //--------------//
87  // Destructor //
88  //--------------//
89 
91 
92  // does nothing
93 
94 }
95 
96 
97  //------------------------//
98  // Comparison operators //
99  //------------------------//
100 
101 
102 bool Eos_BPAL12::operator==(const Eos& eos_i) const {
103 
104  bool resu = true ;
105 
106  if ( eos_i.identify() != identify() ) {
107  cout << "The second EOS is not of type Eos_BPAL12 !" << endl ;
108  resu = false ;
109  }
110 
111  return resu ;
112 
113 }
114 
115 bool Eos_BPAL12::operator!=(const Eos& eos_i) const {
116 
117  return !(operator==(eos_i)) ;
118 
119 }
120 
121  //------------//
122  // Outputs //
123  //------------//
124 
125 
126 ostream& Eos_BPAL12::operator>>(ostream & ost) const {
127 
128  ost <<
129  "EOS of class Eos_BPAL12 : Bombaci et al. 1995 "
130  << endl ;
131 
132  ost << " composition : n,p,e,mu" << endl ;
133  ost << " model : effective nucleon energy functional BPAL12"
134  << endl ;
135  ost << " BPS EOS below neutron drip point" << endl ;
136  ost << " FPS EOS up to the liquid core" << endl ;
137  ost << " Crust bottom at n = 0.0957 fm^{-3}" << endl ;
138 
139  return ost ;
140 
141 }
142 
143 
144 }
Lorene prototypes.
Definition: app_hor.h:67
Equation of state base class.
Definition: eos.h:209
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Eos_BPAL12(const char *path)
Standard constructor.
Definition: eos_bpal12.C:67
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ~Eos_BPAL12()
Destructor.
Definition: eos_bpal12.C:90
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_bpal12.C:115
Base class for tabulated equations of state.
Definition: eos_tabul.h:185
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_bpal12.C:126
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_bpal12.C:102