Debian Codegraph @

C++/Include/excised_slice.h

raw symbols SCIP
1 /*
2 * Definition of Lorene class Excised slice
3 *
4 */
5
6 /*
7 * Copyright (c) 2010 Nicolas Vasset
8 */
9
10
11 #ifndef __EXCISEDSLICE_H_
12 #define __EXCISEDSLICE_H_
13
14
15 // Headers Lorene
16 #include "spheroid.h"
17
18 //---------------------------//
19 // Class Excised_slice //
20 //---------------------------//
21
22 namespace Lorene {
23 /** Class to compute single black hole spacetime excised slices.
24 * It takes as arguments:
25 * - A Mapping \c mp
26 * - The type of physical surface used to perform the excision:
27 * - 0. General
28 * - 1. Isolated horizon-like
29 * - 2. Dynamical horizon-like
30 * - 3. Inner trapped surface
31 * - The type of metric fields that live in the slice:
32 * - 1. FCF quantities are used (Bonazzola et al., 2004)
33 * - 2. FCF-New scheme quantities are used (Cordero et al., 2009)
34 * Members are obviously the metric fields living in the slice, and related variables.
35 * The aim of this class is to coordinate Resolution of Einstein equations with the right
36 * set of boundary conditions, using classes like Spheroid() and Excision_surf();
37 * Disclaimer: the class Isol_hole() is redundant with this class under a set of parameters;
38 * therefore it has to go at some point.
39 */
40
41 class Excised_slice {
42
43 // Data :
44 // -----
45 protected:
46 const Map& mp ; ///< Mapping associated with the slice
47
48 // Metric data
49 // -----------------
50
51 /// Chosen horizon type
52 int type_hor;
53
54 ///Chose field set type
55 int field_set;
56
57 /// Lapse function
58 Scalar lapse ;
59
60 // Conformal factor
61 Scalar conf_fact;
62
63 /// Shift vector
64 Vector shift ;
65
66 /** Deviation tensor( non-flat part of the conformal 3-metric on
67 * the slice; see Bonazzola et al. (2004)).
68 */
69 Sym_tensor hij ;
70
71 /** Rescaled tracefree extrinsic curvature tensor: rescaled same way as Cordero et al.( 2009).
72 * In the New FCF scheme, this member will represent the TT part of the extrinsic curvature only.
73 */
74 Sym_tensor hatA ;
75
76 /** Longitudinal part of the extrinsic curvature. Set to zero if we are in the original FCF scheme.
77 */
78
79 Vector Xx ;
80
81
82 // Derived data :
83 // ------------
84 protected:
85
86
87 /// Computation of the spheroid associated with the black hole horizon
88
89 mutable Spheroid* p_hor ;
90 /// Computation of the ADM mass of the BH spacetime.
91 mutable double* p_adm_mass ;
92
93 /** Computation of the Komar angular momentum w.r.t. assumed
94 *rotational symmetry
95 */
96 mutable double* p_komar_angmom ;
97
98 /**Computation of the Virial residual, as difference at infinity
99 *between the ADM mass and the Komar integral associated to the mass.
100 */
101 mutable double* p_virial_residue ;
102
103
104
105
106
107 // Constructors - Destructor
108 // -------------------------
109 public:
110
111 /** Standard constructor.
112 *
113 * @param mp_i Mapping on which the black hole slice will be defined
114 * @param hor_type Type of horizon used for excision:
115 * - 0. General
116 * - 1. Isolated horizon-like
117 * - 2. Dynamical horizon-like
118 * - 3. Inner trapped surface
119 * @param scheme_type Type of scheme use for metric field computation
120 * - 1. Original FCF scheme (Bonazzola et al., 2004)
121 * - 2. New FCF scheme (Cordero et al., 2009)
122 */
123
124
125 Excised_slice(const Map& mp_i, int hor_type, int scheme_type) ;
126
127
128 Excised_slice(const Excised_slice& ) ; ///< Copy constructor
129
130 /** Constructor from a file (see \c sauve(FILE* )).
131 *
132 * @param mp_i Mapping on which the black hole slice will be defined
133 * @param hor_type Type of horizon used for excision:
134 * - 0. General
135 * - 1. Isolated horizon-like
136 * - 2. Dynamical horizon-like
137 * - 3. Inner trapped surface
138 * @param scheme_type Type of scheme use for metric field computation
139 * - 1. Original FCF scheme (Bonazzola et al., 2004)
140 * - 2. New FCF scheme (Cordero et al., 2009)
141 * @param fich input file (must have been created by the function
142 * \c sauve)
143 */
144
145 Excised_slice(const Map& mp_i, int hor_type, int scheme_type, FILE* fich) ;
146
147 virtual ~Excised_slice() ; ///< Destructor
148
149
150 // Memory management
151 // -----------------
152 protected:
153 /// Deletes all the derived quantities
154 virtual void del_deriv() const ;
155
156 /// Sets to \c 0x0 all the pointers on derived quantities
157 virtual void set_der_0x0() const ;
158
159
160 // Mutators / assignment
161 // ---------------------
162 public:
163 /// Assignment to another \c Excised_slice
164 void operator=(const Excised_slice&) ;
165
166 /** If hor_type=1, computes a quasi-stationary 3-slice from the chosen parameters.
167 * @param precis [input] threshold in the relative difference between
168 * the radial shift for two consecutive steps
169 * to stop the iterative procedure (default value: 1.e-11)
170 * @param Omega_i: Rotation parameter for the isolated horizon slice. The principal Killing vector associated
171 * to this quantity will be by default the $e_{\varphi}$ vector.
172 * @param NorKappa_i: boolean to tell whether boundary condition is put
173 * on the surface gravity (true) or the lapse (false)
174 * @param NoK_i: The corresponding Dirichlet value for this quantity.
175 * @param isCF: Tells whether the calculation is using the conformal flatness approximation (true) or not (false).
176 * @param relax relaxation coefficient for all metric fields (0: no relaxation)
177 * @param mer_max: Maximum number of iterations allowed in the main loop
178 * @param mer_max: Maximum number of iterations allowed in the possible secondary loop for conformal geometry computation.
179 * @param isvoid: indicates whether or not the spacetime is vacuum.
180 * This is useless for now since matter terms are not handled in the class.
181 */
182
183 void compute_stat_metric(double precis, double Omega_i, bool NorKappa_i, Scalar NoK_i, bool isCF_i=true, double relax=0.2, int mer_max = 2000, int mer_max2=200, bool isvoid = true) ;
184
185 /** If hor_type=1, computes the rhs of hyperbolic equation for conformal metric
186 *assuming stationarity;
187 *WARNING; up to now, we are only able to handle void spacetimes.
188 */
189
190 void secmembre_kerr(Sym_tensor& source_hh);
191
192
193 // Accessors
194 // ---------
195 public:
196 /// Returns the mapping
197 const Map& get_mp() const {return mp; } ;
198
199 ///Returns the type of horizon that performs the excision
200 int get_type_hor() const {return type_hor; };
201
202 ///Returns the field set chosen for the data
203
204 int get_field_set() const {return field_set;};
205
206 /// Returns the lapse function \e N
207 const Scalar& get_lapse() const {return lapse;} ;
208
209 /// Returns the conformal factor
210 const Scalar& get_conf_fact() const {return conf_fact;};
211
212 /// Returns the shift vector \f$\beta^i\f$.
213 const Vector& get_shift() const {return shift;} ;
214
215 /// Returns the deviation tensor \f$ h^{ij} \f$.
216 const Sym_tensor& get_hij() const {return hij;} ;
217
218 /// Returns the rescaled tracefree extrinsic curvature \f$\hat{A}^{ij}\f$ (or its TT part if scheme_type=2)
219 const Sym_tensor& get_hatA() const {return hatA;} ;
220
221 /// Return the longitudinal part of Einstein Equations if the scheme is appropriate.
222 const Vector& get_Xx() const {
223 if (field_set==2) return Xx;
224 else if (field_set==1) cout <<"Error: the scheme used is the original FCF; this variable is irrelevant" << endl;
225 else cout <<"error in the scheme definition; please check the class consistency" << endl;}
226
227 ///Sets the horizon type
228 int set_type_hor() {del_deriv() ; return type_hor ; } ;
229
230 /// Sets the lapse
231 Scalar& set_lapse() {del_deriv() ; return lapse ; } ;
232
233 ///Sets the conformal factor
234 Scalar& set_conf_fact() {del_deriv() ; return conf_fact ; } ;
235
236 ///Sets the shift vector
237 Vector& set_shift() {del_deriv() ; return shift ; } ;
238
239 ///Sets the deviation tensor.
240 Sym_tensor& set_hij() {del_deriv() ; return hij ; } ;
241
242 /// Sets the rescaled tracefree extrinsic curvature \f$\hat{A}^{ij}\f$ (or its TT part if scheme_type=2)
243 Sym_tensor& set_hatA() {del_deriv() ; return hatA ; } ;
244
245 ///Sets the longitudinal part of Einstein Equations if the scheme is apropriate
246 Vector& set_Xx() {del_deriv() ; return Xx ; } ; // Include an assert here!!!!
247
248
249 // Outputs
250 // -------
251 public:
252 virtual void sauve(FILE* ) const ; ///< Save in a file
253
254 void Einstein_errors(); ///< Prints out errors in Einstein equations for the data obtained.
255
256
257 // Global quantities
258 // -----------------
259 public:
260
261
262 /** Spheroid at the excised boundary associated with the black hole
263 * MOTS on the slice. Set by default at the position \f$ r=1 \f$.
264 */
265
266 Spheroid hor() ;
267
268 /// Computation of the ADM mass of the BH spacetime.
269 double adm_mass() ;
270
271 /** Computation of the Komar angular momentum w.r.t. assumed
272 *rotational symmetry
273 */
274 double komar_angmom() ;
275
276 /**Computation of the Virial residual, as difference at infinity
277 *between the ADM mass and the Komar integral associated to the mass.
278 */
279 double virial_residue() ;
280
281 };
282
283 }
284 #endif