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