etoile.C
/*
* Methods of class Etoile
*
* (see file etoile.h for documentation)
*/
/*
* Copyright (c) 2000-2001 Eric Gourgoulhon
* Copyright (c) 2000-2001 Keisuke Taniguchi
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char etoile_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/etoile.C,v 1.10 2014/10/13 08:52:58 j_novak Exp $" ;
/*
* $Id: etoile.C,v 1.10 2014/10/13 08:52:58 j_novak Exp $
* $Log: etoile.C,v $
* Revision 1.10 2014/10/13 08:52:58 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.9 2012/08/12 17:48:35 p_cerda
* Magnetstar: New classes for magnetstar. Allowing for non-equatorial symmetry in Etoile et al. Adding B_phi in Et_rot_mag.
*
* Revision 1.8 2005/01/18 22:36:50 k_taniguchi
* Delete a pointer for ray_eq(int kk).
*
* Revision 1.7 2005/01/18 20:35:05 k_taniguchi
* Addition of ray_eq(int kk).
*
* Revision 1.6 2005/01/17 20:40:25 k_taniguchi
* Addition of ray_eq_3pis2().
*
* Revision 1.5 2004/03/25 10:29:06 j_novak
* All LORENE's units are now defined in the namespace Unites (in file unites.h).
*
* Revision 1.4 2003/10/13 15:23:56 f_limousin
* *** empty log message ***
*
* Revision 1.3 2002/04/09 14:32:15 e_gourgoulhon
* 1/ Added extra parameters in EOS computational functions (argument par)
* 2/ New class MEos for multi-domain EOS
*
* Revision 1.2 2001/12/04 21:27:53 e_gourgoulhon
*
* All writing/reading to a binary file are now performed according to
* the big endian convention, whatever the system is big endian or
* small endian, thanks to the functions fwrite_be and fread_be
*
* Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
* LORENE
*
* Revision 2.14 2000/11/24 13:27:44 eric
* Dans eqution_of_state(): changement leger de ent dans le cas ou l'on a
* deux domaine avant d'appeler l'EOS.
*
* Revision 2.13 2000/09/25 12:22:02 keisuke
* *** empty log message ***
*
* Revision 2.12 2000/09/22 15:50:58 keisuke
* Ajout du membre d_logn_auto_div.
*
* Revision 2.11 2000/09/07 14:34:09 keisuke
* Ajout du membre logn_auto_regu.
*
* Revision 2.10 2000/08/31 15:36:54 eric
* Bases spectrales standards pour nnn, a_car et gam_euler dans le
* constructeur (initialisation a la metrique plate).
*
* Revision 2.9 2000/08/29 11:37:49 eric
* Ajout des membres k_div et logn_auto_div.
*
* Revision 2.8 2000/07/21 12:01:11 eric
* Modif dans Etoile::del_deriv() :
* appel de Etoile::set_der_0x0() et non de la fonction virtuelle set_der_0x0().
*
* Revision 2.7 2000/03/21 12:39:34 eric
* Le constructeur standard teste la compatibilite de l'EOS avec le
* caractere relativiste de l'etoile.
*
* Revision 2.6 2000/02/21 14:32:40 eric
* gam_euler est initialise a 1 dans le constructeur standard.
* Suppression de l'appel a del_hydro_euler dans equation_of_state().
*
* Revision 2.5 2000/02/09 19:30:47 eric
* La triade de decomposition doit desormais figurer en argument des
* constructeurs de Tenseur.
*
* Revision 2.4 2000/02/02 09:23:34 eric
* Affichage de la masse.
*
* Revision 2.3 2000/01/28 17:18:10 eric
* Modifs noms des quantites globales.
* Affichage.
*
* Revision 2.2 2000/01/24 17:13:36 eric
* Le mapping mp n'est plus constant.
*
* Revision 2.1 2000/01/24 13:37:22 eric
* *** empty log message ***
*
* Revision 2.0 2000/01/20 17:04:45 eric
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Source/Etoile/etoile.C,v 1.10 2014/10/13 08:52:58 j_novak Exp $
*
*/
// Headers C
#include "math.h"
// Headers Lorene
#include "etoile.h"
#include "eos.h"
#include "utilitaires.h"
#include "param.h"
#include "unites.h"
//--------------//
// Constructors //
//--------------//
// Standard constructor
// --------------------
namespace Lorene {
Etoile::Etoile(Map& mpi, int nzet_i, bool relat, const Eos& eos_i)
: mp(mpi),
nzet(nzet_i),
relativistic(relat),
k_div(0),
eos(eos_i),
ent(mpi),
nbar(mpi),
ener(mpi),
press(mpi),
ener_euler(mpi),
s_euler(mpi),
gam_euler(mpi),
u_euler(mpi, 1, CON, mp.get_bvect_cart()),
logn_auto(mpi),
logn_auto_regu(mpi),
logn_auto_div(mpi),
d_logn_auto_div(mpi, 1, COV, mp.get_bvect_spher()),
beta_auto(mpi),
nnn(mpi),
shift(mpi, 1, CON, mp.get_bvect_cart()),
a_car(mpi) {
// Check of the EOS
const Eos_poly* p_eos_poly = dynamic_cast<const Eos_poly*>( &eos ) ;
const Eos_poly_newt* p_eos_poly_newt =
dynamic_cast<const Eos_poly_newt*>( &eos ) ;
const Eos_incomp* p_eos_incomp = dynamic_cast<const Eos_incomp*>( &eos ) ;
const Eos_incomp_newt* p_eos_incomp_newt =
dynamic_cast<const Eos_incomp_newt*>( &eos ) ;
if (relativistic) {
if (p_eos_poly_newt != 0x0) {
cout <<
"Etoile::Etoile : the EOS Eos_poly_newt must not be employed"
<< " for a relativistic star ! " << endl ;
cout << "(Use Eos_poly instead)" << endl ;
abort() ;
}
if (p_eos_incomp_newt != 0x0) {
cout <<
"Etoile::Etoile : the EOS Eos_incomp_newt must not be employed"
<< " for a relativistic star ! " << endl ;
cout << "(Use Eos_incomp instead)" << endl ;
abort() ;
}
}
else{
if ( (p_eos_poly != 0x0) && (p_eos_poly_newt == 0x0) ) {
cout <<
"Etoile::Etoile : the EOS Eos_poly must not be employed"
<< " for a Newtonian star ! " << endl ;
cout << "(Use Eos_poly_newt instead)" << endl ;
abort() ;
}
if ( (p_eos_incomp != 0x0) && (p_eos_incomp_newt == 0x0) ) {
cout <<
"Etoile::Etoile : the EOS Eos_incomp must not be employed"
<< " for a relativistic star ! " << endl ;
cout << "(Use Eos_incomp_newt instead)" << endl ;
abort() ;
}
}
// Parameter 1/c^2
unsurc2 = relativistic ? double(1) : double(0) ;
// Pointers of derived quantities initialized to zero :
set_der_0x0() ;
// All the matter quantities are initialized to zero :
nbar = 0 ;
ener = 0 ;
press = 0 ;
ent = 0 ;
ener_euler = 0 ;
s_euler = 0 ;
gam_euler = 1 ;
gam_euler.set_std_base() ;
u_euler = 0 ;
// The metric is initialized to the flat one :
logn_auto = 0 ;
logn_auto_regu = 0 ;
logn_auto_div = 0 ;
d_logn_auto_div = 0 ;
beta_auto = 0 ;
nnn = 1 ;
nnn.set_std_base() ;
shift = 0 ;
a_car = 1 ;
a_car.set_std_base() ;
}
// Copy constructor
// ----------------
Etoile::Etoile(const Etoile& et)
: mp(et.mp),
nzet(et.nzet),
relativistic(et.relativistic),
unsurc2(et.unsurc2),
k_div(et.k_div),
eos(et.eos),
ent(et.ent),
nbar(et.nbar),
ener(et.ener),
press(et.press),
ener_euler(et.ener_euler),
s_euler(et.s_euler),
gam_euler(et.gam_euler),
u_euler(et.u_euler),
logn_auto(et.logn_auto),
logn_auto_regu(et.logn_auto_regu),
logn_auto_div(et.logn_auto_div),
d_logn_auto_div(et.d_logn_auto_div),
beta_auto(et.beta_auto),
nnn(et.nnn),
shift(et.shift),
a_car(et.a_car) {
set_der_0x0() ;
}
// Constructor from a file
// -----------------------
Etoile::Etoile(Map& mpi, const Eos& eos_i, FILE* fich)
: mp(mpi),
eos(eos_i),
ent(mpi),
nbar(mpi),
ener(mpi),
press(mpi),
ener_euler(mpi),
s_euler(mpi),
gam_euler(mpi),
u_euler(mpi, 1, CON, mp.get_bvect_cart()),
logn_auto(mpi),
logn_auto_regu(mpi),
logn_auto_div(mpi),
d_logn_auto_div(mpi, 1, COV, mp.get_bvect_spher()),
beta_auto(mpi),
nnn(mpi),
shift(mpi, 1, CON, mp.get_bvect_cart()),
a_car(mpi) {
// Etoile parameters
// -----------------
// nzet and relativistic are read in the file:
int xx ;
fread_be(&xx, sizeof(int), 1, fich) ;
k_div = xx / 1000 ; // integer part
nzet = xx - k_div * 1000 ;
fread(&relativistic, sizeof(bool), 1, fich) ;
// Parameter 1/c^2 is deduced from relativistic:
unsurc2 = relativistic ? double(1) : double(0) ;
// Equation of state
// -----------------
// Read of the saved EOS
Eos* p_eos_file = Eos::eos_from_file(fich) ;
// Comparison with the assigned EOS:
if (eos != *p_eos_file) {
cout <<
"Etoile::Etoile(const Map&, const Eos&, FILE*) : the EOS given in "
<< endl <<
" argument and that read in the file are different !" << endl ;
abort() ;
}
// p_eos_file is no longer required (it was used only for checking the
// EOS compatibility)
delete p_eos_file ;
// Read of the saved fields:
// ------------------------
Tenseur ent_file(mp, fich) ;
ent = ent_file ;
Tenseur logn_auto_file(mp, fich) ;
logn_auto = logn_auto_file ;
Tenseur beta_auto_file(mp, fich) ;
beta_auto = beta_auto_file ;
if (k_div == 0) {
logn_auto_div = 0 ;
d_logn_auto_div = 0 ;
}
else {
Tenseur logn_auto_div_file(mp, fich) ;
logn_auto_div = logn_auto_div_file ;
Tenseur d_logn_auto_div_file(mp, mp.get_bvect_spher(), fich) ;
d_logn_auto_div = d_logn_auto_div_file ;
}
logn_auto_regu = logn_auto - logn_auto_div ;
shift = 0 ;
// Pointers of derived quantities initialized to zero
// --------------------------------------------------
set_der_0x0() ;
}
//------------//
// Destructor //
//------------//
Etoile::~Etoile(){
del_deriv() ;
}
//----------------------------------//
// Management of derived quantities //
//----------------------------------//
void Etoile::del_deriv() const {
if (p_mass_b != 0x0) delete p_mass_b ;
if (p_mass_g != 0x0) delete p_mass_g ;
if (p_ray_eq != 0x0) delete p_ray_eq ;
if (p_ray_eq_pis2 != 0x0) delete p_ray_eq_pis2 ;
if (p_ray_eq_pi != 0x0) delete p_ray_eq_pi ;
if (p_ray_eq_3pis2 != 0x0) delete p_ray_eq_3pis2 ;
if (p_ray_pole != 0x0) delete p_ray_pole ;
if (p_l_surf != 0x0) delete p_l_surf ;
if (p_xi_surf != 0x0) delete p_xi_surf ;
Etoile::set_der_0x0() ;
}
void Etoile::set_der_0x0() const {
p_mass_b = 0x0 ;
p_mass_g = 0x0 ;
p_ray_eq = 0x0 ;
p_ray_eq_pis2 = 0x0 ;
p_ray_eq_pi = 0x0 ;
p_ray_eq_3pis2 = 0x0 ;
p_ray_pole = 0x0 ;
p_l_surf = 0x0 ;
p_xi_surf = 0x0 ;
}
void Etoile::del_hydro_euler() {
ener_euler.set_etat_nondef() ;
s_euler.set_etat_nondef() ;
gam_euler.set_etat_nondef() ;
u_euler.set_etat_nondef() ;
del_deriv() ;
}
//--------------//
// Assignment //
//--------------//
// Assignment to another Etoile
// ----------------------------
void Etoile::operator=(const Etoile& et) {
assert( &(et.mp) == &mp ) ; // Same mapping
assert( &(et.eos) == &eos ) ; // Same EOS
nzet = et.nzet ;
relativistic = et.relativistic ;
k_div = et.k_div ;
unsurc2 = et.unsurc2 ;
ent = et.ent ;
nbar = et.nbar ;
ener = et.ener ;
press = et.press ;
ener_euler = et.ener_euler ;
s_euler = et.s_euler ;
gam_euler = et.gam_euler ;
u_euler = et.u_euler ;
logn_auto = et.logn_auto ;
logn_auto_regu = et.logn_auto_regu ;
logn_auto_div = et.logn_auto_div ;
d_logn_auto_div = et.d_logn_auto_div ;
beta_auto = et.beta_auto ;
nnn = et.nnn ;
shift = et.shift ;
a_car = et.a_car ;
del_deriv() ; // Deletes all derived quantities
}
// Assignment of the enthalpy field
// --------------------------------
void Etoile::set_enthalpy(const Cmp& ent_i) {
ent = ent_i ;
// Update of (nbar, ener, press) :
equation_of_state() ;
// The derived quantities are obsolete:
del_deriv() ;
}
//--------------//
// Outputs //
//--------------//
// Save in a file
// --------------
void Etoile::sauve(FILE* fich) const {
int xx = nzet + k_div * 1000 ;
fwrite_be(&xx, sizeof(int), 1, fich) ;
fwrite(&relativistic, sizeof(bool), 1, fich) ;
eos.sauve(fich) ;
ent.sauve(fich) ;
logn_auto.sauve(fich) ;
beta_auto.sauve(fich) ;
if (k_div != 0) {
logn_auto_div.sauve(fich) ;
d_logn_auto_div.sauve(fich) ;
}
}
// Printing
// --------
ostream& operator<<(ostream& ost, const Etoile& et) {
et >> ost ;
return ost ;
}
ostream& Etoile::operator>>(ostream& ost) const {
using namespace Unites ;
ost << endl ;
if (relativistic) {
ost << "Relativistic star" << endl ;
ost << "-----------------" << endl ;
}
else {
ost << "Newtonian star" << endl ;
ost << "--------------" << endl ;
}
ost << "Number of domains occupied by the star : " << nzet << endl ;
ost << "Equation of state : " << endl ;
ost << eos << endl ;
ost << endl << "Central enthalpy : " << ent()(0,0,0,0) << " c^2" << endl ;
ost << "Central proper baryon density : " << nbar()(0,0,0,0)
<< " x 0.1 fm^-3" << endl ;
ost << "Central proper energy density : " << ener()(0,0,0,0)
<< " rho_nuc c^2" << endl ;
ost << "Central pressure : " << press()(0,0,0,0)
<< " rho_nuc c^2" << endl ;
ost << endl
<< "Regularization index of the gravitational potential : k_div = "
<< k_div << endl ;
ost << "Central lapse N : " << nnn()(0,0,0,0) << endl ;
ost << "Central value of A^2 : " << a_car()(0,0,0,0) << endl ;
ost << endl
<< "Coordinate equatorial radius (phi=0) a1 = "
<< ray_eq()/km << " km" << endl ;
ost << "Coordinate equatorial radius (phi=pi/2) a2 = "
<< ray_eq_pis2()/km << " km" << endl ;
ost << "Coordinate equatorial radius (phi=pi): "
<< ray_eq_pi()/km << " km" << endl ;
ost << "Coordinate polar radius a3 = "
<< ray_pole()/km << " km" << endl ;
ost << "Axis ratio a2/a1 = " << ray_eq_pis2() / ray_eq()
<< " a3/a1 = " << ray_pole() / ray_eq() << endl ;
ost << endl << "Baryon mass : " << mass_b() / msol << " M_sol" << endl ;
ost << "Gravitational mass : " << mass_g() / msol << " M_sol" << endl ;
return ost ;
}
//-----------------------------------------//
// Computation of hydro quantities //
//-----------------------------------------//
void Etoile::equation_of_state() {
Cmp ent_eos = ent() ;
// Slight rescale of the enthalpy field in case of 2 domains inside the
// star
double epsilon = 1.e-12 ;
const Mg3d* mg = mp.get_mg() ;
int nz = mg->get_nzone() ;
Mtbl xi(mg) ;
xi.set_etat_qcq() ;
for (int l=0; l<nz; l++) {
xi.t[l]->set_etat_qcq() ;
for (int k=0; k<mg->get_np(l); k++) {
for (int j=0; j<mg->get_nt(l); j++) {
for (int i=0; i<mg->get_nr(l); i++) {
xi.set(l,k,j,i) =
mg->get_grille3d(l)->x[i] ;
}
}
}
}
Cmp fact_ent(mp) ;
fact_ent.allocate_all() ;
fact_ent.set(0) = 1 + epsilon * xi(0) * xi(0) ;
fact_ent.set(1) = 1 - 0.25 * epsilon * (xi(1) - 1) * (xi(1) - 1) ;
for (int l=nzet; l<nz; l++) {
fact_ent.set(l) = 1 ;
}
if (nzet > 1) {
if(nzet == 3) {
fact_ent.set(1) = 1 - 0.5 * epsilon * (xi(1) - 0.5) * (xi(1) - 0.5) ;
fact_ent.set(2) = 1 - 0.25 * epsilon * (xi(2) - 1) * (xi(2) - 1) ;
}
if (nzet > 3) {
cout << "Etoile::equation_of_state: not ready yet for nzet > 3 !"
<< endl ;
}
ent_eos = fact_ent * ent_eos ;
ent_eos.std_base_scal() ;
}
// Call to the EOS (the EOS is called domain by domain in order to
// allow for the use of MEos)
Cmp tempo(mp) ;
nbar.set_etat_qcq() ;
nbar.set() = 0 ;
for (int l=0; l<nzet; l++) {
Param par ; // Paramater for multi-domain equation of state
par.add_int(l) ;
tempo = eos.nbar_ent(ent_eos, 1, l, &par) ;
nbar = nbar() + tempo ;
}
ener.set_etat_qcq() ;
ener.set() = 0 ;
for (int l=0; l<nzet; l++) {
Param par ; // Paramater for multi-domain equation of state
par.add_int(l) ;
tempo = eos.ener_ent(ent_eos, 1, l, &par) ;
ener = ener() + tempo ;
}
press.set_etat_qcq() ;
press.set() = 0 ;
for (int l=0; l<nzet; l++) {
Param par ; // Paramater for multi-domain equation of state
par.add_int(l) ;
tempo = eos.press_ent(ent_eos, 1, l, &par) ;
press = press() + tempo ;
}
// Set the bases for spectral expansion
nbar.set_std_base() ;
ener.set_std_base() ;
press.set_std_base() ;
// The Eulerian quantities are obsolete
//## del_hydro_euler() ;
// The derived quantities are obsolete
del_deriv() ;
}
void Etoile::hydro_euler() {
cout <<
"Etoile::hydro_euler : hydro_euler must be called via a derived class"
<< endl << " of Etoile !" << endl ;
abort() ;
}
}
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Cmp::allocate_all
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition cmp.C:323
Lorene::Cmp::std_base_scal
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Definition cmp.C:644
Lorene::Cmp::set
Tbl & set(int l)
Read/write of the value in a given domain.
Definition cmp.h:724
Lorene::Eos_incomp_newt
Equation of state of incompressible matter (Newtonian case).
Definition eos.h:1376
Lorene::Eos_incomp
Equation of state of incompressible matter (relativistic case).
Definition eos.h:1206
Lorene::Eos_poly_newt
Polytropic equation of state (Newtonian case).
Definition eos.h:1044
Lorene::Eos_poly
Polytropic equation of state (relativistic case).
Definition eos.h:757
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Eos::eos_from_file
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
Definition eos_from_file.C:177
Lorene::Etoile::set_der_0x0
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition etoile.C:396
Lorene::Etoile::logn_auto_div
Tenseur logn_auto_div
Divergent part (if k_div!=0 ) of the logarithm of the part of the lapse N generated principaly by t...
Definition etoile.h:497
Lorene::Etoile::nzet
int nzet
Number of domains of *mp occupied by the star.
Definition etoile.h:432
Lorene::Etoile::p_mass_b
double * p_mass_b
Baryon mass.
Definition etoile.h:547
Lorene::Etoile::p_mass_g
double * p_mass_g
Gravitational mass.
Definition etoile.h:548
Lorene::Etoile::p_xi_surf
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
Definition etoile.h:545
Lorene::Etoile::operator=
void operator=(const Etoile &)
Assignment to another Etoile.
Definition etoile.C:430
Lorene::Etoile::logn_auto_regu
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star.
Definition etoile.h:491
Lorene::Etoile::ray_eq_pi
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Definition etoile_global.C:256
Lorene::Etoile::k_div
int k_div
Index of regularity of the gravitational potential logn_auto .
Definition etoile.h:449
Lorene::Etoile::ray_eq
double ray_eq() const
Coordinate radius at , [r_unit].
Definition etoile_global.C:120
Lorene::Etoile::nnn
Tenseur nnn
Total lapse function.
Definition etoile.h:509
Lorene::Etoile::logn_auto
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Definition etoile.h:484
Lorene::Etoile::nbar
Tenseur nbar
Baryon density in the fluid frame.
Definition etoile.h:459
Lorene::Etoile::eos
const Eos & eos
Equation of state of the stellar matter.
Definition etoile.h:451
Lorene::Etoile::equation_of_state
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Definition etoile.C:566
Lorene::Etoile::u_euler
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Definition etoile.h:474
Lorene::Etoile::p_l_surf
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...
Definition etoile.h:539
Lorene::Etoile::gam_euler
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition etoile.h:471
Lorene::Etoile::operator<<
friend ostream & operator<<(ostream &, const Etoile &)
Display.
Definition etoile.C:506
Lorene::Etoile::mp
Map & mp
Mapping associated with the star.
Definition etoile.h:429
Lorene::Etoile::p_ray_eq_3pis2
double * p_ray_eq_3pis2
Coordinate radius at , .
Definition etoile.h:530
Lorene::Etoile::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition etoile.C:378
Lorene::Etoile::p_ray_eq_pi
double * p_ray_eq_pi
Coordinate radius at , .
Definition etoile.h:527
Lorene::Etoile::mass_b
virtual double mass_b() const
Baryon mass.
Definition etoile_global.C:525
Lorene::Etoile::ener
Tenseur ener
Total energy density in the fluid frame.
Definition etoile.h:460
Lorene::Etoile::Etoile
Etoile(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i)
Standard constructor.
Definition etoile.C:143
Lorene::Etoile::ray_eq_pis2
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Definition etoile_global.C:169
Lorene::Etoile::~Etoile
virtual ~Etoile()
Destructor.
Definition etoile.C:367
Lorene::Etoile::p_ray_pole
double * p_ray_pole
Coordinate radius at .
Definition etoile.h:533
Lorene::Etoile::d_logn_auto_div
Tenseur d_logn_auto_div
Gradient of logn_auto_div (if k_div!=0 ).
Definition etoile.h:501
Lorene::Etoile::operator>>
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition etoile.C:511
Lorene::Etoile::press
Tenseur press
Fluid pressure.
Definition etoile.h:461
Lorene::Etoile::mass_g
virtual double mass_g() const
Gravitational mass.
Definition etoile_global.C:551
Lorene::Etoile::relativistic
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Definition etoile.h:437
Lorene::Etoile::p_ray_eq_pis2
double * p_ray_eq_pis2
Coordinate radius at , .
Definition etoile.h:524
Lorene::Etoile::ener_euler
Tenseur ener_euler
Total energy density in the Eulerian frame.
Definition etoile.h:465
Lorene::Etoile::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition etoile.C:483
Lorene::Etoile::shift
Tenseur shift
Total shift vector.
Definition etoile.h:512
Lorene::Etoile::hydro_euler
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition etoile.C:684
Lorene::Etoile::s_euler
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
Definition etoile.h:468
Lorene::Etoile::ent
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case).
Definition etoile.h:457
Lorene::Etoile::del_hydro_euler
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Definition etoile.C:410
Lorene::Etoile::beta_auto
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Definition etoile.h:506
Lorene::Etoile::a_car
Tenseur a_car
Total conformal factor .
Definition etoile.h:515
Lorene::Etoile::set_enthalpy
void set_enthalpy(const Cmp &)
Assignment of the enthalpy field.
Definition etoile.C:465
Lorene::Etoile::unsurc2
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Definition etoile.h:442
Lorene::Etoile::p_ray_eq
double * p_ray_eq
Coordinate radius at , .
Definition etoile.h:521
Lorene::Etoile::ray_pole
double ray_pole() const
Coordinate radius at [r_unit].
Definition etoile_global.C:415
Lorene::Grille3d::x
double * x
Array of values of at the nr collocation points.
Definition grilles.h:209
Lorene::Mg3d
Multi-domain grid.
Definition grilles.h:273
Lorene::Mg3d::get_grille3d
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
Definition grilles.h:500
Lorene::Mg3d::get_np
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition grilles.h:462
Lorene::Mg3d::get_nt
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition grilles.h:457
Lorene::Mg3d::get_nzone
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
Lorene::Mg3d::get_nr
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition grilles.h:452
Lorene::Mtbl
Multi-domain array.
Definition mtbl.h:118
Lorene::Mtbl::set
Tbl & set(int l)
Read/write of the Tbl in a given domain.
Definition mtbl.h:221
Lorene::Mtbl::t
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
Definition mtbl.h:132
Lorene::Mtbl::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition mtbl.C:299
Lorene::Param
Parameter storage.
Definition param.h:125
Lorene::Param::add_int
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition param.C:246
Lorene::Tbl::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tbl.C:361
Lorene::Tenseur
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
Lorene::fread_be
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Definition fread_be.C:69
Lorene::fwrite_be
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.
Definition fwrite_be.C:70
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::get_bvect_cart
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Definition map.h:791
Lorene::get_bvect_spher
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Definition map.h:783
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139
Unites
Standard units of space, time and mass.