00001 /* 00002 * Methods of class Eos_SLy4 00003 * 00004 * (see file eos_tabul.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2000-2001 Eric Gourgoulhon 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 as published by 00015 * the Free Software Foundation; either version 2 of the License, or 00016 * (at your option) any later version. 00017 * 00018 * LORENE is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with LORENE; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 */ 00028 00029 00030 char eos_sly4_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_sly4.C,v 1.2 2002/10/16 14:36:35 j_novak Exp $" ; 00031 00032 /* 00033 * $Id: eos_sly4.C,v 1.2 2002/10/16 14:36:35 j_novak Exp $ 00034 * $Log: eos_sly4.C,v $ 00035 * Revision 1.2 2002/10/16 14:36:35 j_novak 00036 * Reorganization of #include instructions of standard C++, in order to 00037 * use experimental version 3 of gcc. 00038 * 00039 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon 00040 * LORENE 00041 * 00042 * Revision 2.0 2000/11/22 19:31:19 eric 00043 * *** empty log message *** 00044 * 00045 * 00046 * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_sly4.C,v 1.2 2002/10/16 14:36:35 j_novak Exp $ 00047 * 00048 */ 00049 00050 // Headers Lorene 00051 #include "headcpp.h" 00052 #include "eos.h" 00053 00054 //----------------------------// 00055 // Constructors // 00056 //----------------------------// 00057 00058 // Standard constructor 00059 // -------------------- 00060 Eos_SLy4::Eos_SLy4(const char* path) 00061 : Eos_tabul("EOS SLy4 [Douchin & Haensel (2000)]", 00062 "eos_sly4.d", path) 00063 {} 00064 00065 00066 // Constructor from binary file 00067 // ---------------------------- 00068 Eos_SLy4::Eos_SLy4(FILE* fich) : Eos_tabul(fich) {} 00069 00070 00071 00072 // Constructor from a formatted file 00073 // --------------------------------- 00074 Eos_SLy4::Eos_SLy4(ifstream& fich) : Eos_tabul(fich, "eos_sly4.d") {} 00075 00076 00077 00078 //--------------// 00079 // Destructor // 00080 //--------------// 00081 00082 Eos_SLy4::~Eos_SLy4(){ 00083 00084 // does nothing 00085 00086 } 00087 00088 00089 //------------------------// 00090 // Comparison operators // 00091 //------------------------// 00092 00093 00094 bool Eos_SLy4::operator==(const Eos& eos_i) const { 00095 00096 bool resu = true ; 00097 00098 if ( eos_i.identify() != identify() ) { 00099 cout << "The second EOS is not of type Eos_SLy4 !" << endl ; 00100 resu = false ; 00101 } 00102 00103 return resu ; 00104 00105 } 00106 00107 bool Eos_SLy4::operator!=(const Eos& eos_i) const { 00108 00109 return !(operator==(eos_i)) ; 00110 00111 } 00112 00113 //------------// 00114 // Outputs // 00115 //------------// 00116 00117 00118 ostream& Eos_SLy4::operator>>(ostream & ost) const { 00119 00120 ost << 00121 "EOS of class Eos_SLy4 (SLy4 model of Douchin & Haensel 2000) : " 00122 << endl ; 00123 00124 ost << " composition : n,p,e,mu" << endl ; 00125 ost << " model : effective nucleon energy functional, SLy4" << endl ; 00126 00127 return ost ; 00128 00129 } 00130 00131
1.4.6