Debian Codegraph @

C++/Include/isol_hole.h

raw symbols SCIP
1 /*
2 * Definition of Lorene class Isol_hole
3 *
4 */
5
6 /*
7 * Copyright (c) 2009 Nicolas Vasset
8 */
9
10
11 #ifndef __ISOLHOLE_H_
12 #define __ISOLHOLE_H_
13
14
15 // Headers Lorene
16 #include "tensor.h"
17 #include "metric.h"
18 #include "spheroid.h"
19 #include "excision_surf.h"
20 #include "excision_hor.h"
21
22 class Eos ;
23
24 //---------------------------//
25 // Class Isol_hole //
26 //---------------------------//
27
28 namespace Lorene {
29 /** Class to compute quasistationary single black hole spacetimes in vacuum.
30 * It takes as arguments:
31 * - A Mapping \c mp
32 * - A rotation rate \f$ \Omega\f$ of the horizon in the \f$ \varphi \f$
33 * direction, assumed to be the direction of the rotational symmetry.
34 * - A Scalar NoK, storing the boundary value to be verified either for the
35 * lapse or the surface gravity at the excised boundary (which is a MOTS in
36 * the philosophy of this class). Whether it corresponds to the lapse or the
37 * surface gravity is controlled by the boolean NorKappa. (Warning: setting a
38 * boundary on Kappa is not implemented yet).
39 * - A boolean isCF, to determine whether or not one adopts the conformally
40 * flat approximation in the spacetime construction. Set to FALSE by default.
41 *
42 * The main goal of this class is the computation of metric data from those
43 * parameters, as well as some global quantities related to the physical
44 * characteristics of the spacetime. Those metric data are given on a
45 * spacelike 3-slice, assuming a global timelike Killing field and using
46 * adapted coordinates.
47 */
48
49
50 class Isol_hole {
51
52 // Data :
53 // -----
54 protected:
55 const Map& mp ; ///< Mapping associated with the star
56
57 double Omega ; /** Rotation rate of the horizon in the azimuthal
58 *direction.
59 */
60
61 bool NorKappa ; /** Indicates if the boundary value for the lapse
62 * or the surface gravity is used.
63 */
64
65 Scalar boundNoK ; /** Stores the boundary value of the lapse or surface
66 * gravity.
67 */
68
69 bool isCF ; ///< Indicates if the CF approximation is used.
70
71
72 // Metric data
73 // -----------------
74
75 /// Lapse function
76 Scalar lapse ;
77
78 // Conformal factor
79 Scalar conf_fact;
80
81 /// Shift vector
82 Vector shift ;
83
84 /** Deviation tensor( non-flat part of the conformal 3-metric on
85 * the slice; see Bonazzola et al. (2004)).
86 */
87 Sym_tensor hij ;
88
89 /** Rescaled tracefree extrinsic curvature tensor: see Cordero et al.( * 2009).
90 */
91
92 Sym_tensor hatA ;
93
94 // Derived data :
95 // ------------
96 protected:
97
98
99 /// Computation of the spheroid associated with the black hole horizon
100
101 mutable Spheroid* p_hor ;
102 /// Computation of the ADM mass of the BH spacetime.
103 mutable double* p_adm_mass ;
104
105 /** Computation of the Komar angular momentum w.r.t. assumed
106 *rotational symmetry
107 */
108 mutable double* p_komar_angmom ;
109
110 /**Computation of the Virial residual, as difference at infinity
111 *between the ADM mass and the Komar integral associated to the mass.
112 */
113 mutable double* p_virial_residue ;
114
115
116
117
118
119 // Constructors - Destructor
120 // -------------------------
121 public:
122
123 /** Standard constructor.
124 *
125 * @param mp_i Mapping on which the black hole slice will be defined
126 * @param Omega_i rotation rate of the horizon
127 * @param NorKappa_i FALSE: use of boundary value for the lapse
128 * TRUE use of boundary value for the surface gravity
129 * (Warning! not implemented yet!)
130 * @param NoK_i value either for the lapse or surface gravity.
131 * @param isCF_i FALSE: Full GR 3+1 equations to be verified
132 * TRUE: IWM approximation used in determination of the
133 * spacetime geometry;
134 */
135 Isol_hole(const Map& mp_i, double Omega_i, bool NorKappa_i, Scalar NoK_i, bool isCF_i = false) ;
136
137
138 Isol_hole(const Isol_hole& ) ; ///< Copy constructor
139
140 /** Constructor from a file (see \c sauve(FILE* )).
141 *
142 * @param mp_i Mapping on which the star will be defined
143 * @param Omega_i rotation rate of the horizon
144 * @param NorKappa_i FALSE: use of boundary value for the lapse
145 * TRUE use of boundary value for the surface gravity
146 * (Warning! not implemented yet!)
147 * @param NoK_i value either for the lapse or surface gravity.
148 * @param isCF_i FALSE: Full GR 3+1 equations to be verified
149 * TRUE: IWM approximation used in determination of the
150 * spacetime geometry;
151 * @param fich input file (must have been created by the function
152 * \c sauve)
153 */
154 Isol_hole(const Map& mp_i, double Omega_i, bool NorKappa_i, Scalar NoK_i, bool isCF_i, FILE* fich) ;
155
156 virtual ~Isol_hole() ; ///< Destructor
157
158
159 // Memory management
160 // -----------------
161 protected:
162 /// Deletes all the derived quantities
163 virtual void del_deriv() const ;
164
165 /// Sets to \c 0x0 all the pointers on derived quantities
166 virtual void set_der_0x0() const ;
167
168
169 // Mutators / assignment
170 // ---------------------
171 public:
172 /// Assignment to another \c Isol_hole
173 void operator=(const Isol_hole&) ;
174
175 /** Computes a quasi-stationary 3-slice from the chosen parameters.
176 *
177 * @param precis [input] threshold in the relative difference between
178 * the radial shift for two consecutive steps
179 * to stop the iterative procedure (default value: 1.e-11)
180 */
181 void compute_stat_metric(double precis, double relax, int mer_max, int mer_max2, bool isvoid = true) ;
182
183 /** Computes the rhs of hyperbolic equation for conformal metric
184 *assuming statioarity;
185 *WARNING; up to now, we are only able to handle void spacetimes.
186 */
187
188 void secmembre_kerr(Sym_tensor& source_hh);
189
190
191
192 // Accessors
193 // ---------
194 public:
195 /// Returns the mapping
196 const Map& get_mp() const {return mp; } ;
197
198 /// Returns the rotation rate
199 double get_Omega() const {return Omega ;} ;
200
201 /// Returns the boundary value used for the lapse (if it is the one used)
202 const Scalar& get_boundN() const{
203 if (NorKappa == false){
204 return boundNoK;
205 }
206 else cout << "The boundary condition is imposed on the surface gravity!" << endl;
207 }
208 /// Returns the surface gravity value at the boundary (if it is the one used)
209
210 const Scalar& get_Kappa() const{
211 if(NorKappa == true){
212 return boundNoK;
213 }
214 else cout << "The boundary condition is imposed on the lapse!" <<endl;
215 }
216
217
218 /// Returns the lapse function \e N
219 const Scalar& get_lapse() const {return lapse;} ;
220
221 /// Returns the conformal factor
222 const Scalar& get_conf_fact() const {return conf_fact;};
223
224 /// Returns the shift vector \f$\beta^i\f$.
225 const Vector& get_shift() const {return shift;} ;
226
227 /// Returns the deviation tensor \f$ h^{ij} \f$.
228 const Sym_tensor& get_hij() const {return hij;} ;
229
230 /// Returns the rescaled tracefree extrinsic curvature \f$\hat{A}^{ij}\f$.
231 const Sym_tensor& get_hatA() const {return hatA;} ;
232
233
234
235
236 // Outputs
237 // -------
238 public:
239 virtual void sauve(FILE* ) const ; ///< Save in a file
240
241 void Einstein_errors(); ///< Prints out errors in Einstein equations for the data obtained.
242
243
244 // Global quantities
245 // -----------------
246 public:
247
248
249 /** Spheroid at the excised boundary associated with the black hole
250 * MOTS on the slice. Set by default at the position \f$ r=1 \f$.
251 */
252
253 Spheroid hor() ;
254
255 /// Computation of the ADM mass of the BH spacetime.
256 double adm_mass() ;
257
258 /** Computation of the Komar angular momentum w.r.t. assumed
259 *rotational symmetry
260 */
261 double komar_angmom() ;
262
263 /**Computation of the Virial residual, as difference at infinity
264 *between the ADM mass and the Komar integral associated to the mass.
265 */
266 double virial_residue() ;
267
268
269
270 };
271
272 }
273 #endif