Debian Codegraph @

C++/Source/Eos/eos_fit_akmalpr.C

raw
1 /*
2 * Method of class Eos_fit_AkmalPR
3 *
4 * (see file eos_fitting.h for documentation).
5 *
6 */
7
8 /*
9 * Copyright (c) 2005 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_akmalpr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_akmalpr.C,v 1.2 2014/10/13 08:52:52 j_novak Exp $" ;
29
30 /*
31 * $Id: eos_fit_akmalpr.C,v 1.2 2014/10/13 08:52:52 j_novak Exp $
32 * $Log: eos_fit_akmalpr.C,v $
33 * Revision 1.2 2014/10/13 08:52:52 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.1 2005/05/22 20:53:55 k_taniguchi
37 * Initial revision
38 *
39 *
40 *
41 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_akmalpr.C,v 1.2 2014/10/13 08:52:52 j_novak Exp $
42 *
43 */
44
45 // Lorene headers
46 #include "headcpp.h"
47 #include "eos.h"
48 #include "eos_fitting.h"
49
50 //--------------------------------//
51 // Constructors //
52 //--------------------------------//
53
54 // Standard constructor
55 // --------------------
56 namespace Lorene {
57 Eos_fit_AkmalPR::Eos_fit_AkmalPR(const char* path)
58 : Eos_fitting("EOS fitted to AkmalPR", "eos_fit_akmalpr.d", path)
59 {}
60
61 // Constructor from binary file
62 // ----------------------------
63 Eos_fit_AkmalPR::Eos_fit_AkmalPR(FILE* fich) : Eos_fitting(fich) {}
64
65 // Constructor from a formatted file
66 // ---------------------------------
67 Eos_fit_AkmalPR::Eos_fit_AkmalPR(ifstream& fich)
68 : Eos_fitting(fich, "eos_fit_akmalpr.d")
69 {}
70
71 //------------------------------//
72 // Destructor //
73 //------------------------------//
74
75 Eos_fit_AkmalPR::~Eos_fit_AkmalPR() {
76
77 // does nothing
78
79 }
80
81 //----------------------------------------//
82 // Comparison operators //
83 //----------------------------------------//
84
85 bool Eos_fit_AkmalPR::operator==(const Eos& eos_i) const {
86
87 bool resu = true ;
88
89 if ( eos_i.identify() != identify() ) {
90 cout << "The second EOS is not of type Eos_fit_AkmalPR !" << endl ;
91 resu = false ;
92 }
93
94 return resu ;
95
96 }
97
98 bool Eos_fit_AkmalPR::operator!=(const Eos& eos_i) const {
99
100 return !(operator==(eos_i)) ;
101
102 }
103
104 //---------------------------//
105 // Outputs //
106 //---------------------------//
107
108 ostream& Eos_fit_AkmalPR::operator>>(ostream& ost) const {
109
110 ost <<
111 "EOS of class Eos_fit_AkmalPR : "
112 << endl ;
113
114 ost << " composition : n, p, e, mu" << endl ;
115 ost << " model : A18+dv+UIX*, AkmalPR" << endl ;
116
117 return ost ;
118
119 }
120 }