| 1 |
/* |
| 2 |
* Methods of class Eos_BPAL12 |
| 3 |
* |
| 4 |
* (see file eos_tabul.h for documentation). |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 2000-2001 Eric Gourgoulhon |
| 10 |
* |
| 11 |
* This file is part of LORENE. |
| 12 |
* |
| 13 |
* LORENE is free software; you can redistribute it and/or modify |
| 14 |
* it under the terms of the GNU General Public License as published by |
| 15 |
* the Free Software Foundation; either version 2 of the License, or |
| 16 |
* (at your option) any later version. |
| 17 |
* |
| 18 |
* LORENE is distributed in the hope that it will be useful, |
| 19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
* GNU General Public License for more details. |
| 22 |
* |
| 23 |
* You should have received a copy of the GNU General Public License |
| 24 |
* along with LORENE; if not, write to the Free Software |
| 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 |
* |
| 27 |
*/ |
| 28 |
|
| 29 |
|
| 30 |
char eos_bpal12_C[] = "$Header: /cvsroot/Lorene/C++/Source/Eos/eos_bpal12.C,v 1.3 2014/10/13 08:52:52 j_novak Exp $" ; |
| 31 |
|
| 32 |
/* |
| 33 |
* $Id: eos_bpal12.C,v 1.3 2014/10/13 08:52:52 j_novak Exp $ |
| 34 |
* $Log: eos_bpal12.C,v $ |
| 35 |
* Revision 1.3 2014/10/13 08:52:52 j_novak |
| 36 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 37 |
* |
| 38 |
* Revision 1.2 2002/10/16 14:36:35 j_novak |
| 39 |
* Reorganization of #include instructions of standard C++, in order to |
| 40 |
* use experimental version 3 of gcc. |
| 41 |
* |
| 42 |
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon |
| 43 |
* LORENE |
| 44 |
* |
| 45 |
* Revision 2.0 2000/11/23 22:34:24 eric |
| 46 |
* *** empty log message *** |
| 47 |
* |
| 48 |
* |
| 49 |
* $Header: /cvsroot/Lorene/C++/Source/Eos/eos_bpal12.C,v 1.3 2014/10/13 08:52:52 j_novak Exp $ |
| 50 |
* |
| 51 |
*/ |
| 52 |
|
| 53 |
// Headers Lorene |
| 54 |
#include "headcpp.h" |
| 55 |
#include "eos.h" |
| 56 |
|
| 57 |
//----------------------------// |
| 58 |
// Constructors // |
| 59 |
//----------------------------// |
| 60 |
|
| 61 |
// Standard constructor |
| 62 |
// -------------------- |
| 63 |
namespace Lorene { |
| 64 |
Eos_BPAL12::Eos_BPAL12(const char* path) |
| 65 |
: Eos_tabul("EOS BPAL12", |
| 66 |
"eos_bpal12.d", path) |
| 67 |
{} |
| 68 |
|
| 69 |
|
| 70 |
// Constructor from binary file |
| 71 |
// ---------------------------- |
| 72 |
Eos_BPAL12::Eos_BPAL12(FILE* fich) : Eos_tabul(fich) {} |
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
// Constructor from a formatted file |
| 77 |
// --------------------------------- |
| 78 |
Eos_BPAL12::Eos_BPAL12(ifstream& fich) : |
| 79 |
Eos_tabul(fich, "eos_bpal12.d") {} |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
//--------------// |
| 84 |
// Destructor // |
| 85 |
//--------------// |
| 86 |
|
| 87 |
Eos_BPAL12::~Eos_BPAL12(){ |
| 88 |
|
| 89 |
// does nothing |
| 90 |
|
| 91 |
} |
| 92 |
|
| 93 |
|
| 94 |
//------------------------// |
| 95 |
// Comparison operators // |
| 96 |
//------------------------// |
| 97 |
|
| 98 |
|
| 99 |
bool Eos_BPAL12::operator==(const Eos& eos_i) const { |
| 100 |
|
| 101 |
bool resu = true ; |
| 102 |
|
| 103 |
if ( eos_i.identify() != identify() ) { |
| 104 |
cout << "The second EOS is not of type Eos_BPAL12 !" << endl ; |
| 105 |
resu = false ; |
| 106 |
} |
| 107 |
|
| 108 |
return resu ; |
| 109 |
|
| 110 |
} |
| 111 |
|
| 112 |
bool Eos_BPAL12::operator!=(const Eos& eos_i) const { |
| 113 |
|
| 114 |
return !(operator==(eos_i)) ; |
| 115 |
|
| 116 |
} |
| 117 |
|
| 118 |
//------------// |
| 119 |
// Outputs // |
| 120 |
//------------// |
| 121 |
|
| 122 |
|
| 123 |
ostream& Eos_BPAL12::operator>>(ostream & ost) const { |
| 124 |
|
| 125 |
ost << |
| 126 |
"EOS of class Eos_BPAL12 : Bombaci et al. 1995 " |
| 127 |
<< endl ; |
| 128 |
|
| 129 |
ost << " composition : n,p,e,mu" << endl ; |
| 130 |
ost << " model : effective nucleon energy functional BPAL12" |
| 131 |
<< endl ; |
| 132 |
ost << " BPS EOS below neutron drip point" << endl ; |
| 133 |
ost << " FPS EOS up to the liquid core" << endl ; |
| 134 |
ost << " Crust bottom at n = 0.0957 fm^{-3}" << endl ; |
| 135 |
|
| 136 |
return ost ; |
| 137 |
|
| 138 |
} |
| 139 |
|
| 140 |
|
| 141 |
} |