Debian Codegraph @

C++/Source/Eos/eos_sly4.C

raw
1 /*
2 * Methods of class Eos_SLy4
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_sly4_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_sly4.C,v 1.3 2014/10/13 08:52:54 j_novak Exp $" ;
31
32 /*
33 * $Id: eos_sly4.C,v 1.3 2014/10/13 08:52:54 j_novak Exp $
34 * $Log: eos_sly4.C,v $
35 * Revision 1.3 2014/10/13 08:52:54 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:31:19 eric
46 * *** empty log message ***
47 *
48 *
49 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_sly4.C,v 1.3 2014/10/13 08:52:54 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_SLy4::Eos_SLy4(const char* path)
65 : Eos_tabul("EOS SLy4 [Douchin & Haensel (2000)]",
66 "eos_sly4.d", path)
67 {}
68
69
70 // Constructor from binary file
71 // ----------------------------
72 Eos_SLy4::Eos_SLy4(FILE* fich) : Eos_tabul(fich) {}
73
74
75
76 // Constructor from a formatted file
77 // ---------------------------------
78 Eos_SLy4::Eos_SLy4(ifstream& fich) : Eos_tabul(fich, "eos_sly4.d") {}
79
80
81
82 //--------------//
83 // Destructor //
84 //--------------//
85
86 Eos_SLy4::~Eos_SLy4(){
87
88 // does nothing
89
90 }
91
92
93 //------------------------//
94 // Comparison operators //
95 //------------------------//
96
97
98 bool Eos_SLy4::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_SLy4 !" << endl ;
104 resu = false ;
105 }
106
107 return resu ;
108
109 }
110
111 bool Eos_SLy4::operator!=(const Eos& eos_i) const {
112
113 return !(operator==(eos_i)) ;
114
115 }
116
117 //------------//
118 // Outputs //
119 //------------//
120
121
122 ostream& Eos_SLy4::operator>>(ostream & ost) const {
123
124 ost <<
125 "EOS of class Eos_SLy4 (SLy4 model of Douchin & Haensel 2000) : "
126 << endl ;
127
128 ost << " composition : n,p,e,mu" << endl ;
129 ost << " model : effective nucleon energy functional, SLy4" << endl ;
130
131 return ost ;
132
133 }
134
135
136 }