00001 /* 00002 * Method of class Eos_fit_FPS 00003 * 00004 * (see file eos_fitting.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2004 Keisuke Taniguchi 00010 * 00011 * This file is part of LORENE. 00012 * 00013 * LORENE is free software; you can redistribute it and/or modify 00014 * it under the terms of the GNU General Public License version 2 00015 * as published by the Free Software Foundation. 00016 * 00017 * LORENE is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with LORENE; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 */ 00027 00028 char eos_fit_fps_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_fps.C,v 1.2 2004/10/24 19:14:53 k_taniguchi Exp $" ; 00029 00030 /* 00031 * $Id: eos_fit_fps.C,v 1.2 2004/10/24 19:14:53 k_taniguchi Exp $ 00032 * $Log: eos_fit_fps.C,v $ 00033 * Revision 1.2 2004/10/24 19:14:53 k_taniguchi 00034 * Correction of the file name which is called in the constructor from file. 00035 * 00036 * Revision 1.1 2004/09/26 18:55:10 k_taniguchi 00037 * Initial revision 00038 * 00039 * 00040 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_fps.C,v 1.2 2004/10/24 19:14:53 k_taniguchi Exp $ 00041 * 00042 */ 00043 00044 // Lorene headers 00045 #include "headcpp.h" 00046 #include "eos.h" 00047 #include "eos_fitting.h" 00048 00049 //--------------------------------// 00050 // Constructors // 00051 //--------------------------------// 00052 00053 // Standard constructor 00054 // -------------------- 00055 Eos_fit_FPS::Eos_fit_FPS(const char* path) 00056 : Eos_fitting("EOS fitted to FPS", "eos_fit_fps.d", path) 00057 {} 00058 00059 // Constructor from binary file 00060 // ---------------------------- 00061 Eos_fit_FPS::Eos_fit_FPS(FILE* fich) : Eos_fitting(fich) {} 00062 00063 // Constructor from a formatted file 00064 // --------------------------------- 00065 Eos_fit_FPS::Eos_fit_FPS(ifstream& fich) 00066 : Eos_fitting(fich, "eos_fit_fps.d") 00067 {} 00068 00069 //------------------------------// 00070 // Destructor // 00071 //------------------------------// 00072 00073 Eos_fit_FPS::~Eos_fit_FPS() { 00074 00075 // does nothing 00076 00077 } 00078 00079 //----------------------------------------// 00080 // Comparison operators // 00081 //----------------------------------------// 00082 00083 bool Eos_fit_FPS::operator==(const Eos& eos_i) const { 00084 00085 bool resu = true ; 00086 00087 if ( eos_i.identify() != identify() ) { 00088 cout << "The second EOS is not of type Eos_fit_FPS !" << endl ; 00089 resu = false ; 00090 } 00091 00092 return resu ; 00093 00094 } 00095 00096 bool Eos_fit_FPS::operator!=(const Eos& eos_i) const { 00097 00098 return !(operator==(eos_i)) ; 00099 00100 } 00101 00102 //---------------------------// 00103 // Outputs // 00104 //---------------------------// 00105 00106 ostream& Eos_fit_FPS::operator>>(ostream& ost) const { 00107 00108 ost << 00109 "EOS of class Eos_fit_FPS : " 00110 << endl ; 00111 00112 ost << " composition : n, p, e, mu" << endl ; 00113 ost << " model : effective nucleon energy functional, FPS" << endl ; 00114 00115 return ost ; 00116 00117 }
1.4.6