LORENE
eos_fit_akmalpr.C
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 
29 
30 /*
31  * $Id: eos_fit_akmalpr.C,v 1.3 2016/12/05 16:17:51 j_novak Exp $
32  * $Log: eos_fit_akmalpr.C,v $
33  * Revision 1.3 2016/12/05 16:17:51 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.2 2014/10/13 08:52:52 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.1 2005/05/22 20:53:55 k_taniguchi
40  * Initial revision
41  *
42  *
43  *
44  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_akmalpr.C,v 1.3 2016/12/05 16:17:51 j_novak Exp $
45  *
46  */
47 
48 // Lorene headers
49 #include "headcpp.h"
50 #include "eos.h"
51 #include "eos_fitting.h"
52 
53 //--------------------------------//
54 // Constructors //
55 //--------------------------------//
56 
57 // Standard constructor
58 // --------------------
59 namespace Lorene {
61  : Eos_fitting("EOS fitted to AkmalPR", "eos_fit_akmalpr.d", path)
62 {}
63 
64 // Constructor from binary file
65 // ----------------------------
67 
68 // Constructor from a formatted file
69 // ---------------------------------
71  : Eos_fitting(fich, "eos_fit_akmalpr.d")
72 {}
73 
74  //------------------------------//
75  // Destructor //
76  //------------------------------//
77 
79 
80  // does nothing
81 
82 }
83 
84  //----------------------------------------//
85  // Comparison operators //
86  //----------------------------------------//
87 
88 bool Eos_fit_AkmalPR::operator==(const Eos& eos_i) const {
89 
90  bool resu = true ;
91 
92  if ( eos_i.identify() != identify() ) {
93  cout << "The second EOS is not of type Eos_fit_AkmalPR !" << endl ;
94  resu = false ;
95  }
96 
97  return resu ;
98 
99 }
100 
101 bool Eos_fit_AkmalPR::operator!=(const Eos& eos_i) const {
102 
103  return !(operator==(eos_i)) ;
104 
105 }
106 
107  //---------------------------//
108  // Outputs //
109  //---------------------------//
110 
111 ostream& Eos_fit_AkmalPR::operator>>(ostream& ost) const {
112 
113  ost <<
114  "EOS of class Eos_fit_AkmalPR : "
115  << endl ;
116 
117  ost << " composition : n, p, e, mu" << endl ;
118  ost << " model : A18+dv+UIX*, AkmalPR" << endl ;
119 
120  return ost ;
121 
122 }
123 }
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Lorene prototypes.
Definition: app_hor.h:67
Equation of state base class.
Definition: eos.h:209
virtual ostream & operator>>(ostream &) const
Operator >>
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ~Eos_fit_AkmalPR()
Destructor.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
Eos_fit_AkmalPR(const char *path)
Standard constructor.
Base class for the analytically fitted equation of state.
Definition: eos_fitting.h:83