93 #include "utilitaires.h" 103 Eos(
"EOS for relativistic incompressible matter"),
104 rho0(rho_c), ent0( double(-1.e-6) ) {}
109 Eos(
"EOS for relativistic incompressible matter"),
110 rho0(rho_c), ent0( ent_c ) {
112 assert( ent_c <=
double(0) ) ;
120 rho0(eosi.rho0), ent0(eosi.ent0) {}
140 fich >>
rho0 ; fich.getline(blabla, 80) ;
141 fich >>
ent0 ; fich.getline(blabla, 80) ;
175 cout <<
"The second EOS is not of type Eos_incomp !" << endl ;
184 <<
"The two Eos_incomp have different rho0 : " <<
rho0 <<
" <-> " 185 << eos.
rho0 << endl ;
191 <<
"The two Eos_incomp have different ent0 : " <<
ent0 <<
" <-> " 192 << eos.
ent0 << endl ;
225 ost <<
"EOS of class Eos_incomp (relativistic incompressible matter) : " 227 ost <<
" Constant density : " <<
rho0 <<
" rho_nuc" << endl ;
228 ost <<
" Log-enthalpy threshold for non-zero density : " <<
ent0 275 return rho0 * (
exp(ent) - double(1)) ;
318 return ent / (double(1) -
exp(-ent)) ;
Cmp exp(const Cmp &)
Exponential.
Equation of state base class.
virtual ~Eos_incomp()
Destructor.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double rho0
Constant density .
virtual ostream & operator>>(ostream &) const
Operator >>
virtual void sauve(FILE *) const
Save in a file.
virtual void sauve(FILE *) const
Save in a file.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
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.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
double ent0
Log-enthalpy threshold for setting the energy density to a non zero value (should be negative)...
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
void set_name(const char *name_i)
Sets the EOS name.
void operator=(const Eos_incomp &)
Assignment to another Eos_incomp.
Eos_incomp(double rho_c)
Standard constructor.
Equation of state of incompressible matter (relativistic case).