star_rot_dirac.h
/*
* Definition of Lorene class Star_rot_Dirac
*
*/
/*
* Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
*
* 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
*
*/
#ifndef __STAR_ROT_DIRAC_H_
#define __STAR_ROT_DIRAC_H_
/*
*
* $Header: /cvsroot/Lorene/C++/Include/star_rot_dirac.h,v 1.8 2014/10/13 08:52:36 j_novak Exp $
*
*/
// Headers Lorene
#include "star.h"
namespace Lorene {
class Star_rot_Dirac : public Star {
// Data :
// -----
protected:
int spectral_filter ;
double omega ;
// Quantities related to the conformal factor and lapse
//----------------------------------
Scalar psi4 ;
Scalar psi2 ;
Scalar qqq ;
Scalar ln_psi ;
// Fluid quantities
//-----------------------------------------
Vector j_euler ;
Scalar v2 ;
// Metric stuff
//-------------------------------------
const Metric_flat& flat ;
Metric tgamma ;
Sym_tensor aa ;
Sym_tensor taa ;
Scalar aa_quad ;
Sym_tensor_trans hh ;
// Derived data :
// ------------
protected:
// More to come later.....
//----------------------------
mutable double* p_angu_mom ;
mutable double* p_grv2 ;
mutable double* p_grv3 ;
mutable double* p_tsw ;
mutable double* p_r_circ ;
mutable double* p_rp_circ ;
// Constructors - Destructor
// -------------------------
public:
Star_rot_Dirac(Map& mp_i, int nzet_i, const Eos& eos_i, int filter=0) ;
Star_rot_Dirac(const Star_rot_Dirac& ) ;
Star_rot_Dirac(Map& mp_i, const Eos& eos_i, FILE* fich) ;
virtual ~Star_rot_Dirac() ;
// Memory management
// -----------------
protected:
virtual void del_deriv() const ;
void set_der_0x0() const ;
virtual void del_hydro_euler() ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Star_rot_Dirac& ) ;
// Accessors
// ---------
public:
int spectral_filter_order() const {return spectral_filter;};
double get_omega() const {return omega;} ;
const Scalar& get_psi4() const {return psi4;} ;
const Scalar& get_psi2() const {return psi2;} ;
const Scalar& get_qqq() const {return qqq;} ;
const Scalar& get_ln_psi() const {return ln_psi;} ;
// Fluid stuff
//------------------
const Vector& get_j_euler() const {return j_euler;} ;
const Scalar& get_v2() const {return v2;} ;
//Metric stuff
//-------------------
const Metric get_tgamma() const {return tgamma;} ;
// documentation comes later......
const Sym_tensor get_aa() const {return aa;} ;
const Sym_tensor get_taa() const {return taa;} ;
const Scalar get_aa_quad() const {return aa_quad;} ;
const Sym_tensor_trans get_hh() const {return hh;} ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ;
protected:
virtual ostream& operator>>(ostream& ) const ;
// Global quantities
//-------------------------
public:
virtual double mass_b() const ;
virtual double mass_g() const ;
virtual double angu_mom() const ;
virtual double grv2() const ;
virtual double grv3() const ;
virtual double tsw() const ;
virtual double aplat() const ;
virtual double r_circ() const ;
virtual double rp_circ() const ;
virtual double ellipt() const ;
// Computational routines
//--------------------------
public:
virtual void hydro_euler() ;
void update_metric() ;
void equilibrium(double ent_c, double omega0, double fact_omega,
int nzadapt, const Tbl& ent_limit,
const Itbl& icontrol, const Tbl& control,
double mbar_wanted, double aexp_mass,
Tbl& diff) ;
void solve_logn_f(Scalar& ln_f_new) const ;
void solve_logn_q(Scalar& ln_q_new) const ;
void solve_qqq(Scalar& q_new) const ;
void solve_shift(Vector& shift_new) const ;
void solve_hij(Sym_tensor_trans& hij_new) const ;
};
}
#endif
Lorene::Eos
Equation of state base class.
Definition eos.h:190
Lorene::Itbl
Basic integer array class.
Definition itbl.h:122
Lorene::Metric_flat
Flat metric for tensor calculation.
Definition metric.h:261
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::Star_rot_Dirac::aa
Sym_tensor aa
Definition star_rot_dirac.h:87
Lorene::Star_rot_Dirac::get_aa_quad
const Scalar get_aa_quad() const
Returns .
Definition star_rot_dirac.h:239
Lorene::Star_rot_Dirac::get_tgamma
const Metric get_tgamma() const
Returns the conformal metric .
Definition star_rot_dirac.h:222
Lorene::Star_rot_Dirac::mass_g
virtual double mass_g() const
Gravitational mass.
Definition strot_dirac_global.C:117
Lorene::Star_rot_Dirac::ellipt
virtual double ellipt() const
Ellipticity e.
Definition strot_dirac_global.C:428
Lorene::Star_rot_Dirac::get_hh
const Sym_tensor_trans get_hh() const
Returns .
Definition star_rot_dirac.h:244
Lorene::Star_rot_Dirac::grv3
virtual double grv3() const
Error on the virial identity GRV3.
Definition strot_dirac_global.C:273
Lorene::Star_rot_Dirac::Star_rot_Dirac
Star_rot_Dirac(Map &mp_i, int nzet_i, const Eos &eos_i, int filter=0)
Standard constructor.
Definition star_rot_dirac.C:93
Lorene::Star_rot_Dirac::get_omega
double get_omega() const
Returns the rotation angular velocity .
Definition star_rot_dirac.h:178
Lorene::Star_rot_Dirac::hh
Sym_tensor_trans hh
is defined by .
Definition star_rot_dirac.h:96
Lorene::Star_rot_Dirac::ln_psi
Scalar ln_psi
Definition star_rot_dirac.h:67
Lorene::Star_rot_Dirac::qqq
Scalar qqq
Definition star_rot_dirac.h:66
Lorene::Star_rot_Dirac::angu_mom
virtual double angu_mom() const
Angular momentum.
Definition strot_dirac_global.C:143
Lorene::Star_rot_Dirac::get_j_euler
const Vector & get_j_euler() const
Returns the momentum density 3-vector with respect to the Eulerian observer.
Definition star_rot_dirac.h:209
Lorene::Star_rot_Dirac::operator>>
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition star_rot_dirac.C:315
Lorene::Star_rot_Dirac::get_taa
const Sym_tensor get_taa() const
Returns .
Definition star_rot_dirac.h:234
Lorene::Star_rot_Dirac::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition star_rot_dirac.C:218
Lorene::Star_rot_Dirac::p_grv3
double * p_grv3
Error on the virial identity GRV3.
Definition star_rot_dirac.h:108
Lorene::Star_rot_Dirac::psi2
Scalar psi2
Definition star_rot_dirac.h:65
Lorene::Star_rot_Dirac::r_circ
virtual double r_circ() const
Circumferential equatorial radius.
Definition strot_dirac_global.C:331
Lorene::Star_rot_Dirac::spectral_filter
int spectral_filter
Spectral exponential filtering order.
Definition star_rot_dirac.h:57
Lorene::Star_rot_Dirac::omega
double omega
Rotation angular velocity ([f_unit] ).
Definition star_rot_dirac.h:59
Lorene::Star_rot_Dirac::p_tsw
double * p_tsw
Ratio T/W.
Definition star_rot_dirac.h:109
Lorene::Star_rot_Dirac::spectral_filter_order
int spectral_filter_order() const
Returns the filtering order.
Definition star_rot_dirac.h:173
Lorene::Star_rot_Dirac::p_r_circ
double * p_r_circ
Circumferential equatorial radius.
Definition star_rot_dirac.h:110
Lorene::Star_rot_Dirac::tsw
virtual double tsw() const
Ratio T/W.
Definition strot_dirac_global.C:177
Lorene::Star_rot_Dirac::j_euler
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Definition star_rot_dirac.h:77
Lorene::Star_rot_Dirac::flat
const Metric_flat & flat
flat metric (spherical components)
Definition star_rot_dirac.h:84
Lorene::Star_rot_Dirac::del_hydro_euler
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Definition star_rot_dirac.C:246
Lorene::Star_rot_Dirac::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition star_rot_dirac.C:299
Lorene::Star_rot_Dirac::taa
Sym_tensor taa
Definition star_rot_dirac.h:88
Lorene::Star_rot_Dirac::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition star_rot_dirac.C:234
Lorene::Star_rot_Dirac::get_qqq
const Scalar & get_qqq() const
Returns .
Definition star_rot_dirac.h:194
Lorene::Star_rot_Dirac::solve_logn_f
void solve_logn_f(Scalar &ln_f_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
Definition strot_dirac_solvenq.C:62
Lorene::Star_rot_Dirac::solve_qqq
void solve_qqq(Scalar &q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
Definition strot_dirac_solvenq.C:105
Lorene::Star_rot_Dirac::rp_circ
virtual double rp_circ() const
Circumferential polar radius.
Definition strot_dirac_global.C:357
Lorene::Star_rot_Dirac::update_metric
void update_metric()
Computes metric quantities from known potentials.
Definition strot_dirac_upmetr.C:59
Lorene::Star_rot_Dirac::psi4
Scalar psi4
Conformal factor .
Definition star_rot_dirac.h:64
Lorene::Star_rot_Dirac::get_psi4
const Scalar & get_psi4() const
Returns the conformal factor .
Definition star_rot_dirac.h:184
Lorene::Star_rot_Dirac::v2
Scalar v2
Definition star_rot_dirac.h:78
Lorene::Star_rot_Dirac::solve_hij
void solve_hij(Sym_tensor_trans &hij_new) const
Solution of the tensor Poisson equation for rotating stars in Dirac gauge.
Definition strot_dirac_solvehij.C:78
Lorene::Star_rot_Dirac::hydro_euler
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition strot_dirac_hydro.C:71
Lorene::Star_rot_Dirac::p_grv2
double * p_grv2
Error on the virial identity GRV2.
Definition star_rot_dirac.h:107
Lorene::Star_rot_Dirac::get_psi2
const Scalar & get_psi2() const
Returns .
Definition star_rot_dirac.h:189
Lorene::Star_rot_Dirac::solve_logn_q
void solve_logn_q(Scalar &ln_q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
Definition strot_dirac_solvenq.C:76
Lorene::Star_rot_Dirac::get_v2
const Scalar & get_v2() const
Reutrns .
Definition star_rot_dirac.h:214
Lorene::Star_rot_Dirac::mass_b
virtual double mass_b() const
Baryonic mass.
Definition strot_dirac_global.C:94
Lorene::Star_rot_Dirac::equilibrium
void equilibrium(double ent_c, double omega0, double fact_omega, int nzadapt, const Tbl &ent_limit, const Itbl &icontrol, const Tbl &control, double mbar_wanted, double aexp_mass, Tbl &diff)
Computes an equilibrium configuration.
Definition strot_dirac_equilibrium.C:95
Lorene::Star_rot_Dirac::aa_quad
Scalar aa_quad
Definition star_rot_dirac.h:89
Lorene::Star_rot_Dirac::~Star_rot_Dirac
virtual ~Star_rot_Dirac()
Destructor.
Definition star_rot_dirac.C:207
Lorene::Star_rot_Dirac::p_angu_mom
double * p_angu_mom
Angular momentum.
Definition star_rot_dirac.h:106
Lorene::Star_rot_Dirac::p_rp_circ
double * p_rp_circ
Circumferential polar radius.
Definition star_rot_dirac.h:111
Lorene::Star_rot_Dirac::aplat
virtual double aplat() const
Flattening r_pole/r_eq.
Definition strot_dirac_global.C:418
Lorene::Star_rot_Dirac::solve_shift
void solve_shift(Vector &shift_new) const
Solution of the shift equation for rotating stars in Dirac gauge.
Definition strot_dirac_solveshift.C:54
Lorene::Star_rot_Dirac::get_aa
const Sym_tensor get_aa() const
Returns .
Definition star_rot_dirac.h:229
Lorene::Star_rot_Dirac::tgamma
Metric tgamma
Definition star_rot_dirac.h:86
Lorene::Star_rot_Dirac::get_ln_psi
const Scalar & get_ln_psi() const
Returns .
Definition star_rot_dirac.h:199
Lorene::Star_rot_Dirac::operator=
void operator=(const Star_rot_Dirac &)
Assignment to another Star_rot_Dirac.
Definition star_rot_dirac.C:266
Lorene::Star_rot_Dirac::grv2
virtual double grv2() const
Error on the virial identity GRV2.
Definition strot_dirac_global.C:204
Lorene::Star::Star
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
Definition star.C:124
Lorene::Sym_tensor_trans
Transverse symmetric tensors of rank 2.
Definition sym_tensor.h:608
Lorene::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139