eos_fps.C

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

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