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