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.8 2014/10/13 08:52:36 j_novak Exp $
32 *
33 */
34
35
36// Headers Lorene
37#include "star.h"
38
39
40namespace Lorene {
46class Star_rot_Dirac : public Star {
47
48 // Data :
49 // -----
50 protected:
58
59 double omega ;
60
61 // Quantities related to the conformal factor and lapse
62 //----------------------------------
63
68
69
70 // Fluid quantities
71 //-----------------------------------------
72
79
80 // Metric stuff
81 //-------------------------------------
82
84 const Metric_flat& flat ;
85
90
97
98
99 // Derived data :
100 // ------------
101 protected:
102
103 // More to come later.....
104 //----------------------------
105
106 mutable double* p_angu_mom ;
107 mutable double* p_grv2 ;
108 mutable double* p_grv3 ;
109 mutable double* p_tsw ;
110 mutable double* p_r_circ ;
111 mutable double* p_rp_circ ;
112
113
114 // Constructors - Destructor
115 // -------------------------
116 public:
117
127 Star_rot_Dirac(Map& mp_i, int nzet_i, const Eos& eos_i, int filter=0) ;
128
130
131
139 Star_rot_Dirac(Map& mp_i, const Eos& eos_i, FILE* fich) ;
140
141
142 virtual ~Star_rot_Dirac() ;
143
144
145 // Memory management
146 // -----------------
147 protected:
148
150 virtual void del_deriv() const ;
151
153 void set_der_0x0() const ;
154
158 virtual void del_hydro_euler() ;
159
160
161 // Mutators / assignment
162 // ---------------------
163 public:
164
166 void operator=(const Star_rot_Dirac& ) ;
167
168 // Accessors
169 // ---------
170 public:
171
174
178 double get_omega() const {return omega;} ;
179
180
184 const Scalar& get_psi4() const {return psi4;} ;
185
189 const Scalar& get_psi2() const {return psi2;} ;
190
194 const Scalar& get_qqq() const {return qqq;} ;
195
199 const Scalar& get_ln_psi() const {return ln_psi;} ;
200
201
202 // Fluid stuff
203 //------------------
204
209 const Vector& get_j_euler() const {return j_euler;} ;
210
214 const Scalar& get_v2() const {return v2;} ;
215
216
217 //Metric stuff
218 //-------------------
222 const Metric get_tgamma() const {return tgamma;} ;
223
224 // documentation comes later......
225
229 const Sym_tensor get_aa() const {return aa;} ;
230
234 const Sym_tensor get_taa() const {return taa;} ;
235
239 const Scalar get_aa_quad() const {return aa_quad;} ;
240
244 const Sym_tensor_trans get_hh() const {return hh;} ;
245
246
247
248
249 // Outputs
250 // -------
251 public:
252
253 virtual void sauve(FILE* ) const ;
254
255 protected:
256
257 virtual ostream& operator>>(ostream& ) const ;
258
259
260 // Global quantities
261 //-------------------------
262 public:
263
264 virtual double mass_b() const ;
265 virtual double mass_g() const ;
266 virtual double angu_mom() const ;
267 virtual double grv2() const ;
268 virtual double grv3() const ;
269 virtual double tsw() const ;
270 virtual double aplat() const ;
271 virtual double r_circ() const ;
272 virtual double rp_circ() const ;
279 virtual double ellipt() const ;
280
281
282
283
284 // Computational routines
285 //--------------------------
286 public:
287
294 virtual void hydro_euler() ;
295
296
306 void update_metric() ;
307
308
312 void equilibrium(double ent_c, double omega0, double fact_omega,
313 int nzadapt, const Tbl& ent_limit,
314 const Itbl& icontrol, const Tbl& control,
315 double mbar_wanted, double aexp_mass,
316 Tbl& diff) ;
317
322 void solve_logn_f(Scalar& ln_f_new) const ;
323
328 void solve_logn_q(Scalar& ln_q_new) const ;
329
334 void solve_qqq(Scalar& q_new) const ;
335
340 void solve_shift(Vector& shift_new) const ;
341
346 void solve_hij(Sym_tensor_trans& hij_new) const ;
347
348};
349
350}
351#endif
Equation of state base class.
Definition eos.h:190
Basic integer array class.
Definition itbl.h:122
Base class for coordinate mappings.
Definition map.h:670
Flat metric for tensor calculation.
Definition metric.h:261
Metric for tensor calculation.
Definition metric.h:90
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Class for relativistic rotating stars in Dirac gauge and maximal slicing.
const Scalar get_aa_quad() const
Returns .
const Metric get_tgamma() const
Returns the conformal metric .
virtual double mass_g() const
Gravitational mass.
virtual double ellipt() const
Ellipticity e.
const Sym_tensor_trans get_hh() const
Returns .
virtual double grv3() const
Error on the virial identity GRV3.
double get_omega() const
Returns the rotation angular velocity .
Sym_tensor_trans hh
is defined by .
virtual double angu_mom() const
Angular momentum.
const Vector & get_j_euler() const
Returns the momentum density 3-vector with respect to the Eulerian observer.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
const Sym_tensor get_taa() const
Returns .
virtual void del_deriv() const
Deletes all the derived quantities.
double * p_grv3
Error on the virial identity GRV3.
virtual double r_circ() const
Circumferential equatorial radius.
int spectral_filter
Spectral exponential filtering order.
double omega
Rotation angular velocity ([f_unit] )
double * p_tsw
Ratio T/W.
int spectral_filter_order() const
Returns the filtering order.
double * p_r_circ
Circumferential equatorial radius.
virtual double tsw() const
Ratio T/W.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
const Metric_flat & flat
flat metric (spherical components)
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
virtual void sauve(FILE *) const
Save in a file.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
const Scalar & get_qqq() const
Returns .
void solve_logn_f(Scalar &ln_f_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
void solve_qqq(Scalar &q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
virtual double rp_circ() const
Circumferential polar radius.
void update_metric()
Computes metric quantities from known potentials.
Scalar psi4
Conformal factor .
const Scalar & get_psi4() const
Returns the conformal factor .
void solve_hij(Sym_tensor_trans &hij_new) const
Solution of the tensor Poisson equation for rotating stars in Dirac gauge.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
double * p_grv2
Error on the virial identity GRV2.
const Scalar & get_psi2() const
Returns .
void solve_logn_q(Scalar &ln_q_new) const
Solution of the two scalar Poisson equations for rotating stars in Dirac gauge.
const Scalar & get_v2() const
Reutrns .
virtual double mass_b() const
Baryonic mass.
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 ~Star_rot_Dirac()
Destructor.
double * p_angu_mom
Angular momentum.
double * p_rp_circ
Circumferential polar radius.
virtual double aplat() const
Flattening r_pole/r_eq.
void solve_shift(Vector &shift_new) const
Solution of the shift equation for rotating stars in Dirac gauge.
const Sym_tensor get_aa() const
Returns .
const Scalar & get_ln_psi() const
Returns .
void operator=(const Star_rot_Dirac &)
Assignment to another Star_rot_Dirac.
virtual double grv2() const
Error on the virial identity GRV2.
Base class for stars.
Definition star.h:175
Transverse symmetric tensors of rank 2.
Definition sym_tensor.h:608
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Basic array class.
Definition tbl.h:161
Tensor field of valence 1.
Definition vector.h:188
Lorene prototypes.
Definition app_hor.h:64