LORENE
eos_fps.C
1 /*
2  * Methods of class Eos_FPS
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_fps.C,v 1.4 2016/12/05 16:17:51 j_novak Exp $
34  * $Log: eos_fps.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:53 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/22 19:30:29 eric
49  * *** empty log message ***
50  *
51  *
52  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fps.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_FPS::Eos_FPS(const char* path)
68  : Eos_tabul("EOS FPS",
69  "eos_fps.d", path)
70 {}
71 
72 
73 // Constructor from binary file
74 // ----------------------------
75 Eos_FPS::Eos_FPS(FILE* fich) : Eos_tabul(fich) {}
76 
77 
78 
79 // Constructor from a formatted file
80 // ---------------------------------
81 Eos_FPS::Eos_FPS(ifstream& fich) : Eos_tabul(fich, "eos_fps.d") {}
82 
83 
84 
85  //--------------//
86  // Destructor //
87  //--------------//
88 
90 
91  // does nothing
92 
93 }
94 
95 
96  //------------------------//
97  // Comparison operators //
98  //------------------------//
99 
100 
101 bool Eos_FPS::operator==(const Eos& eos_i) const {
102 
103  bool resu = true ;
104 
105  if ( eos_i.identify() != identify() ) {
106  cout << "The second EOS is not of type Eos_FPS !" << endl ;
107  resu = false ;
108  }
109 
110  return resu ;
111 
112 }
113 
114 bool Eos_FPS::operator!=(const Eos& eos_i) const {
115 
116  return !(operator==(eos_i)) ;
117 
118 }
119 
120  //------------//
121  // Outputs //
122  //------------//
123 
124 
125 ostream& Eos_FPS::operator>>(ostream & ost) const {
126 
127  ost <<
128  "EOS of class Eos_FPS : Friedman-Pandharipande + Skyrme "
129  << endl ;
130  ost << " (Lorenz, Ravenhall, Petick)" << endl ;
131 
132  ost << " composition : n,p,e,mu" << endl ;
133  ost << " model : effective nucleon energy functional, FPS" << endl ;
134  ost << " BPS EOS below neutron drip point" << endl ;
135  ost << " Crust bottom at n = 0.0957 fm^{-3}" << endl ;
136 
137  return ost ;
138 
139 }
140 
141 
142 }
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_fps.C:101
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.
virtual ~Eos_FPS()
Destructor.
Definition: eos_fps.C:89
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
Base class for tabulated equations of state.
Definition: eos_tabul.h:185
Eos_FPS(const char *path)
Standard constructor.
Definition: eos_fps.C:67
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_fps.C:114
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_fps.C:125