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 char eos_fps_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_fps.C,v 1.3 2014/10/13 08:52:53 j_novak Exp $" ;
31 
32 /*
33  * $Id: eos_fps.C,v 1.3 2014/10/13 08:52:53 j_novak Exp $
34  * $Log: eos_fps.C,v $
35  * Revision 1.3 2014/10/13 08:52:53 j_novak
36  * Lorene classes and functions now belong to the namespace Lorene.
37  *
38  * Revision 1.2 2002/10/16 14:36:35 j_novak
39  * Reorganization of #include instructions of standard C++, in order to
40  * use experimental version 3 of gcc.
41  *
42  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
43  * LORENE
44  *
45  * Revision 2.0 2000/11/22 19:30:29 eric
46  * *** empty log message ***
47  *
48  *
49  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fps.C,v 1.3 2014/10/13 08:52:53 j_novak Exp $
50  *
51  */
52 
53 // Headers Lorene
54 #include "headcpp.h"
55 #include "eos.h"
56 
57  //----------------------------//
58  // Constructors //
59  //----------------------------//
60 
61 // Standard constructor
62 // --------------------
63 namespace Lorene {
64 Eos_FPS::Eos_FPS(const char* path)
65  : Eos_tabul("EOS FPS",
66  "eos_fps.d", path)
67 {}
68 
69 
70 // Constructor from binary file
71 // ----------------------------
72 Eos_FPS::Eos_FPS(FILE* fich) : Eos_tabul(fich) {}
73 
74 
75 
76 // Constructor from a formatted file
77 // ---------------------------------
78 Eos_FPS::Eos_FPS(ifstream& fich) : Eos_tabul(fich, "eos_fps.d") {}
79 
80 
81 
82  //--------------//
83  // Destructor //
84  //--------------//
85 
87 
88  // does nothing
89 
90 }
91 
92 
93  //------------------------//
94  // Comparison operators //
95  //------------------------//
96 
97 
98 bool Eos_FPS::operator==(const Eos& eos_i) const {
99 
100  bool resu = true ;
101 
102  if ( eos_i.identify() != identify() ) {
103  cout << "The second EOS is not of type Eos_FPS !" << endl ;
104  resu = false ;
105  }
106 
107  return resu ;
108 
109 }
110 
111 bool Eos_FPS::operator!=(const Eos& eos_i) const {
112 
113  return !(operator==(eos_i)) ;
114 
115 }
116 
117  //------------//
118  // Outputs //
119  //------------//
120 
121 
122 ostream& Eos_FPS::operator>>(ostream & ost) const {
123 
124  ost <<
125  "EOS of class Eos_FPS : Friedman-Pandharipande + Skyrme "
126  << endl ;
127  ost << " (Lorenz, Ravenhall, Petick)" << endl ;
128 
129  ost << " composition : n,p,e,mu" << endl ;
130  ost << " model : effective nucleon energy functional, FPS" << endl ;
131  ost << " BPS EOS below neutron drip point" << endl ;
132  ost << " Crust bottom at n = 0.0957 fm^{-3}" << endl ;
133 
134  return ost ;
135 
136 }
137 
138 
139 }
Lorene
Lorene prototypes.
Definition: app_hor.h:64
Lorene::Eos
Equation of state base class.
Definition: eos.h:190
Lorene::Eos_FPS::~Eos_FPS
virtual ~Eos_FPS()
Destructor.
Definition: eos_fps.C:86
Lorene::Eos_FPS::operator==
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Definition: eos_fps.C:98
Lorene::Eos_FPS::identify
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
Definition: eos_from_file.C:143
Lorene::Eos_FPS::Eos_FPS
Eos_FPS(const char *path)
Standard constructor.
Definition: eos_fps.C:64
Lorene::Eos_tabul
Base class for tabulated equations of state.
Definition: eos_tabul.h:149
Lorene::Eos::identify
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Lorene::Eos_FPS::operator!=
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Definition: eos_fps.C:111
Lorene::Eos_FPS::operator>>
virtual ostream & operator>>(ostream &) const
Operator >>
Definition: eos_fps.C:122