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 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 {
58  : Eos_fitting("EOS fitted to AkmalPR", "eos_fit_akmalpr.d", path)
59 {}
60 
61 // Constructor from binary file
62 // ----------------------------
64 
65 // Constructor from a formatted file
66 // ---------------------------------
68  : Eos_fitting(fich, "eos_fit_akmalpr.d")
69 {}
70 
71  //------------------------------//
72  // Destructor //
73  //------------------------------//
74 
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 }
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual ~Eos_fit_AkmalPR()
Destructor.
virtual ostream & operator>>(ostream &) const
Operator >>
Eos_fit_AkmalPR(const char *path)
Standard constructor.
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 (egality)
Base class for the analytically fitted equation of state.
Definition: eos_fitting.h:80
Equation of state base class.
Definition: eos.h:190
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Lorene prototypes.
Definition: app_hor.h:64