star_bin_xcts.C
/*
* Methods for the class Star_bin_xcts
* (see file star.h for documentation)
*/
/*
* Copyright (c) 2010 Michal Bejger
*
* 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 version 2
* as published by the Free Software Foundation.
*
* 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 star_bin_xcts_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_xcts.C,v 1.9 2014/10/13 08:53:39 j_novak Exp $" ;
/*
* $Id: star_bin_xcts.C,v 1.9 2014/10/13 08:53:39 j_novak Exp $
* $Log: star_bin_xcts.C,v $
* Revision 1.9 2014/10/13 08:53:39 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.8 2010/12/09 10:45:26 m_bejger
* Added psi4 in the constructor, removed fait_decouple
*
* Revision 1.7 2010/10/28 13:50:27 m_bejger
* Added mass-shedding estimation to Star_bin_xcts::operator>>
*
* Revision 1.6 2010/10/26 20:18:34 m_bejger
* Correction to stdin output
*
* Revision 1.5 2010/10/26 19:57:02 m_bejger
* Various cleanups
*
* Revision 1.4 2010/06/17 15:06:25 m_bejger
* N, Psi output corrected
*
* Revision 1.3 2010/06/15 08:18:19 m_bejger
* Method set_chi_comp() added
*
* Revision 1.2 2010/06/04 19:59:56 m_bejger
* Corrected definitions of lapse and Psi4
*
* Revision 1.1 2010/05/04 07:51:05 m_bejger
* Initial version
*
* $Header: /cvsroot/Lorene/C++/Source/Star/star_bin_xcts.C,v 1.9 2014/10/13 08:53:39 j_novak Exp $
*
*/
// Headers C
#include "math.h"
// Headers Lorene
#include "etoile.h"
#include "star.h"
#include "eos.h"
#include "unites.h"
// Local prototype
namespace Lorene {
Cmp raccord_c1(const Cmp& uu, int l1) ;
//--------------//
// Constructors //
//--------------//
// Standard constructor
// --------------------
Star_bin_xcts::Star_bin_xcts(Map& mpi,
int nzet_i,
const Eos& eos_i,
bool irrot)
: Star(mpi, nzet_i, eos_i),
irrotational(irrot),
psi0(mpi),
d_psi(mpi, COV, mpi.get_bvect_cart()),
wit_w(mpi, CON, mpi.get_bvect_cart()),
loggam(mpi),
bsn(mpi, CON, mpi.get_bvect_cart()),
pot_centri(mpi),
chi_auto(mpi),
chi_comp(mpi),
Psi_auto(mpi),
Psi_comp(mpi),
Psi(mpi),
chi(mpi),
psi4(mpi),
w_beta(mpi, CON, mpi.get_bvect_cart()),
khi(mpi),
dcov_Psi(mpi, COV, mpi.get_bvect_cart()),
dcov_chi(mpi, COV, mpi.get_bvect_cart()),
flat(mpi, mpi.get_bvect_cart()),
beta_auto(mpi, CON, mpi.get_bvect_cart()),
beta_comp(mpi, CON, mpi.get_bvect_cart()),
haij_auto(mpi, CON, mpi.get_bvect_cart()),
haij_comp(mpi, CON, mpi.get_bvect_cart()),
hacar_auto(mpi),
hacar_comp(mpi),
ssjm1_chi(mpi),
ssjm1_psi(mpi),
ssjm1_khi(mpi),
ssjm1_wbeta(mpi, CON, mpi.get_bvect_cart()) {
// Pointers of derived quantities initialized to zero :
set_der_0x0() ;
// Quantities defined on a spherical triad in star.C are put on
// a cartesian one
u_euler.change_triad(mpi.get_bvect_cart()) ;
stress_euler.change_triad(mpi.get_bvect_cart()) ;
beta.change_triad(mpi.get_bvect_cart()) ;
Metric temp_met (mp.flat_met_cart()) ;
gamma = temp_met ;
// Initialization of all quantities :
psi0 = 0 ;
d_psi.set_etat_zero() ;
wit_w.set_etat_zero() ;
loggam = 0 ;
bsn.set_etat_zero() ;
pot_centri = 0 ;
Psi_auto = 0 ;
Psi_comp = 0 ;
beta_auto.set_etat_zero() ;
beta_comp.set_etat_zero() ;
chi_auto = 0 ;
chi_comp = 0 ;
Psi = 1. ;
chi = 1. ;
w_beta.set_etat_zero() ;
khi = 0 ;
dcov_Psi.set_etat_zero() ;
dcov_chi.set_etat_zero() ;
haij_auto.set_etat_zero() ;
haij_comp.set_etat_zero() ;
hacar_auto = 0 ;
hacar_comp = 0 ;
ssjm1_psi = 0 ;
ssjm1_chi = 0 ;
ssjm1_khi = 0 ;
ssjm1_wbeta.set_etat_zero() ;
}
// Copy constructor
// ----------------
Star_bin_xcts::Star_bin_xcts(const Star_bin_xcts& star)
: Star(star),
irrotational(star.irrotational),
psi0(star.psi0),
d_psi(star.d_psi),
wit_w(star.wit_w),
loggam(star.loggam),
bsn(star.bsn),
pot_centri(star.pot_centri),
chi_auto(star.chi_auto),
chi_comp(star.chi_comp),
Psi_auto(star.Psi_auto),
Psi_comp(star.Psi_comp),
Psi(star.Psi),
chi(star.chi),
psi4(star.psi4),
w_beta(star.w_beta),
khi(star.khi),
dcov_Psi(star.dcov_Psi),
dcov_chi(star.dcov_chi),
flat(star.flat),
beta_auto(star.beta_auto),
beta_comp(star.beta_comp),
haij_auto(star.haij_auto),
haij_comp(star.haij_comp),
hacar_auto(star.hacar_auto),
hacar_comp(star.hacar_comp),
ssjm1_chi(star.ssjm1_chi),
ssjm1_psi(star.ssjm1_psi),
ssjm1_khi(star.ssjm1_khi),
ssjm1_wbeta(star.ssjm1_wbeta) {
set_der_0x0() ;
}
// Constructor from a file
// -----------------------
Star_bin_xcts::Star_bin_xcts(Map& mpi,
const Eos& eos_i,
FILE* fich)
: Star(mpi, eos_i, fich),
psi0(mpi),
d_psi(mpi, COV, mpi.get_bvect_cart()),
wit_w(mpi, CON, mpi.get_bvect_cart()),
loggam(mpi),
bsn(mpi, CON, mpi.get_bvect_cart()),
pot_centri(mpi),
chi_auto(mpi, *(mpi.get_mg()), fich),
chi_comp(mpi),
Psi_auto(mpi, *(mpi.get_mg()), fich),
Psi_comp(mpi),
Psi(mpi),
chi(mpi),
psi4(mpi),
w_beta(mpi, mpi.get_bvect_cart(), fich),
khi(mpi, *(mpi.get_mg()), fich),
dcov_Psi(mpi, COV, mpi.get_bvect_cart()),
dcov_chi(mpi, COV, mpi.get_bvect_cart()),
flat(mpi, mpi.get_bvect_cart()),
beta_auto(mpi, mpi.get_bvect_cart(), fich),
beta_comp(mpi, CON, mpi.get_bvect_cart()),
haij_auto(mpi, CON, mpi.get_bvect_cart()),
haij_comp(mpi, CON, mpi.get_bvect_cart()),
hacar_auto(mpi),
hacar_comp(mpi),
ssjm1_chi(mpi, *(mpi.get_mg()), fich),
ssjm1_psi(mpi, *(mpi.get_mg()), fich),
ssjm1_khi(mpi, *(mpi.get_mg()), fich),
ssjm1_wbeta(mpi, mpi.get_bvect_cart(), fich) {
// Star parameters
// -----------------
// irrotational is read in the file:
bool status = fread(&irrotational, sizeof(bool), 1, fich) ;
if(!status)
cout << "Star_bin_xcts::Constructor from a file: Problem with reading ! " << endl ;
// Read of the saved fields:
// ------------------------
if (irrotational) {
Scalar psi0_file(mp, *(mp.get_mg()), fich) ;
psi0 = psi0_file ;
Scalar gam_euler_file(mp, *(mp.get_mg()), fich) ;
gam_euler = gam_euler_file ;
}
// Quantities defined on a spherical triad in star.C are put on
// a cartesian one
u_euler.change_triad(mpi.get_bvect_cart()) ;
stress_euler.change_triad(mpi.get_bvect_cart()) ;
beta.change_triad(mpi.get_bvect_cart()) ;
Metric temp_met (mp.flat_met_cart()) ;
gamma = temp_met ;
// All other fields are initialized to initial values :
// ----------------------------------------------------
d_psi.set_etat_zero() ;
wit_w.set_etat_zero() ;
loggam = 0 ;
bsn.set_etat_zero() ;
pot_centri = 0 ;
Psi_comp = 0 ;
dcov_Psi.set_etat_zero() ;
beta_comp.set_etat_zero() ;
chi_comp = 0 ;
w_beta.set_etat_zero() ;
khi = 0 ;
dcov_chi.set_etat_zero() ;
haij_auto.set_etat_zero() ;
haij_comp.set_etat_zero() ;
hacar_auto = 0 ;
hacar_comp = 0 ;
// Pointers of derived quantities initialized to zero
// --------------------------------------------------
set_der_0x0() ;
}
//------------//
// Destructor //
//------------//
Star_bin_xcts::~Star_bin_xcts() {
del_deriv() ;
}
//----------------------------------//
// Management of derived quantities //
//----------------------------------//
void Star_bin_xcts::del_deriv() const {
Star::del_deriv() ;
if (p_xa_barycenter != 0x0) delete p_xa_barycenter ;
set_der_0x0() ;
}
void Star_bin_xcts::set_der_0x0() const {
Star::set_der_0x0() ;
p_xa_barycenter = 0x0 ;
}
void Star_bin_xcts::del_hydro_euler() {
Star::del_hydro_euler() ;
del_deriv() ;
}
//--------------//
// Assignment //
//--------------//
// Assignment to another Star_bin_xcts
// --------------------------------
void Star_bin_xcts::operator=(const Star_bin_xcts& star) {
// Assignment of quantities common to the derived classes of Star
Star::operator=(star) ;
// Assignement of proper quantities of class Star_bin_xcts
irrotational = star.irrotational ;
psi0 = star.psi0 ;
d_psi = star.d_psi ;
wit_w = star.wit_w ;
loggam = star.loggam ;
bsn = star.bsn ;
pot_centri = star.pot_centri ;
Psi_auto = star.Psi_auto ;
Psi_comp = star.Psi_comp ;
chi_auto = star.chi_auto ;
chi_comp = star.chi_comp ;
Psi = star.Psi ;
chi = star.chi ;
psi4 = star.psi4 ;
w_beta = star.w_beta ;
khi = star.khi ;
dcov_Psi = star.dcov_Psi ;
dcov_chi = star.dcov_chi ;
flat = star.flat ;
beta_auto = star.beta_auto ;
beta_comp = star.beta_comp ;
haij_auto = star.haij_auto ;
haij_comp = star.haij_comp ;
hacar_auto = star.hacar_auto ;
hacar_comp = star.hacar_comp ;
ssjm1_psi = star.ssjm1_psi ;
ssjm1_chi = star.ssjm1_chi ;
ssjm1_khi = star.ssjm1_khi ;
ssjm1_wbeta = star.ssjm1_wbeta ;
del_deriv() ; // Deletes all derived quantities
}
Scalar& Star_bin_xcts::set_pot_centri() {
del_deriv() ; // sets to 0x0 all the derived quantities
return pot_centri ;
}
Scalar& Star_bin_xcts::set_Psi_comp() {
del_deriv() ; // sets to 0x0 all the derived quantities
return Psi_comp ;
}
Scalar& Star_bin_xcts::set_Psi_auto() {
del_deriv() ; // sets to 0x0 all the derived quantities
return Psi_auto ;
}
Scalar& Star_bin_xcts::set_chi_comp() {
del_deriv() ; // sets to 0x0 all the derived quantities
return chi_comp ;
}
Scalar& Star_bin_xcts::set_chi_auto() {
del_deriv() ; // sets to 0x0 all the derived quantities
return chi_auto ;
}
Vector& Star_bin_xcts::set_beta_auto() {
del_deriv() ; // sets to 0x0 all the derived quantities
return beta_auto ;
}
Vector& Star_bin_xcts::set_beta() {
del_deriv() ; // sets to 0x0 all the derived quantities
return beta ;
}
//--------------//
// Outputs //
//--------------//
// Save in a file
// --------------
void Star_bin_xcts::sauve(FILE* fich) const {
Star::sauve(fich) ;
chi_auto.sauve(fich) ;
Psi_auto.sauve(fich) ;
w_beta.sauve(fich) ;
khi.sauve(fich) ;
beta_auto.sauve(fich) ;
ssjm1_chi.sauve(fich) ;
ssjm1_psi.sauve(fich) ;
ssjm1_khi.sauve(fich) ;
ssjm1_wbeta.sauve(fich) ;
fwrite(&irrotational, sizeof(bool), 1, fich) ;
if (irrotational) {
psi0.sauve(fich) ;
gam_euler.sauve(fich) ; // required to construct d_psi from psi0
}
}
// Printing
// --------
ostream& Star_bin_xcts::operator>>(ostream& ost) const {
using namespace Unites ;
// Star::operator>>(ost) ;
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.val_grid_point(0,0,0,0) << " c^2" << endl ;
ost << "Central proper baryon density : " << nbar.val_grid_point(0,0,0,0)
<< " x 0.1 fm^-3" << endl ;
ost << "Central proper energy density : " << ener.val_grid_point(0,0,0,0)
<< " rho_nuc c^2" << endl ;
ost << "Central pressure : " << press.val_grid_point(0,0,0,0)
<< " rho_nuc c^2" << endl ;
ost << endl ;
Scalar psi4_local = pow(Psi_auto + Psi_comp + 1., 4.) ;
psi4_local.std_spectral_base() ;
ost << "Central lapse N : " << nn.val_grid_point(0,0,0,0) << endl ;
ost << "Central value of Psi^4 : " << psi4_local.val_grid_point(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 ;
double dent_eq = ent.dsdr().val_point(ray_eq(),M_PI/2.,0.) ;
double dent_pole = ent.dsdr().val_point(ray_pole(),0.,0.) ;
double mass_shedd_chi = fabs( dent_eq / dent_pole ) ;
ost << "Mass-shedding estimator = " << mass_shedd_chi << endl ;
ost << endl << "Baryon mass : " << mass_b() / msol << " M_sol" << endl ;
ost << "Gravitational mass : " << mass_g() / msol << " M_sol" << endl ;
ost << endl ;
ost << "Star in a binary system" << endl ;
ost << "-----------------------" << endl ;
if (irrotational) {
ost << "irrotational configuration" << endl ;
}
else {
ost << "corotating configuration" << endl ;
}
ost << "Absolute abscidia of the stellar center: " <<
mp.get_ori_x() / km << " km" << endl ;
ost << "Absolute abscidia of the barycenter of the baryon density : " <<
xa_barycenter() / km << " km" << endl ;
double r_0 = 0.5 * ( ray_eq() + ray_eq_pi() ) ;
double d_ns = fabs( mp.get_ori_x() ) + ray_eq_pi() - r_0 ;
double d_tilde = 2 * d_ns / r_0 ;
ost << "d_tilde : " << d_tilde << endl ;
ost << "Central value of gam_euler : "
<< gam_euler.val_grid_point(0, 0, 0, 0) << endl ;
ost << "Central u_euler (U^r, U^t, U^p) [c] : "
<< u_euler(1).val_grid_point(0, 0, 0, 0) << " "
<< u_euler(2).val_grid_point(0, 0, 0, 0) << " "
<< u_euler(3).val_grid_point(0, 0, 0, 0) << endl ;
if (irrotational) {
ost << "Central d_psi (r, t, p) [c] : "
<< d_psi(1).val_grid_point(0, 0, 0, 0) << " "
<< d_psi(2).val_grid_point(0, 0, 0, 0) << " "
<< d_psi(3).val_grid_point(0, 0, 0, 0) << endl ;
ost << "Central vel. / co-orb. (W^r, W^t, W^p) [c] : "
<< wit_w(1).val_grid_point(0, 0, 0, 0) << " "
<< wit_w(2).val_grid_point(0, 0, 0, 0) << " "
<< wit_w(3).val_grid_point(0, 0, 0, 0) << endl ;
ost << "Max vel. / co-orb. (W^r, W^t, W^p) [c] : "
<< max(max(wit_w(1))) << " "
<< max(max(wit_w(2))) << " "
<< max(max(wit_w(3))) << endl ;
ost << "Min vel. / co-orb. (W^r, W^t, W^p) [c] : "
<< min(min(wit_w(1))) << " "
<< min(min(wit_w(2))) << " "
<< min(min(wit_w(3))) << endl ;
double r_surf = mp.val_r(0,1.,M_PI/4,M_PI/4) ;
ost << "Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : "
<< wit_w(1).val_point(r_surf,M_PI/4,M_PI/4) << " "
<< wit_w(2).val_point(r_surf,M_PI/4,M_PI/4) << " "
<< wit_w(3).val_point(r_surf,M_PI/4,M_PI/4) << endl ;
ost << "Central value of loggam : "
<< loggam.val_grid_point(0, 0, 0, 0) << endl ;
}
ost << "Central value of Psi auto, comp : "
<< Psi_auto.val_grid_point(0, 0, 0, 0) << " "
<< Psi_comp.val_grid_point(0, 0, 0, 0) << endl ;
ost << "Central value of beta (N^r, N^t, N^p) [c] : "
<< beta(1).val_grid_point(0, 0, 0, 0) << " "
<< beta(2).val_grid_point(0, 0, 0, 0) << " "
<< beta(3).val_grid_point(0, 0, 0, 0) << endl ;
ost << " ... beta_auto part of it [c] : "
<< beta_auto(1).val_grid_point(0, 0, 0, 0) << " "
<< beta_auto(2).val_grid_point(0, 0, 0, 0) << " "
<< beta_auto(3).val_grid_point(0, 0, 0, 0) << endl ;
ost << endl << "Central value of (B^r, B^t, B^p)/N [c] : "
<< bsn(1).val_grid_point(0, 0, 0, 0) << " "
<< bsn(2).val_grid_point(0, 0, 0, 0) << " "
<< bsn(3).val_grid_point(0, 0, 0, 0) << endl ;
ost << endl << "Central \\hat{A}^{ij} [c/km] : " << endl ;
ost << " \\hat{A}^{xx} auto, comp : "
<< haij_auto(1, 1).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(1, 1).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << " A^{xy} auto, comp : "
<< haij_auto(1, 2).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(1, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << " A^{xz} auto, comp : "
<< haij_auto(1, 3).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(1, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << " A^{yy} auto, comp : "
<< haij_auto(2, 2).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(2, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << " A^{yz} auto, comp : "
<< haij_auto(2, 3).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(2, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << " A^{zz} auto, comp : "
<< haij_auto(3, 3).val_grid_point(0, 0, 0, 0) * km << " "
<< haij_comp(3, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
ost << endl << "Central \\hat{A}_{ij}\\hat{A}^{ij} [c^2/km^2] : "
<< endl ;
ost << " \\hat{A}_{ij}\\hat{A}^{ij} auto, comp : "
<< hacar_auto.val_grid_point(0, 0, 0, 0) * km*km << " "
<< hacar_comp.val_grid_point(0, 0, 0, 0) * km*km << endl ;
return ost ;
}
//-------------------------//
// Computational routines //
//-------------------------//
void Star_bin_xcts::fait_d_psi() {
if (!irrotational) {
d_psi.set_etat_nondef() ;
return ;
}
// Specific relativistic enthalpy ---> hhh
//----------------------------------
Scalar hhh = exp(ent) ; // = 1 at the Newtonian limit
// Computation of W^i = - h Gamma_n B^i/N
//----------------------------------------------
Vector www = hhh * gam_euler * bsn * psi4 ;
// Constant value of W^i at the center of the star
//-------------------------------------------------
Vector v_orb(mp, COV, mp.get_bvect_cart()) ;
for (int i=1; i<=3; i++)
v_orb.set(i) = www(i).val_grid_point(0, 0, 0, 0) ;
// Gradient of psi
//----------------
Vector d_psi0 = psi0.derive_cov(flat) ;
d_psi0.change_triad( mp.get_bvect_cart() ) ;
d_psi0.std_spectral_base() ;
d_psi = d_psi0 + v_orb ;
for (int i=1; i<=3; i++) {
if (d_psi(i).get_etat() == ETATZERO)
d_psi.set(i).annule_hard() ;
}
// C^1 continuation of d_psi outside the star
// (to ensure a smooth enthalpy field accross the stellar surface)
// ----------------------------------------------------------------
int nzm1 = mp.get_mg()->get_nzone() - 1 ;
d_psi.annule(nzet, nzm1) ;
for (int i=1; i<=3; i++) {
Cmp d_psi_i (d_psi(i)) ;
d_psi_i.va.set_base( d_psi0(i).get_spectral_va().base ) ;
d_psi_i = raccord_c1(d_psi_i, nzet) ;
d_psi.set(i) = d_psi_i ;
}
d_psi.std_spectral_base() ;
}
void Star_bin_xcts::relaxation(const Star_bin_xcts& star_jm1,
double relax_ent,
double relax_met,
int mer,
int fmer_met) {
double relax_ent_jm1 = 1. - relax_ent ;
double relax_met_jm1 = 1. - relax_met ;
ent = relax_ent * ent + relax_ent_jm1 * star_jm1.ent ;
if ( (mer != 0) && (mer % fmer_met == 0)) {
Psi_auto = relax_met * Psi_auto
+ relax_met_jm1 * star_jm1.Psi_auto ;
chi_auto = relax_met * chi_auto
+ relax_met_jm1 * star_jm1.chi_auto ;
beta_auto = relax_met * beta_auto
+ relax_met_jm1 * star_jm1.beta_auto ;
}
del_deriv() ;
equation_of_state() ;
}
}
Lorene::Cmp
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Lorene::Cmp::va
Valeur va
The numerical value of the Cmp.
Definition cmp.h:464
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Metric
Metric for tensor calculation.
Definition metric.h:90
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Scalar::std_spectral_base
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Definition scalar.C:784
Lorene::Scalar::val_grid_point
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Definition scalar.h:637
Lorene::Star_bin_xcts::Psi
Scalar Psi
Total conformal factor .
Definition star.h:1152
Lorene::Star_bin_xcts::psi0
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case).
Definition star.h:1104
Lorene::Star_bin_xcts::set_pot_centri
Scalar & set_pot_centri()
Read/write the centrifugal potential.
Definition star_bin_xcts.C:376
Lorene::Star_bin_xcts::operator=
void operator=(const Star_bin_xcts &)
Assignment to another Star_bin_xcts.
Definition star_bin_xcts.C:336
Lorene::Star_bin_xcts::pot_centri
Scalar pot_centri
Centrifugal potential.
Definition star.h:1129
Lorene::Star_bin_xcts::haij_auto
Sym_tensor haij_auto
Part of the extrinsic curvature tensor generated by beta_auto.
Definition star.h:1193
Lorene::Star_bin_xcts::set_beta_auto
Vector & set_beta_auto()
Read/write of .
Definition star_bin_xcts.C:411
Lorene::Star_bin_xcts::fait_d_psi
void fait_d_psi()
Computes the gradient of the total velocity potential .
Definition star_bin_xcts.C:631
Lorene::Star_bin_xcts::psi4
Scalar psi4
Conformal factor .
Definition star.h:1158
Lorene::Star_bin_xcts::wit_w
Vector wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
Definition star.h:1115
Lorene::Star_bin_xcts::xa_barycenter
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density,.
Definition star_bin_global_xcts.C:99
Lorene::Star_bin_xcts::set_der_0x0
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition star_bin_xcts.C:313
Lorene::Star_bin_xcts::flat
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) .
Definition star.h:1177
Lorene::Star_bin_xcts::set_beta
Vector & set_beta()
Read/write of .
Definition star_bin_xcts.C:418
Lorene::Star_bin_xcts::ssjm1_khi
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for khi.
Definition star.h:1227
Lorene::Star_bin_xcts::khi
Scalar khi
Solution for the scalar part of the vector Poisson equation for .
Definition star.h:1168
Lorene::Star_bin_xcts::Star_bin_xcts
Star_bin_xcts(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot)
Standard constructor.
Definition star_bin_xcts.C:81
Lorene::Star_bin_xcts::ssjm1_wbeta
Vector ssjm1_wbeta
Effective source at the previous step for wbeta of the vector Poisson equation for wbeta (needed for ...
Definition star.h:1234
Lorene::Star_bin_xcts::Psi_comp
Scalar Psi_comp
Scalar field generated principally by the companion star.
Definition star.h:1149
Lorene::Star_bin_xcts::ssjm1_chi
Scalar ssjm1_chi
Effective source at the previous step for the resolution of the Poisson equation for \chi_auto .
Definition star.h:1216
Lorene::Star_bin_xcts::dcov_Psi
Vector dcov_Psi
Covariant derivative of the conformal factor .
Definition star.h:1171
Lorene::Star_bin_xcts::beta_comp
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Definition star.h:1187
Lorene::Star_bin_xcts::beta_auto
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Definition star.h:1182
Lorene::Star_bin_xcts::Psi_auto
Scalar Psi_auto
Scalar field generated principally by the star.
Definition star.h:1144
Lorene::Star_bin_xcts::hacar_comp
Scalar hacar_comp
Part of the scalar generated by beta_auto and beta_comp, i.e.
Definition star.h:1211
Lorene::Star_bin_xcts::chi
Scalar chi
Total function .
Definition star.h:1155
Lorene::Star_bin_xcts::set_chi_comp
Scalar & set_chi_comp()
Read/write the conformal factor .
Definition star_bin_xcts.C:397
Lorene::Star_bin_xcts::bsn
Vector bsn
3-vector shift, divided by N, of the rotating coordinates, .
Definition star.h:1126
Lorene::Star_bin_xcts::del_hydro_euler
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Definition star_bin_xcts.C:321
Lorene::Star_bin_xcts::loggam
Scalar loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Definition star.h:1120
Lorene::Star_bin_xcts::set_chi_auto
Scalar & set_chi_auto()
Read/write the conformal factor .
Definition star_bin_xcts.C:404
Lorene::Star_bin_xcts::haij_comp
Sym_tensor haij_comp
Part of the extrinsic curvature tensor generated by beta_comp.
Definition star.h:1199
Lorene::Star_bin_xcts::set_Psi_comp
Scalar & set_Psi_comp()
Read/write the conformal factor .
Definition star_bin_xcts.C:383
Lorene::Star_bin_xcts::set_Psi_auto
Scalar & set_Psi_auto()
Read/write the conformal factor .
Definition star_bin_xcts.C:390
Lorene::Star_bin_xcts::operator>>
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition star_bin_xcts.C:463
Lorene::Star_bin_xcts::dcov_chi
Vector dcov_chi
Covariant derivative of the function .
Definition star.h:1174
Lorene::Star_bin_xcts::chi_auto
Scalar chi_auto
Scalar field generated principally by the star.
Definition star.h:1134
Lorene::Star_bin_xcts::mass_g
virtual double mass_g() const
Gravitational mass.
Definition star_bin_global_xcts.C:74
Lorene::Star_bin_xcts::w_beta
Vector w_beta
Solution for the vector part of the vector Poisson equation for .
Definition star.h:1163
Lorene::Star_bin_xcts::chi_comp
Scalar chi_comp
Scalar field generated principally by the companion star.
Definition star.h:1139
Lorene::Star_bin_xcts::ssjm1_psi
Scalar ssjm1_psi
Effective source at the previous step for the resolution of the Poisson equation for \Psi_auto .
Definition star.h:1221
Lorene::Star_bin_xcts::relaxation
void relaxation(const Star_bin_xcts &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent, Psi_auto, chi_auto and beta_auto.
Definition star_bin_xcts.C:689
Lorene::Star_bin_xcts::irrotational
bool irrotational
true for an irrotational star, false for a corotating one
Definition star.h:1099
Lorene::Star_bin_xcts::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition star_bin_xcts.C:304
Lorene::Star_bin_xcts::d_psi
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
Definition star.h:1109
Lorene::Star_bin_xcts::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition star_bin_xcts.C:432
Lorene::Star_bin_xcts::mass_b
virtual double mass_b() const
Baryon mass.
Definition star_bin_global_xcts.C:50
Lorene::Star_bin_xcts::~Star_bin_xcts
virtual ~Star_bin_xcts()
Destructor.
Definition star_bin_xcts.C:294
Lorene::Star_bin_xcts::p_xa_barycenter
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Definition star.h:1240
Lorene::Star_bin_xcts::hacar_auto
Scalar hacar_auto
Part of the scalar generated by beta_auto, i.e.
Definition star.h:1205
Lorene::Star::Star
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
Definition star.C:124
Lorene::Star::ener
Scalar ener
Total energy density in the fluid frame.
Definition star.h:193
Lorene::Star::nn
Scalar nn
Lapse function N .
Definition star.h:225
Lorene::Star::del_hydro_euler
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Definition star.C:330
Lorene::Star::eos
const Eos & eos
Equation of state of the stellar matter.
Definition star.h:185
Lorene::Star::nbar
Scalar nbar
Baryon density in the fluid frame.
Definition star.h:192
Lorene::Star::equation_of_state
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Definition star.C:462
Lorene::Star::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition star.C:298
Lorene::Star::gam_euler
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition star.h:204
Lorene::Star::set_der_0x0
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition star.C:316
Lorene::Star::ray_eq
double ray_eq() const
Coordinate radius at , [r_unit].
Definition star_global.C:108
Lorene::Star::gamma
Metric gamma
3-metric
Definition star.h:235
Lorene::Star::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition star.C:397
Lorene::Star::ray_eq_pis2
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Definition star_global.C:138
Lorene::Star::stress_euler
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Definition star.h:212
Lorene::Star::press
Scalar press
Fluid pressure.
Definition star.h:194
Lorene::Star::ray_eq_pi
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Definition star_global.C:186
Lorene::Star::ent
Scalar ent
Log-enthalpy.
Definition star.h:190
Lorene::Star::u_euler
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Definition star.h:207
Lorene::Star::mp
Map & mp
Mapping associated with the star.
Definition star.h:180
Lorene::Star::operator=
void operator=(const Star &)
Assignment to another Star.
Definition star.C:351
Lorene::Star::nzet
int nzet
Number of domains of *mp occupied by the star.
Definition star.h:183
Lorene::Star::beta
Vector beta
Shift vector.
Definition star.h:228
Lorene::Star::ray_pole
double ray_pole() const
Coordinate radius at [r_unit].
Definition star_global.C:278
Lorene::Valeur::set_base
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base ).
Definition valeur.C:810
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene::Vector::std_spectral_base
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition vector.C:316
Lorene::Vector::change_triad
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition vector_change_triad.C:75
Lorene::Vector::set
Scalar & set(int)
Read/write access to a component.
Definition vector.C:296
Lorene::exp
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:270
Lorene::min
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Definition cmp_math.C:458
Lorene::max
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition cmp_math.C:435
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
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_mg
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition map.h:765
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139
Unites
Standard units of space, time and mass.