eos_fit_akmalpr.C

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

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