eos_glendnh3.C
/*
* 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 ;
}
}
Lorene::Eos_GlendNH3::operator>>
virtual ostream & operator>>(ostream &) const
Operator >>.
Definition eos_glendnh3.C:78
Lorene::Eos_GlendNH3::Eos_GlendNH3
Eos_GlendNH3(const char *path)
Standard constructor.
Definition eos_glendnh3.C:19
Lorene::Eos_GlendNH3::~Eos_GlendNH3
virtual ~Eos_GlendNH3()
Destructor.
Definition eos_glendnh3.C:42
Lorene::Eos_GlendNH3::operator!=
virtual bool operator!=(const Eos &) const
Comparison operator (difference).
Definition eos_glendnh3.C:67
Lorene::Eos_GlendNH3::operator==
virtual bool operator==(const Eos &) const
Comparison operator (egality).
Definition eos_glendnh3.C:54
Lorene::Eos_GlendNH3::identify
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
Definition eos_from_file.C:153
Lorene::Eos_tabul::Eos_tabul
Eos_tabul(const char *name_i, const char *table, const char *path)
Standard constructor.
Definition eos_tabul.C:133
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Eos::identify
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Lorene
Lorene prototypes.
Definition app_hor.h:64