1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
/*
* Methods of class Eos_GlendNH3
*
* (see file eos_tabul.h for documentation).
*
*/
// Headers Lorene
#include "headcpp.h"
#include "eos.h"
//----------------------------//
// Constructors //
//----------------------------//
// Standard constructor
// --------------------
namespace Lorene {
Eos_GlendNH3::Eos_GlendNH3(const char* path)
: Eos_tabul("EOS GlendNH3",
"eos_glendnh3.d", path)
{}
// Constructor from binary file
// ----------------------------
Eos_GlendNH3::Eos_GlendNH3(FILE* fich) : Eos_tabul(fich) {}
// Constructor from a formatted file
// ---------------------------------
Eos_GlendNH3::Eos_GlendNH3(ifstream& fich) :
Eos_tabul(fich, "eos_glendnh3.d") {}
//--------------//
// Destructor //
//--------------//
Eos_GlendNH3::~Eos_GlendNH3(){
// does nothing
}
//------------------------//
// Comparison operators //
//------------------------//
bool Eos_GlendNH3::operator==(const Eos& eos_i) const {
bool resu = true ;
if ( eos_i.identify() != identify() ) {
cout << "The second EOS is not of type Eos_GlendNH3 !" << endl ;
resu = false ;
}
return resu ;
}
bool Eos_GlendNH3::operator!=(const Eos& eos_i) const {
return !(operator==(eos_i)) ;
}
//------------//
// Outputs //
//------------//
ostream& Eos_GlendNH3::operator>>(ostream & ost) const {
ost <<
"EOS of class Eos_GlendNH3 : Glendenning, N.K. 1985 ApJ293, 470, case 3 "
<< endl ;
ost << " composition : n,p,H" << endl ;
ost << " model : Lagrangian field theory; MFT"
<< endl ;
ost << " BPS EOS below neutron drip point" << endl ;
ost << " Sly4 EOS up to the liquid core" << endl ;
ost << " Crust bottom at n = 0.1 fm^{-3}" << endl ;
return ost ;
}
}
|