LORENE
eos_fit_fps.C
1/*
2 * Method of class Eos_fit_FPS
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
29
30/*
31 * $Id: eos_fit_fps.C,v 1.4 2016/12/05 16:17:51 j_novak Exp $
32 * $Log: eos_fit_fps.C,v $
33 * Revision 1.4 2016/12/05 16:17:51 j_novak
34 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35 *
36 * Revision 1.3 2014/10/13 08:52:52 j_novak
37 * Lorene classes and functions now belong to the namespace Lorene.
38 *
39 * Revision 1.2 2004/10/24 19:14:53 k_taniguchi
40 * Correction of the file name which is called in the constructor from file.
41 *
42 * Revision 1.1 2004/09/26 18:55:10 k_taniguchi
43 * Initial revision
44 *
45 *
46 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_fps.C,v 1.4 2016/12/05 16:17:51 j_novak Exp $
47 *
48 */
49
50// Lorene headers
51#include "headcpp.h"
52#include "eos.h"
53#include "eos_fitting.h"
54
55//--------------------------------//
56// Constructors //
57//--------------------------------//
58
59// Standard constructor
60// --------------------
61namespace Lorene {
62Eos_fit_FPS::Eos_fit_FPS(const char* path)
63 : Eos_fitting("EOS fitted to FPS", "eos_fit_fps.d", path)
64{}
65
66// Constructor from binary file
67// ----------------------------
69
70// Constructor from a formatted file
71// ---------------------------------
73 : Eos_fitting(fich, "eos_fit_fps.d")
74{}
75
76 //------------------------------//
77 // Destructor //
78 //------------------------------//
79
81
82 // does nothing
83
84}
85
86 //----------------------------------------//
87 // Comparison operators //
88 //----------------------------------------//
89
90bool Eos_fit_FPS::operator==(const Eos& eos_i) const {
91
92 bool resu = true ;
93
94 if ( eos_i.identify() != identify() ) {
95 cout << "The second EOS is not of type Eos_fit_FPS !" << endl ;
96 resu = false ;
97 }
98
99 return resu ;
100
101}
102
103bool Eos_fit_FPS::operator!=(const Eos& eos_i) const {
104
105 return !(operator==(eos_i)) ;
106
107}
108
109 //---------------------------//
110 // Outputs //
111 //---------------------------//
112
113ostream& Eos_fit_FPS::operator>>(ostream& ost) const {
114
115 ost <<
116 "EOS of class Eos_fit_FPS : "
117 << endl ;
118
119 ost << " composition : n, p, e, mu" << endl ;
120 ost << " model : effective nucleon energy functional, FPS" << endl ;
121
122 return ost ;
123
124}
125}
virtual ostream & operator>>(ostream &) const
Operator >>.
virtual ~Eos_fit_FPS()
Destructor.
Definition eos_fit_fps.C:80
virtual bool operator!=(const Eos &) const
Comparison operator (difference).
Eos_fit_FPS(const char *path)
Standard constructor.
Definition eos_fit_fps.C:62
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).
Definition eos_fit_fps.C:90
Eos_fitting(const char *name_i, const char *data, const char *path)
Standard constructor.
Definition eos_fitting.C:81
Equation of state base class.
Definition eos.h:206
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:67