LORENE
hot_star_rot_cfc.h
1 /*
2  * Definition of Lorene class Hot_star_rot_CFC
3  *
4  */
5 
6 /*
7  * Copyright (c) 2026 Santiago Jaraba
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 __HOT_STAR_ROT_CFC_H_
27 #define __HOT_STAR_ROT_CFC_H_
28 
29 // Headers Lorene
30 #include "hot_star.h"
31 
32 namespace Lorene {
33 
39  class Hot_star_rot_CFC : public Hot_star {
40 
41  // Data :
42  // -----
43  protected:
50  int relat_type ;
51 
56  int e_type ;
57 
59  double const_value ;
60 
68 
69  double omega ;
70 
71  // Quantities related to the conformal factor
72  //--------------------------------------------
73 
75 
76 
77  // Fluid quantities
78  //-----------------------------------------
79 
86 
87  // Metric stuff
88  //-------------------------------------
89 
92 
94  const Metric_flat& flat ;
95 
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 
130  Hot_star_rot_CFC(Map& mp_i, int nzet_i, const Hot_eos& heos_i, int relat_i,
131  int e_type, double const_value_i, int filter=0) ;
132 
134 
135 
143  Hot_star_rot_CFC(Map& mp_i, const Hot_eos& heos_i, FILE* fich) ;
144 
145 
146  virtual ~Hot_star_rot_CFC() ;
147 
148 
149  // Memory management
150  // -----------------
151  protected:
152 
154  virtual void del_deriv() const ;
155 
157  void set_der_0x0() const ;
158 
162  virtual void del_hydro_euler() ;
163 
164 
165  // Mutators / assignment
166  // ---------------------
167  public:
168 
170  void operator=(const Hot_star_rot_CFC& ) ;
171 
172  // Accessors
173  // ---------
174  public:
175 
177  int get_relat() const {return relat_type;};
178 
180  bool is_relativistic() const {return (relat_type > 0) ;};
181 
183  int spectral_filter_order() const {return spectral_filter;};
184 
188  double get_omega() const {return omega;} ;
189 
190 
194  const Scalar& get_psi4() const {return psi4;} ;
195 
199  const Scalar& get_psi2() const {return psi2;} ;
200 
204  const Scalar& get_psi() const {return psi;} ;
205 
206  // Fluid stuff
207  //------------------
208 
213  const Vector& get_j_euler() const {return j_euler;} ;
214 
218  const Scalar& get_v2() const {return v2;} ;
219 
220 
221  //Metric stuff
222  //-------------------
226  const Sym_tensor get_hatA() const {return hatA;} ;
227 
231  const Scalar get_hatA_quad() const {return hatA_quad;} ;
232 
233 
234  // Outputs
235  // -------
236  public:
237 
238  virtual void sauve(FILE* ) const ;
239 
240  protected:
241 
242  virtual ostream& operator>>(ostream& ) const ;
243 
244 
245  // Global quantities
246  //-------------------------
247  public:
248 
249  virtual double mass_b() const ;
250  virtual double mass_g() const ;
251  virtual double angu_mom() const ;
252  virtual double grv2() const ;
253  virtual double grv3() const ;
254  virtual double tsw() const ;
255  virtual double aplat() const ;
256  virtual double r_circ() const ;
257  virtual double rp_circ() const ;
258 
264  virtual double ellipt() const ;
265 
266 
267 
268 
269  // Computational routines
270  //--------------------------
271  protected:
273  void update_entropy() ;
274 
275  public:
276 
283  virtual void hydro_euler() ;
284 
285 
294  void update_metric() ;
295 
296 
300  void equilibrium(double ent_c, double omega0, double fact_omega,
301  int nzadapt, const Tbl& ent_limit,
302  const Itbl& icontrol, const Tbl& control,
303  double mbar_wanted, double aexp_mass,
304  Tbl& diff) ;
305 
310  void solve_logn_f(Scalar& ln_f_new) const ;
311 
316  void solve_logn_q(Scalar& ln_q_new) const ;
317 
322  void solve_psi(Scalar& psi_new) ;
323 
328  void solve_shift(Vector& shift_new) const ;
329 
330  };
331 
332 }
333 #endif
int relat_type
Relativistic flag.
const Scalar & get_psi() const
Returns .
const Metric_flat & flat
flat metric (spherical components)
virtual void del_deriv() const
Deletes all the derived quantities.
void solve_shift(Vector &shift_new) const
Solution of the shift equation for rotating stars in CFC.
Scalar psi
Conformal factor .
double * p_r_circ
Circumferential equatorial radius.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
Lorene prototypes.
Definition: app_hor.h:67
Base class for hot stars.
Definition: hot_star.h:76
Flat metric for tensor calculation.
Definition: metric.h:261
virtual double aplat() const
Flattening r_pole/r_eq.
virtual double grv2() const
Error on the virial identity GRV2.
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:402
void solve_logn_q(Scalar &ln_q_new) const
Solution of the quadratic part of the Poisson equation for the lapse for rotating stars in CFC...
Base class for coordinate mappings.
Definition: map.h:696
Basic integer array class.
Definition: itbl.h:122
int get_relat() const
Returns the relativity parameter.
virtual ~Hot_star_rot_CFC()
Destructor.
int spectral_filter
Spectral exponential filtering order.
virtual double rp_circ() const
Circumferential polar radius.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Tensor field of valence 1.
Definition: vector.h:188
void solve_logn_f(Scalar &ln_f_new) const
Solution of the `‘matter’&#39; part of the Poisson equation for the lapse for rotating stars in CFC...
int e_type
Integer defining the type of entropy profile.
virtual double mass_b() const
Baryonic mass.
double * p_rp_circ
Circumferential polar radius.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Hot_star_rot_CFC(Map &mp_i, int nzet_i, const Hot_eos &heos_i, int relat_i, int e_type, double const_value_i, int filter=0)
Standard constructor.
double * p_tsw
Ratio T/W.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double omega
Rotation angular velocity ([f_unit] )
double * p_angu_mom
Angular momentum.
void operator=(const Hot_star_rot_CFC &)
Assignment to another Hot_star_rot_CFC.
bool is_relativistic() const
Checks whether the star is computed using a relativistic theory.
virtual double r_circ() const
Circumferential equatorial radius.
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.
int spectral_filter_order() const
Returns the filtering order.
virtual double mass_g() const
Gravitational mass.
double const_value
Constant value of entropy or temperature.
virtual double tsw() const
Ratio T/W.
void solve_psi(Scalar &psi_new)
Solution of the equations for the conformal factor for rotating stars in CFC.
Scalar psi4
Conformal factor .
const Scalar get_hatA_quad() const
Returns .
virtual double angu_mom() const
Angular momentum.
const Scalar & get_psi4() const
Returns the conformal factor .
virtual double grv3() const
Error on the virial identity GRV3.
Class for relativistic rotating stars in Conformal Flatness Condition and maximal slicing...
Base class for 2-parameters equations of state (abstract class).
Definition: hoteos.h:85
double * p_grv2
Error on the virial identity GRV2.
virtual void sauve(FILE *) const
Save in a file.
const Scalar & get_v2() const
Returns .
void update_metric()
Computes metric quantities from known potentials.
const Sym_tensor get_hatA() const
Returns .
const Scalar & get_psi2() const
Returns .
double get_omega() const
Returns the rotation angular velocity .
Basic array class.
Definition: tbl.h:164
void update_entropy()
Updates the part of the entropy from entropy_param.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226
virtual double ellipt() const
Ellipticity e.
double * p_grv3
Error on the virial identity GRV3.
const Vector & get_j_euler() const
Returns the momentum density 3-vector with respect to the Eulerian observer.