LORENE
star_rot_dirac.h
1 /*
2  * Definition of Lorene class Star_rot_Dirac
3  *
4  */
5 
6 /*
7  * Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
8  *
9  * This file is part of LORENE.
10  *
11  * LORENE is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2
13  * as published by the Free Software Foundation.
14  *
15  * LORENE is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with LORENE; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */
25 
26 #ifndef __STAR_ROT_DIRAC_H_
27 #define __STAR_ROT_DIRAC_H_
28 
29 /*
30  *
31  * $Header: /cvsroot/Lorene/C++/Include/star_rot_dirac.h,v 1.9 2023/12/20 10:16:18 j_novak Exp $
32  *
33  */
34 
35 
36 // Headers Lorene
37 #include "star.h"
38 
39 
40 namespace Lorene {
46  class Star_rot_Dirac : public Star {
47 
48  // Data :
49  // -----
50  protected:
59  int relat_type ;
60 
68 
69  double omega ;
70 
71  // Quantities related to the conformal factor and lapse
72  //----------------------------------
73 
78 
79 
80  // Fluid quantities
81  //-----------------------------------------
82 
89 
90  // Metric stuff
91  //-------------------------------------
92 
94  const Metric_flat& flat ;
95 
100 
107 
108 
109  // Derived data :
110  // ------------
111  protected:
112 
113  // More to come later.....
114  //----------------------------
115 
116  mutable double* p_angu_mom ;
117  mutable double* p_grv2 ;
118  mutable double* p_grv3 ;
119  mutable double* p_tsw ;
120  mutable double* p_r_circ ;
121  mutable double* p_rp_circ ;
122 
123 
124  // Constructors - Destructor
125  // -------------------------
126  public:
127 
138  Star_rot_Dirac(Map& mp_i, int nzet_i, const Eos& eos_i, int relat_i=1,
139  int filter=0) ;
140 
141  Star_rot_Dirac(const Star_rot_Dirac& ) ;
142 
143 
151  Star_rot_Dirac(Map& mp_i, const Eos& eos_i, FILE* fich) ;
152 
153 
154  virtual ~Star_rot_Dirac() ;
155 
156 
157  // Memory management
158  // -----------------
159  protected:
160 
162  virtual void del_deriv() const ;
163 
165  void set_der_0x0() const ;
166 
170  virtual void del_hydro_euler() ;
171 
172 
173  // Mutators / assignment
174  // ---------------------
175  public:
176 
178  void operator=(const Star_rot_Dirac& ) ;
179 
180  // Accessors
181  // ---------
182  public:
183 
185  int get_relat() const {return relat_type;};
186 
188  bool is_relativistic() const {return (relat_type > 0) ;};
189 
191  int spectral_filter_order() const {return spectral_filter;};
192 
196  double get_omega() const {return omega;} ;
197 
198 
202  const Scalar& get_psi4() const {return psi4;} ;
203 
207  const Scalar& get_psi2() const {return psi2;} ;
208 
212  const Scalar& get_qqq() const {return qqq;} ;
213 
217  const Scalar& get_ln_psi() const {return ln_psi;} ;
218 
219 
220  // Fluid stuff
221  //------------------
222 
227  const Vector& get_j_euler() const {return j_euler;} ;
228 
232  const Scalar& get_v2() const {return v2;} ;
233 
234 
235  //Metric stuff
236  //-------------------
240  const Metric get_tgamma() const {return tgamma;} ;
241 
245  const Sym_tensor get_aa() const {return aa;} ;
246 
250  const Sym_tensor get_taa() const {return taa;} ;
251 
255  const Scalar get_aa_quad() const {return aa_quad;} ;
256 
260  const Sym_tensor_trans get_hh() const {return hh;} ;
261 
262 
263 
264 
265  // Outputs
266  // -------
267  public:
268 
269  virtual void sauve(FILE* ) const ;
270 
271  protected:
272 
273  virtual ostream& operator>>(ostream& ) const ;
274 
275 
276  // Global quantities
277  //-------------------------
278  public:
279 
280  virtual double mass_b() const ;
281  virtual double mass_g() const ;
282  virtual double angu_mom() const ;
283  virtual double grv2() const ;
284  virtual double grv3() const ;
285  virtual double tsw() const ;
286  virtual double aplat() const ;
287  virtual double r_circ() const ;
288  virtual double rp_circ() const ;
289 
295  virtual double ellipt() const ;
296 
297 
298 
299 
300  // Computational routines
301  //--------------------------
302  public:
303 
310  virtual void hydro_euler() ;
311 
312 
322  void update_metric() ;
323 
324 
328  void equilibrium(double ent_c, double omega0, double fact_omega,
329  int nzadapt, const Tbl& ent_limit,
330  const Itbl& icontrol, const Tbl& control,
331  double mbar_wanted, double aexp_mass,
332  Tbl& diff) ;
333 
338  void solve_logn_f(Scalar& ln_f_new) const ;
339 
344  void solve_logn_q(Scalar& ln_q_new) const ;
345 
350  void solve_qqq(Scalar& q_new) const ;
351 
356  void solve_shift(Vector& shift_new) const ;
357 
362  void solve_hij(Sym_tensor_trans& hij_new) const ;
363 
364  };
365 
366 }
367 #endif
double get_omega() const
Returns the rotation angular velocity .
virtual double grv3() const
Error on the virial identity GRV3.
void solve_logn_f(Scalar &ln_f_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
const Sym_tensor get_aa() const
Returns .
Metric for tensor calculation.
Definition: metric.h:90
double * p_angu_mom
Angular momentum.
double * p_rp_circ
Circumferential polar radius.
double omega
Rotation angular velocity ([f_unit] )
const Scalar & get_psi4() const
Returns the conformal factor .
Lorene prototypes.
Definition: app_hor.h:67
Equation of state base class.
Definition: eos.h:209
Flat metric for tensor calculation.
Definition: metric.h:261
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
int spectral_filter_order() const
Returns the filtering order.
Base class for coordinate mappings.
Definition: map.h:682
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Sym_tensor_trans hh
is defined by .
int relat_type
Relativistic flag.
Basic integer array class.
Definition: itbl.h:122
virtual double r_circ() const
Circumferential equatorial radius.
void operator=(const Star_rot_Dirac &)
Assignment to another Star_rot_Dirac.
virtual void del_deriv() const
Deletes all the derived quantities.
Base class for stars.
Definition: star.h:175
const Vector & get_j_euler() const
Returns the momentum density 3-vector with respect to the Eulerian observer.
Tensor field of valence 1.
Definition: vector.h:188
void update_metric()
Computes metric quantities from known potentials.
const Scalar & get_v2() const
Returns .
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
virtual double angu_mom() const
Angular momentum.
const Scalar & get_ln_psi() const
Returns .
double * p_r_circ
Circumferential equatorial radius.
Scalar psi4
Conformal factor .
virtual double tsw() const
Ratio T/W.
virtual double mass_g() const
Gravitational mass.
virtual double ellipt() const
Ellipticity e.
virtual void sauve(FILE *) const
Save in a file.
Star_rot_Dirac(Map &mp_i, int nzet_i, const Eos &eos_i, int relat_i=1, int filter=0)
Standard constructor.
const Scalar get_aa_quad() const
Returns .
double * p_tsw
Ratio T/W.
virtual double grv2() const
Error on the virial identity GRV2.
const Metric get_tgamma() const
Returns the conformal metric .
int get_relat() const
Returns the relativity parameter.
double * p_grv3
Error on the virial identity GRV3.
Class for relativistic rotating stars in Dirac gauge and maximal slicing.
double * p_grv2
Error on the virial identity GRV2.
virtual double mass_b() const
Baryonic mass.
Transverse symmetric tensors of rank 2.
Definition: sym_tensor.h:611
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.
virtual double aplat() const
Flattening r_pole/r_eq.
void solve_hij(Sym_tensor_trans &hij_new) const
Solution of the tensor Poisson equation for rotating stars in Dirac gauge.
const Scalar & get_qqq() const
Returns .
virtual double rp_circ() const
Circumferential polar radius.
virtual ~Star_rot_Dirac()
Destructor.
void solve_shift(Vector &shift_new) const
Solution of the shift equation for rotating stars in Dirac gauge.
void solve_logn_q(Scalar &ln_q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
const Sym_tensor get_taa() const
Returns .
void solve_qqq(Scalar &q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
Basic array class.
Definition: tbl.h:164
const Metric_flat & flat
flat metric (spherical components)
bool is_relativistic() const
Checks whether the star is computed using a relativistic theory.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
const Sym_tensor_trans get_hh() const
Returns .
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226
int spectral_filter
Spectral exponential filtering order.
const Scalar & get_psi2() const
Returns .