26char meos_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Eos/meos.C,v 1.6 2014/10/13 08:52:54 j_novak Exp $" ;
63#include "utilitaires.h"
73 constructed_from_file(false) {
78 for (
int l=0; l<
ndom; l++) {
86 constructed_from_file(false) {
96 constructed_from_file(false) {
107 constructed_from_file(false) {
121 constructed_from_file(false) {
125 for (
int l=0; l<
ndom; l++) {
139 for (
int l=0; l<
ndom; l++) {
146 constructed_from_file(true) {
150 fich >>
ndom ; fich.getline(blabla, 80) ;
154 for (
int l=0; l<
ndom; l++) {
165 for (
int l=0; l<
ndom; l++) {
180 cout <<
"MEos::operator= : not implemented yet !" << endl ;
196 for (
int l=0; l<
ndom; l++) {
204 ost <<
"EOS of class MEos (multi-domain equation of state) : " << endl ;
205 ost <<
" Number of domains : " <<
ndom << endl ;
207 for (
int l=0; l<
ndom; l++) {
208 ost <<
"Equation of state in domain " << l <<
" : " << endl ;
209 ost <<
"-------------------------------" << endl ;
227 cout <<
"The second EOS is not of type MEos !" << endl ;
232 const MEos& eos =
dynamic_cast<const MEos&
>( eos_i ) ;
235 cout <<
"The two MEos have different number of domains" << endl ;
240 for (
int l=0; l<
ndom; l++) {
Equation of state base class.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
virtual double press_ent_p(double ent, const Param *par=0x0) const =0
Computes the pressure from the log-enthalpy and extra parameters (virtual function implemented in the...
virtual double der_press_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
virtual void sauve(FILE *) const
Save in a file.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy with extra parameters (virtual function im...
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the logarithmic derivative from the log-enthalpy and extra parameters (virtual function imp...
virtual double ener_ent_p(double ent, const Param *par=0x0) const =0
Computes the total energy density from the log-enthalpy and extra parameters (virtual function implem...
virtual double nbar_ent_p(double ent, const Param *par=0x0) const =0
Computes the baryon density from the log-enthalpy and extra parameters (virtual function implemented ...
EOS with domain dependency.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ostream & operator>>(ostream &) const
Operator >>
virtual ~MEos()
Destructor.
void operator=(const MEos &)
Assignment to another MEos.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
MEos(int ndom_i, const Eos **mono_eos_i)
Standard constructor.
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Computes the baryon density from the log-enthalpy.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual void sauve(FILE *) const
Save in a file.
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative 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.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
bool constructed_from_file
Indicates wether the EOS has been constructed from a file.
const Eos ** mono_eos
Array (upon the domains) containing the various EOS.
int ndom
Number of domains.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
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.