eos_bpal12.C

00001 /*
00002  *  Methods of class Eos_BPAL12
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_bpal12_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_bpal12.C,v 1.2 2002/10/16 14:36:35 j_novak Exp $" ;
00031 
00032 /*
00033  * $Id: eos_bpal12.C,v 1.2 2002/10/16 14:36:35 j_novak Exp $
00034  * $Log: eos_bpal12.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/23  22:34:24  eric
00043  * *** empty log message ***
00044  *
00045  *
00046  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_bpal12.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_BPAL12::Eos_BPAL12(const char* path)
00061         : Eos_tabul("EOS BPAL12",
00062                     "eos_bpal12.d", path)
00063 {}
00064 
00065 
00066 // Constructor from binary file
00067 // ----------------------------
00068 Eos_BPAL12::Eos_BPAL12(FILE* fich) : Eos_tabul(fich) {}
00069 
00070 
00071 
00072 // Constructor from a formatted file
00073 // ---------------------------------
00074 Eos_BPAL12::Eos_BPAL12(ifstream& fich) :
00075             Eos_tabul(fich, "eos_bpal12.d") {}
00076 
00077 
00078 
00079             //--------------//
00080             //  Destructor  //
00081             //--------------//
00082 
00083 Eos_BPAL12::~Eos_BPAL12(){
00084 
00085     // does nothing
00086 
00087 }
00088 
00089 
00090             //------------------------//
00091             //  Comparison operators  //
00092             //------------------------//
00093 
00094 
00095 bool Eos_BPAL12::operator==(const Eos& eos_i) const {
00096 
00097     bool resu = true ;
00098 
00099     if ( eos_i.identify() != identify() ) {
00100     cout << "The second EOS is not of type Eos_BPAL12 !" << endl ;
00101     resu = false ;
00102     }
00103 
00104     return resu ;
00105 
00106 }
00107 
00108 bool Eos_BPAL12::operator!=(const Eos& eos_i) const {
00109 
00110     return !(operator==(eos_i)) ;
00111 
00112 }
00113 
00114             //------------//
00115             //  Outputs   //
00116             //------------//
00117 
00118 
00119 ostream& Eos_BPAL12::operator>>(ostream & ost) const {
00120 
00121     ost <<
00122     "EOS of class Eos_BPAL12 : Bombaci et al. 1995 "
00123         << endl ;
00124         
00125     ost << "  composition :  n,p,e,mu" << endl ;
00126     ost << "  model : effective nucleon energy functional BPAL12"
00127         << endl ;
00128     ost << "  BPS EOS below neutron drip point" << endl ;
00129     ost << "  FPS EOS up to the liquid core" << endl ;
00130     ost << "  Crust bottom at n = 0.0957 fm^{-3}" << endl ;
00131 
00132     return ost ;
00133 
00134 }
00135 
00136             

Generated on Tue Feb 7 01:35:16 2012 for LORENE by  doxygen 1.4.6