29char eos_incomp_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Eos/eos_incomp.C,v 1.6 2014/10/13 08:52:53 j_novak Exp $" ;
90#include "utilitaires.h"
100 Eos(
"EOS for relativistic incompressible matter"),
101 rho0(rho_c), ent0( double(-1.e-6) ) {}
106 Eos(
"EOS for relativistic incompressible matter"),
107 rho0(rho_c), ent0( ent_c ) {
109 assert( ent_c <=
double(0) ) ;
117 rho0(eosi.rho0), ent0(eosi.ent0) {}
137 fich >>
rho0 ; fich.getline(blabla, 80) ;
138 fich >>
ent0 ; fich.getline(blabla, 80) ;
172 cout <<
"The second EOS is not of type Eos_incomp !" << endl ;
181 <<
"The two Eos_incomp have different rho0 : " <<
rho0 <<
" <-> "
182 << eos.
rho0 << endl ;
188 <<
"The two Eos_incomp have different ent0 : " <<
ent0 <<
" <-> "
189 << eos.
ent0 << endl ;
222 ost <<
"EOS of class Eos_incomp (relativistic incompressible matter) : "
224 ost <<
" Constant density : " <<
rho0 <<
" rho_nuc" << endl ;
225 ost <<
" Log-enthalpy threshold for non-zero density : " <<
ent0
272 return rho0 * (
exp(ent) - double(1)) ;
315 return ent / (double(1) -
exp(-ent)) ;
Equation of state of incompressible matter (relativistic case).
virtual ~Eos_incomp()
Destructor.
Eos_incomp(double rho_c)
Standard constructor.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
void operator=(const Eos_incomp &)
Assignment to another Eos_incomp.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual void sauve(FILE *) const
Save in a file.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative).
double rho0
Constant density .
Equation of state base class.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual void sauve(FILE *) const
Save in a file.
void set_name(const char *name_i)
Sets the EOS name.
Cmp exp(const Cmp &)
Exponential.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.