Debian Codegraph @

C++/Source/Eos/eos_fit_sly4.C

raw
1 /*
2 * Method of class Eos_fit_SLy4
3 *
4 * (see file eos_fitting.h for documentation).
5 *
6 */
7
8 /*
9 * Copyright (c) 2004 Keisuke Taniguchi
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 version 2
15 * as published by the Free Software Foundation.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28 char eos_fit_sly4_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_sly4.C,v 1.2 2014/10/13 08:52:53 j_novak Exp $" ;
29
30 /*
31 * $Id: eos_fit_sly4.C,v 1.2 2014/10/13 08:52:53 j_novak Exp $
32 * $Log: eos_fit_sly4.C,v $
33 * Revision 1.2 2014/10/13 08:52:53 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.1 2004/09/26 18:54:35 k_taniguchi
37 * Initial revision
38 *
39 *
40 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_sly4.C,v 1.2 2014/10/13 08:52:53 j_novak Exp $
41 *
42 */
43
44 // Lorene headers
45 #include "headcpp.h"
46 #include "eos.h"
47 #include "eos_fitting.h"
48
49 //--------------------------------//
50 // Constructors //
51 //--------------------------------//
52
53 // Standard constructor
54 // --------------------
55 namespace Lorene {
56 Eos_fit_SLy4::Eos_fit_SLy4(const char* path)
57 : Eos_fitting("EOS fitted to SLy4", "eos_fit_sly4.d", path)
58 {}
59
60 // Constructor from binary file
61 // ----------------------------
62 Eos_fit_SLy4::Eos_fit_SLy4(FILE* fich) : Eos_fitting(fich) {}
63
64 // Constructor from a formatted file
65 // ---------------------------------
66 Eos_fit_SLy4::Eos_fit_SLy4(ifstream& fich)
67 : Eos_fitting(fich, "eos_fit_sly4.d")
68 {}
69
70 //------------------------------//
71 // Destructor //
72 //------------------------------//
73
74 Eos_fit_SLy4::~Eos_fit_SLy4() {
75
76 // does nothing
77
78 }
79
80 //----------------------------------------//
81 // Comparison operators //
82 //----------------------------------------//
83
84 bool Eos_fit_SLy4::operator==(const Eos& eos_i) const {
85
86 bool resu = true ;
87
88 if ( eos_i.identify() != identify() ) {
89 cout << "The second EOS is not of type Eos_fit_SLy4 !" << endl ;
90 resu = false ;
91 }
92
93 return resu ;
94
95 }
96
97 bool Eos_fit_SLy4::operator!=(const Eos& eos_i) const {
98
99 return !(operator==(eos_i)) ;
100
101 }
102
103 //---------------------------//
104 // Outputs //
105 //---------------------------//
106
107 ostream& Eos_fit_SLy4::operator>>(ostream& ost) const {
108
109 ost <<
110 "EOS of class Eos_fit_SLy4 : "
111 << endl ;
112
113 ost << " composition : n, p, e, mu" << endl ;
114 ost << " model : effective nucleon energy functional, SLy4" << endl ;
115
116 return ost ;
117
118 }
119 }