eos_fit_sly4.C

00001 /*
00002  *  Method of class Eos_fit_SLy4
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_sly4_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_sly4.C,v 1.1 2004/09/26 18:54:35 k_taniguchi Exp $" ;
00029 
00030 /*
00031  * $Id: eos_fit_sly4.C,v 1.1 2004/09/26 18:54:35 k_taniguchi Exp $
00032  * $Log: eos_fit_sly4.C,v $
00033  * Revision 1.1  2004/09/26 18:54:35  k_taniguchi
00034  * Initial revision
00035  *
00036  *
00037  * $Header: /cvsroot/Lorene/C++/Source/Eos/eos_fit_sly4.C,v 1.1 2004/09/26 18:54:35 k_taniguchi Exp $
00038  *
00039  */
00040 
00041 // Lorene headers
00042 #include "headcpp.h"
00043 #include "eos.h"
00044 #include "eos_fitting.h"
00045 
00046 //--------------------------------//
00047 //          Constructors          //
00048 //--------------------------------//
00049 
00050 // Standard constructor
00051 // --------------------
00052 Eos_fit_SLy4::Eos_fit_SLy4(const char* path)
00053     : Eos_fitting("EOS fitted to SLy4", "eos_fit_sly4.d", path)
00054 {}
00055 
00056 // Constructor from binary file
00057 // ----------------------------
00058 Eos_fit_SLy4::Eos_fit_SLy4(FILE* fich) : Eos_fitting(fich) {}
00059 
00060 // Constructor from a formatted file
00061 // ---------------------------------
00062 Eos_fit_SLy4::Eos_fit_SLy4(ifstream& fich)
00063     : Eos_fitting(fich, "eos_fit_sly4.d")
00064 {}
00065 
00066           //------------------------------//
00067           //          Destructor          //
00068           //------------------------------//
00069 
00070 Eos_fit_SLy4::~Eos_fit_SLy4() {
00071 
00072     // does nothing
00073 
00074 }
00075 
00076           //----------------------------------------//
00077           //          Comparison operators          //
00078           //----------------------------------------//
00079 
00080 bool Eos_fit_SLy4::operator==(const Eos& eos_i) const {
00081 
00082     bool resu = true ;
00083 
00084     if ( eos_i.identify() != identify() ) {
00085         cout << "The second EOS is not of type Eos_fit_SLy4 !" << endl ;
00086     resu = false ;
00087     }
00088 
00089     return resu ;
00090 
00091 }
00092 
00093 bool Eos_fit_SLy4::operator!=(const Eos& eos_i) const {
00094 
00095   return !(operator==(eos_i)) ;
00096 
00097 }
00098 
00099           //---------------------------//
00100           //          Outputs          //
00101           //---------------------------//
00102 
00103 ostream& Eos_fit_SLy4::operator>>(ostream& ost) const {
00104 
00105     ost <<
00106       "EOS of class Eos_fit_SLy4 : "
00107     << endl ;
00108 
00109     ost << "  composition : n, p, e, mu" << endl ;
00110     ost << "  model : effective nucleon energy functional, SLy4" << endl ;
00111 
00112     return ost ;
00113 
00114 }

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