Debian Codegraph @

C++/Include/compobj.h

raw symbols SCIP
1 /*
2 * Definition of Lorene class Compobj, Compobj_QI, Star_QI, Kerr_QI, AltBH_QI, HiggsMonopole, ScalarBH
3 *
4 */
5
6 /*
7 * Copyright (c) 2012, 2013 Claire Some, Eric Gourgoulhon
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 __COMPOBJ_H_
27 #define __COMPOBJ_H_
28
29 /*
30 * $Id: compobj.h,v 1.20 2015/11/05 17:31:21 f_vincent Exp $
31 * $Log: compobj.h,v $
32 * Revision 1.20 2015/11/05 17:31:21 f_vincent
33 * Updated class scalarBH.
34 *
35 * Revision 1.19 2015/10/22 09:18:35 f_vincent
36 * New class ScalarBH
37 *
38 * Revision 1.18 2014/10/13 08:52:33 j_novak
39 * Lorene classes and functions now belong to the namespace Lorene.
40 *
41 * Revision 1.17 2014/05/16 11:55:19 o_straub
42 * fixed: GYOTO output from compobj & compobj_QI
43 *
44 * Revision 1.16 2014/01/31 15:34:54 e_gourgoulhon
45 * Added members to class HiggsMonopole
46 *
47 * Revision 1.15 2014/01/29 16:29:16 e_gourgoulhon
48 * Added new class HiggsMonopole
49 *
50 * Revision 1.14 2014/01/14 20:53:39 e_gourgoulhon
51 * Updated documentation of r_isco
52 *
53 * Revision 1.13 2013/07/25 19:44:45 o_straub
54 * calculation of the marginally bound radius
55 *
56 * Revision 1.12 2013/04/17 13:01:50 e_gourgoulhon
57 * Some modifications in the class AltBH_QI
58 *
59 * Revision 1.11 2013/04/16 15:26:45 e_gourgoulhon
60 * Added class AltBH_QI
61 *
62 * Revision 1.10 2013/04/04 15:31:34 e_gourgoulhon
63 * r_isco returns now the coordinate r, not the areal r
64 *
65 * Revision 1.9 2013/04/03 12:08:57 e_gourgoulhon
66 * Added member kk to Compobj; suppressed tkij
67 *
68 * Revision 1.8 2013/04/02 23:17:18 e_gourgoulhon
69 * New class Kerr_QI
70 *
71 * Revision 1.7 2012/12/03 15:26:14 c_some
72 * Added data member m2
73 *
74 * Revision 1.6 2012/11/22 16:02:18 c_some
75 * *** empty log message ***
76 *
77 * Revision 1.5 2012/11/21 14:52:13 c_some
78 * Documentation corrected
79 *
80 * Revision 1.4 2012/11/20 16:21:16 c_some
81 * Added new class Star_QI
82 *
83 * Revision 1.3 2012/11/16 16:13:12 c_some
84 * Added new class Compobj_QI
85 *
86 * Revision 1.2 2012/11/15 20:50:41 e_gourgoulhon
87 * Corrected the documentation
88 *
89 * Revision 1.1 2012/11/15 16:20:51 c_some
90 * New class Compobj
91 *
92 *
93 * $Header: /cvsroot/Lorene/C++/Include/compobj.h,v 1.20 2015/11/05 17:31:21 f_vincent Exp $
94 *
95 */
96
97
98 // Headers Lorene
99 #include "tensor.h"
100 #include "metric.h"
101
102
103 //---------------------------//
104 // base class Compobj //
105 //---------------------------//
106
107 namespace Lorene {
108 /**
109 * Base class for stationary compact objects (***under development***).
110 * \ingroup(compactobjects)
111 *
112 * A \c Compobj describes a single compact object (star or black hole), in a stationary state.
113 *
114 * The spacetime metric is written according to the 3+1 formalism :
115 * \f[
116 * ds^2 = - N^2 dt^2 + \gamma_{ij} ( dx^i + \beta^i dt )
117 * (dx^j + \beta^j dt )
118 * \f]
119 * where \f$\gamma_{ij}\f$ is the 3-metric, described by a Lorene object of class \c Metric.
120 *
121 * The total energy-momentum tensor is orthogonally split with respect to the Eulerian observer as follows:
122 * \f[
123 * T_{\alpha\beta} = E n_\alpha n_\beta + P_\alpha n_\beta + n_\alpha P_\beta + S_{\alpha\beta}
124 * \f]
125 */
126 class Compobj {
127
128 // Data :
129 // -----
130 protected:
131 /// Mapping describing the coordinate system (r,theta,phi)
132 Map& mp ;
133
134 /// Lapse function \e N .
135 Scalar nn ;
136
137 /// Shift vector \f$\beta^i\f$
138 Vector beta ;
139
140 /// 3-metric \f$\gamma_{ij}\f$
141 Metric gamma ;
142
143 /// Total energy density \e E in the Eulerian frame
144 Scalar ener_euler ;
145
146 /// Total 3-momentum density \f$P^i\f$ in the Eulerian frame
147 Vector mom_euler ;
148
149 /// Stress tensor \f$S_{ij}\f$ with respect to the Eulerian observer
150 Sym_tensor stress_euler ;
151
152 /// Extrinsic curvature tensor \f$K_{ij}\f$
153 Sym_tensor kk ;
154
155 // Derived data :
156 // ------------
157 protected:
158 mutable double* p_adm_mass ; ///< ADM mass
159
160 // Constructors - Destructor
161 // -------------------------
162 public:
163 /** Standard constructor.
164 *
165 * @param mp_i Mapping on which the object is defined
166 *
167 */
168 Compobj(Map& map_i) ;
169
170 Compobj(const Compobj& ) ; ///< Copy constructor
171
172 /** Constructor from a file (see \c sauve(FILE* )).
173 *
174 * @param mp_i Mapping on which the object is defined
175 * @param fich input file (must have been created by the function
176 * \c sauve)
177 */
178 Compobj(Map& map_i, FILE* ) ;
179
180 virtual ~Compobj() ; ///< Destructor
181
182
183 // Memory management
184 // -----------------
185 protected:
186 /// Deletes all the derived quantities
187 virtual void del_deriv() const ;
188
189 /// Sets to \c 0x0 all the pointers on derived quantities
190 void set_der_0x0() const ;
191
192
193 // Mutators / assignment
194 // ---------------------
195 public:
196 /// Assignment to another Compobj
197 void operator=(const Compobj&) ;
198
199 /// Read/write of the mapping
200 Map& set_mp() {return mp; } ;
201
202
203 // Accessors
204 // ---------
205 public:
206 /// Returns the mapping
207 const Map& get_mp() const {return mp; } ;
208
209 /// Returns the lapse function \e N .
210 const Scalar& get_nn() const {return nn;} ;
211
212 /// Returns the shift vector \f$\beta^i\f$.
213 const Vector& get_beta() const {return beta;} ;
214
215 /// Returns the 3-metric \f$\gamma_{ij}\f$.
216 const Metric& get_gamma() const {return gamma;} ;
217
218 /// Returns the total energy density \e E in the Eulerian frame
219 const Scalar& get_ener_euler() const {return ener_euler;} ;
220
221 /// Returns the total 3-momentum density \f$P^i\f$ in the Eulerian frame
222 const Vector& get_mom_euler() const {return mom_euler;} ;
223
224 /// Returns the stress tensor \f$S_{ij}\f$ with respect to the Eulerian observer
225 const Sym_tensor& get_stress_euler() const {return stress_euler;} ;
226
227 /// Returns the extrinsic curvature tensor \f$K_{ij}\f$
228 const Sym_tensor& get_kk() const {return kk;} ;
229
230
231
232
233 // Outputs
234 // -------
235 public:
236 virtual void sauve(FILE *) const ; ///< Save in a file
237
238 void gyoto_data(const char* file_name) const ; ///< Save in a file for GYOTO
239
240
241
242 /// Display
243 friend ostream& operator<<(ostream& , const Compobj& ) ;
244
245 protected:
246 /// Operator >> (virtual function called by the operator <<).
247 virtual ostream& operator>>(ostream& ) const ;
248
249 // Computational methods
250 // ---------------------
251 public:
252 /// Computation of the extrinsic curvature
253 virtual void extrinsic_curvature() ;
254
255
256 // Global quantities
257 // -----------------
258 public:
259 /// ADM mass (computed as a surface integral at spatial infinity)
260 virtual double adm_mass() const ;
261 };
262
263
264 //---------------------------//
265 // base class Compobj_QI //
266 //---------------------------//
267
268 /**
269 * Base class for axisymmetric stationary compact objects in Quasi-Isotropic coordinates (***under development***).
270 * \ingroup(compactobjects)
271 *
272 * The metric is expressed in Quasi-Isotropic (QI) coordinates :
273 * \f[
274 * ds^2 = - N^2 dt^2 + A^2 (dr^2 + r^2 d\theta^2)
275 * + B^2 r^2 \sin^2\theta (d\varphi - N^\varphi dt)^2
276 * \f]
277 *
278 *
279 */
280 class Compobj_QI : public Compobj {
281
282 // Data :
283 // -----
284 protected:
285
286 /// Square of the metric factor \e A
287 Scalar a_car ;
288
289 /// Metric factor \e B
290 Scalar bbb ;
291
292 /// Square of the metric factor \e B
293 Scalar b_car ;
294
295 /// Metric coefficient \f$N^\varphi\f$
296 Scalar nphi ;
297
298 /** Scalar \f$A^2 K_{ij} K^{ij}\f$.
299 * For axisymmetric stars, this quantity is related to the
300 * derivatives of \f$N^\varphi\f$ by
301 * \f[
302 * A^2 K_{ij} K^{ij} = {B^2 \over 2 N^2} \, r^2\sin^2\theta \,
303 * \left[ \left( {\partial N^\varphi \over \partial r} \right) ^2
304 * + {1\over r^2} \left( {\partial N^\varphi \over
305 * \partial \theta} \right) ^2 \right] \ .
306 * \f]
307 * In particular it is related to the quantities \f$k_1\f$ and \f$k_2\f$
308 * introduced by Eqs.~(3.7) and (3.8) of
309 * Bonazzola et al. \a Astron. \a Astrophys. \b 278 , 421 (1993)
310 * by
311 * \f[
312 * A^2 K_{ij} K^{ij} = 2 A^2 (k_1^2 + k_2^2) \ .
313 * \f]
314 */
315 Scalar ak_car ;
316
317
318 // Derived data :
319 // ------------
320 protected:
321 mutable double* p_angu_mom ; ///< Angular momentum
322 mutable double* p_r_isco ; ///< Coordinate r of the ISCO
323 mutable double* p_f_isco ; ///< Orbital frequency of the ISCO
324 /// Specific energy of a particle at the ISCO
325 mutable double* p_espec_isco ;
326 /// Specific angular momentum of a particle at the ISCO
327 mutable double* p_lspec_isco ;
328 mutable double* p_r_mb ; ///< Coordinate r of the marginally bound orbit
329
330 // Constructors - Destructor
331 // -------------------------
332 public:
333 /** Standard constructor.
334 *
335 * @param mp_i Mapping on which the object is defined
336 *
337 */
338 Compobj_QI(Map& map_i) ;
339
340 Compobj_QI(const Compobj_QI& ) ; ///< Copy constructor
341
342 /** Constructor from a file (see \c sauve(FILE* )).
343 *
344 * @param mp_i Mapping on which the object is defined
345 * @param fich input file (must have been created by the function
346 * \c sauve)
347 */
348 Compobj_QI(Map& map_i, FILE* ) ;
349
350 virtual ~Compobj_QI() ; ///< Destructor
351
352
353 // Memory management
354 // -----------------
355 protected:
356 /// Deletes all the derived quantities
357 virtual void del_deriv() const ;
358
359 /// Sets to \c 0x0 all the pointers on derived quantities
360 void set_der_0x0() const ;
361
362
363 // Mutators / assignment
364 // ---------------------
365 public:
366 /// Assignment to another Compobj_QI
367 void operator=(const Compobj_QI&) ;
368
369
370 // Accessors
371 // ---------
372 public:
373
374 /// Returns the metric factor \e B
375 const Scalar& get_bbb() const {return bbb;} ;
376
377 /// Returns the square of the metric factor \e A
378 const Scalar& get_a_car() const {return a_car;} ;
379
380 /// Returns the square of the metric factor \e B
381 const Scalar& get_b_car() const {return b_car;} ;
382
383 /// Returns the metric coefficient \f$N^\varphi\f$
384 const Scalar& get_nphi() const {return nphi;} ;
385
386
387 /** Returns the scalar \f$A^2 K_{ij} K^{ij}\f$.
388 * For axisymmetric stars, this quantity is related to the
389 * derivatives of \f$N^\varphi\f$ by
390 * \f[
391 * A^2 K_{ij} K^{ij} = {B^2 \over 2 N^2} \, r^2\sin^2\theta \,
392 * \left[ \left( {\partial N^\varphi \over \partial r} \right) ^2
393 * + {1\over r^2} \left( {\partial N^\varphi \over
394 * \partial \theta} \right) ^2 \right] \ .
395 * \f]
396 * In particular it is related to the quantities \f$k_1\f$ and \f$k_2\f$
397 * introduced by Eqs. (3.7) and (3.8) of
398 * Bonazzola et al. \a Astron. \a Astrophys. \b 278 , 421 (1993)
399 * by
400 * \f[
401 * A^2 K_{ij} K^{ij} = 2 A^2 (k_1^2 + k_2^2) \ .
402 * \f]
403 */
404 const Scalar& get_ak_car() const {return ak_car;} ;
405
406
407
408
409
410
411 // Outputs
412 // -------
413 public:
414 virtual void sauve(FILE *) const ; ///< Save in a file
415
416 void gyoto_data(const char* file_name) const ; ///< Save in a file for GYOTO
417
418
419 protected:
420 /// Operator >> (virtual function called by the operator <<).
421 virtual ostream& operator>>(ostream& ) const ;
422
423 // Global quantities
424 // -----------------
425 public:
426 virtual double angu_mom() const ; ///< Angular momentum
427
428 /** Coordinate r of the innermost stable circular orbit (ISCO).
429 *
430 * @param lmin index of the innermost domain in which the ISCO is searched:
431 * the ISCO is searched inwards from the last but one domain to
432 * the domain of index lmin.
433 * @param ost output stream to give details of the computation;
434 * if set to 0x0 [default value], no details will be
435 * given.
436 *
437 */
438 virtual double r_isco(int lmin, ostream* ost = 0x0) const ;
439
440 /// Orbital frequency at the innermost stable circular orbit (ISCO).
441 virtual double f_isco(int lmin) const ;
442
443 /// Energy of a particle at the ISCO
444 virtual double espec_isco(int lmin) const ;
445
446 /// Angular momentum of a particle at the ISCO
447 virtual double lspec_isco(int lmin) const ;
448
449 /// Coordinate r of the marginally bound circular orbit (R_mb).
450 virtual double r_mb(int lmin, ostream* ost = 0x0) const ;
451
452
453 // Computational routines
454 // ----------------------
455
456 /** Updates the 3-metric \f$\gamma_{ij}\f$ from \e A and \e B
457 * and the shift vector \f$\beta^i\f$ from \f$N^\phi\f$.
458 *
459 */
460 virtual void update_metric() ;
461
462 /** Computes the extrinsic curvature and \c ak_car from
463 * \c nphi , \c nn and \c b_car .
464 */
465 virtual void extrinsic_curvature() ;
466
467 };
468
469
470 //--------------------------//
471 // base class Star_QI //
472 //--------------------------//
473
474 /**
475 *Base class for axisymmetric stationary compact stars in Quasi-Isotropic coordinates (***under development***).
476 * \ingroup(compactobjects)
477 *
478 * The time slice \f$t=\mathrm{const}\f$ has the topology of \f$R^3\f$
479 * and the metric is expressed in Quasi-Isotropic (QI) coordinates :
480 * \f[
481 * ds^2 = - N^2 dt^2 + A^2 (dr^2 + r^2 d\theta^2)
482 * + B^2 r^2 \sin^2\theta (d\varphi - N^\varphi dt)^2
483 * \f]
484 *
485 *
486 */
487 class Star_QI : public Compobj_QI {
488
489 // Data :
490 // -----
491 protected:
492
493 /** Logarithm of the lapse \e N .
494 */
495 Scalar logn ;
496
497 /** Component \f$\tilde N^\varphi = N^\varphi r\sin\theta\f$ of the
498 * shift vector
499 */
500 Scalar tnphi ;
501
502 /** Part of the Metric potential \f$\nu = \ln N\f$ = \c logn
503 * generated by the matter terms
504 */
505 Scalar nuf ;
506
507 /** Part of the Metric potential \f$\nu = \ln N\f$ = \c logn
508 * generated by the quadratic terms
509 */
510 Scalar nuq ;
511
512 /// Metric potential \f$\zeta = \ln(AN)\f$
513 Scalar dzeta ;
514
515 /// Metric potential \f$\tilde G = (NB-1) r\sin\theta\f$
516 Scalar tggg ;
517
518 /** Vector \f$W^i\f$ used in the decomposition of \c shift ,
519 * following Shibata's prescription
520 * [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
521 * \f[
522 * N^i = {7\over 8} W^i - {1\over 8}
523 * \left(\nabla^i\chi+\nabla^iW^kx_k\right)
524 * \f]
525 * NB: \c w_shift contains the components of \f$W^i\f$
526 * with respect to the Cartesian triad associated with the
527 * mapping \c mp .
528 */
529 Vector w_shift ;
530
531 /** Scalar \f$\chi\f$ used in the decomposition of \c shift ,
532 * following Shibata's prescription
533 * [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
534 * \f[
535 * N^i = {7\over 8} W^i - {1\over 8}
536 * \left(\nabla^i\chi+\nabla^iW^kx_k\right)
537 * \f]
538 */
539 Scalar khi_shift ;
540
541 /** Effective source at the previous step for the resolution of
542 * the Poisson equation for \c nuf by means of
543 * \c Map_et::poisson .
544 */
545 Scalar ssjm1_nuf ;
546
547 /** Effective source at the previous step for the resolution of
548 * the Poisson equation for \c nuq by means of
549 * \c Map_et::poisson .
550 */
551 Scalar ssjm1_nuq ;
552
553 /** Effective source at the previous step for the resolution of
554 * the Poisson equation for \c dzeta .
555 */
556 Scalar ssjm1_dzeta ;
557
558 /** Effective source at the previous step for the resolution of
559 * the Poisson equation for \c tggg .
560 */
561 Scalar ssjm1_tggg ;
562
563 /** Effective source at the previous step for the resolution of
564 * the Poisson equation for the scalar \f$\chi\f$ by means of
565 * \c Map_et::poisson .
566 * \f$\chi\f$ is an intermediate quantity for the resolution of the
567 * elliptic equation for the shift vector \f$N^i\f$
568 */
569 Scalar ssjm1_khi ;
570
571 /** Effective source at the previous step for the resolution of
572 * the vector Poisson equation for \f$W^i\f$.
573 * \f$W^i\f$ is an intermediate quantity for the resolution of the
574 * elliptic equation for the shift vector \f$N^i\f$
575 * (Components with respect to the Cartesian triad associated with
576 * the mapping \c mp )
577 */
578 Vector ssjm1_wshift ;
579
580
581 // Derived data :
582 // ------------
583 protected:
584
585 mutable double* p_grv2 ; ///< Error on the virial identity GRV2
586 mutable double* p_grv3 ; ///< Error on the virial identity GRV3
587 mutable double* p_mom_quad ; ///< Quadrupole moment
588 mutable double* p_mass_g ; ///< Gravitational mass (ADM mass as a volume integral)
589
590
591 // Constructors - Destructor
592 // -------------------------
593 public:
594 /** Standard constructor.
595 *
596 * @param mp_i Mapping on which the star is contructed
597 *
598 */
599 Star_QI(Map& mp_i) ;
600
601
602 Star_QI(const Star_QI& ) ; ///< Copy constructor
603
604 /** Constructor from a file (see \c sauve(FILE*) ).
605 *
606 * @param mp_i Mapping on which the star is constructed
607 * @param fich input file (must have been created by the function
608 * \c Star_QI::sauve )
609 */
610 Star_QI(Map& mp_i, FILE* fich) ;
611
612 virtual ~Star_QI() ; ///< Destructor
613
614
615 // Memory management
616 // -----------------
617 protected:
618 /// Deletes all the derived quantities
619 virtual void del_deriv() const ;
620
621 /// Sets to \c 0x0 all the pointers on derived quantities
622 virtual void set_der_0x0() const ;
623
624 // Mutators / assignment
625 // ---------------------
626 public:
627 /// Assignment to another \c Star_QI
628 void operator=(const Star_QI& ) ;
629
630 // Accessors
631 // ---------
632 public:
633
634 /** Returns the logarithm of the lapse \e N.
635 */
636 const Scalar& get_logn() const {return logn;} ;
637
638
639 /** Returns the component \f$\tilde N^\varphi = N^\varphi r\sin\theta\f$
640 * of the shift vector
641 */
642 const Scalar& get_tnphi() const {return tnphi;} ;
643
644 /** Returns the part of the Metric potential \f$\nu = \ln N\f$ = \c logn
645 * generated by the matter terms
646 */
647 const Scalar& get_nuf() const {return nuf;} ;
648
649 /** Returns the Part of the Metric potential \f$\nu = \ln N\f$ = \c logn
650 * generated by the quadratic terms
651 */
652 const Scalar& get_nuq() const {return nuq;} ;
653
654 /// Returns the Metric potential \f$\zeta = \ln(AN)\f$
655 const Scalar& get_dzeta() const {return dzeta;} ;
656
657 /// Returns the Metric potential \f$\tilde G = (NB-1) r\sin\theta\f$
658 const Scalar& get_tggg() const {return tggg;} ;
659
660 /** Returns the vector \f$W^i\f$ used in the decomposition of
661 * \c shift ,
662 * following Shibata's prescription
663 * [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
664 * \f[
665 * N^i = {7\over 8} W^i - {1\over 8}
666 * \left(\nabla^i\chi+\nabla^iW^kx_k\right)
667 * \f]
668 * NB: \c w_shift contains the components of \f$W^i\f$
669 * with respect to the Cartesian triad associated with the
670 * mapping \c mp .
671 */
672 const Vector& get_w_shift() const {return w_shift;} ;
673
674 /** Returns the scalar \f$\chi\f$ used in the decomposition of
675 * \c shift
676 * following Shibata's prescription
677 * [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
678 * \f[
679 * N^i = {7\over 8} W^i - {1\over 8}
680 * \left(\nabla^i\chi+\nabla^iW^kx_k\right)
681 * \f]
682 * NB: \c w_shift contains the components of \f$W^i\f$
683 * with respect to the Cartesian triad associated with the
684 * mapping \c mp .
685 */
686 const Scalar& get_khi_shift() const {return khi_shift;} ;
687
688
689 // Outputs
690 // -------
691 public:
692 virtual void sauve(FILE* ) const ; ///< Save in a file
693
694 protected:
695 /// Operator >> (virtual function called by the operator <<).
696 virtual ostream& operator>>(ostream& ) const ;
697
698 // Global quantities
699 // -----------------
700 public:
701
702 virtual double mass_g() const ; ///< Gravitational mass
703 virtual double angu_mom() const ; ///< Angular momentum
704
705 /** Error on the virial identity GRV2.
706 * This indicator is only valid for relativistic computations.
707 */
708 virtual double grv2() const ;
709
710 /** Error on the virial identity GRV3.
711 * The error is computed as the integral defined
712 * by Eq. (43) of [Gourgoulhon and Bonazzola,
713 * \a Class. \a Quantum \a Grav. \b 11, 443 (1994)] divided by
714 * the integral of the matter terms.
715 *
716 * @param ost output stream to give details of the computation;
717 * if set to 0x0 [default value], no details will be
718 * given.
719 *
720 */
721 virtual double grv3(ostream* ost = 0x0) const ;
722
723 /** Quadrupole moment.
724 * The quadrupole moment \e Q is defined according to Eq. (7) of
725 * [Salgado, Bonazzola, Gourgoulhon and Haensel, \a Astron. \a Astrophys.
726 * \b 291 , 155 (1994)]. At the Newtonian limit it is related to
727 * the component \f${\bar I}_{zz}\f$ of the MTW (1973) reduced quadrupole
728 * moment \f${\bar I}_{ij}\f$ by: \f$Q = -3/2 {\bar I}_{zz}\f$.
729 * Note that \e Q is the negative of the quadrupole moment defined
730 * by Laarakkers and Poisson, \a Astrophys. \a J. \b 512 , 282 (1999).
731 */
732 virtual double mom_quad() const ;
733
734
735 // Computational routines
736 // ----------------------
737 public:
738
739 /** Computes metric coefficients from known potentials.
740 *
741 * The calculation is performed starting from the quantities
742 * \c logn , \c dzeta , \c tggg and \c shift ,
743 * which are supposed to be up to date.
744 * From these, the following fields are updated:
745 * \c nnn , \c a_car , \c bbb and \c b_car, as well as
746 * the 3-metric \c gamma.
747 *
748 */
749 void update_metric() ;
750
751 /** Computes \c shift from \c w_shift and \c khi_shift
752 * according to Shibata's prescription
753 * [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
754 * \f[
755 * N^i = {7\over 8} W^i - {1\over 8}
756 * \left(\nabla^i\chi+\nabla^iW^kx_k\right)
757 * \f]
758 */
759 void fait_shift() ;
760
761 /** Computes \c tnphi and \c nphi from the Cartesian
762 * components of the shift, stored in \c shift .
763 */
764 void fait_nphi() ;
765
766 /** Computes the coefficient \f$\lambda\f$ which ensures that the
767 * GRV2 virial identity is satisfied.
768 * \f$\lambda\f$ is the coefficient by which one must multiply
769 * the quadratic source term \f$\sigma_q\f$ of the 2-D Poisson equation
770 * \f[
771 * \Delta_2 u = \sigma_m + \sigma_q
772 * \f]
773 * in order that the total source does not contain any monopolar term,
774 * i.e. in order that
775 * \f[
776 * \int_0^{2\pi} \int_0^{+\infty} \sigma(r, \theta)
777 * \, r \, dr \, d\theta = 0 \ ,
778 * \f]
779 * where \f$\sigma = \sigma_m + \sigma_q\f$.
780 * \f$\lambda\f$ is computed according to the formula
781 * \f[
782 * \lambda = - { \int_0^{2\pi} \int_0^{+\infty} \sigma_m(r, \theta)
783 * \, r \, dr \, d\theta \over
784 * \int_0^{2\pi} \int_0^{+\infty} \sigma_q(r, \theta)
785 * \, r \, dr \, d\theta } \ .
786 * \f]
787 * Then, by construction, the new source
788 * \f$\sigma' = \sigma_m + \lambda \sigma_q\f$ has a vanishing monopolar
789 * term.
790 *
791 * @param sou_m [input] matter source term \f$\sigma_m\f$
792 * @param sou_q [input] quadratic source term \f$\sigma_q\f$
793 * @return value of \f$\lambda\f$
794 */
795 static double lambda_grv2(const Scalar& sou_m, const Scalar& sou_q) ;
796
797 };
798
799
800 //---------------------//
801 // class Kerr_QI //
802 //---------------------//
803
804 /**
805 * Kerr spacetime in Quasi-Isotropic coordinates (***under development***).
806 * \ingroup(compactobjects)
807 *
808 * The metric is expressed in Quasi-Isotropic (QI) coordinates :
809 * \f[
810 * ds^2 = - N^2 dt^2 + A^2 (dr^2 + r^2 d\theta^2)
811 * + B^2 r^2 \sin^2\theta (d\varphi - N^\varphi dt)^2
812 * \f]
813 *
814 *
815 */
816 class Kerr_QI : public Compobj_QI {
817
818 // Data :
819 // -----
820 protected:
821
822 /** mass parameter \f$M\f$
823 */
824 double mm ;
825
826 /** angular momentum parameter \f$a\f$
827 */
828 double aa ;
829
830
831 // Derived data :
832 // ------------
833 protected:
834
835
836 // Constructors - Destructor
837 // -------------------------
838 public:
839 /** Standard constructor.
840 *
841 * @param mp_i Mapping on which the star is contructed
842 * @param mass Black hole mass M
843 * @param a_over_m Black hole reduced angular momentum a/M (dimensionless)
844 *
845 */
846 Kerr_QI(Map& mp_i, double mass, double a_over_m) ;
847
848
849 Kerr_QI(const Kerr_QI& ) ; ///< Copy constructor
850
851 /** Constructor from a file (see \c sauve(FILE*) ).
852 *
853 * @param mp_i Mapping on which the star is constructed
854 * @param fich input file (must have been created by the function
855 * \c Kerr_QI::sauve )
856 */
857 Kerr_QI(Map& mp_i, FILE* fich) ;
858
859 virtual ~Kerr_QI() ; ///< Destructor
860
861 // Memory management
862 // -----------------
863 protected:
864 /// Deletes all the derived quantities
865 virtual void del_deriv() const ;
866
867 /// Sets to \c 0x0 all the pointers on derived quantities
868 virtual void set_der_0x0() const ;
869
870 // Mutators / assignment
871 // ---------------------
872 public:
873 /// Assignment to another \c Kerr_QI
874 void operator=(const Kerr_QI& ) ;
875
876 // Accessors
877 // ---------
878 public:
879
880 // Outputs
881 // -------
882 public:
883 virtual void sauve(FILE* ) const ; ///< Save in a file
884
885 protected:
886 /// Operator >> (virtual function called by the operator <<).
887 virtual ostream& operator>>(ostream& ) const ;
888
889 // Global quantities
890 // -----------------
891 public:
892
893
894 // Computational routines
895 // ----------------------
896 public:
897
898
899 };
900
901 //-------------------//
902 // class AltBH_QI //
903 //-------------------//
904
905 /**
906 * Alternative black hole spacetime in Quasi-Isotropic coordinates (***under development***).
907 * \ingroup(compactobjects)
908 *
909 * The metric is expressed in Quasi-Isotropic (QI) coordinates :
910 * \f[
911 * ds^2 = - N^2 dt^2 + A^2 (dr^2 + r^2 d\theta^2)
912 * + B^2 r^2 \sin^2\theta (d\varphi - N^\varphi dt)^2
913 * \f]
914 *
915 *
916 */
917 class AltBH_QI : public Compobj_QI {
918
919 // Data :
920 // -----
921 protected:
922
923 char description1[256] ; ///< String describing the model
924 char description2[256] ; ///< String describing the model
925 double a_spin ; ///< Spin parameter of the model
926
927 Scalar krphi ; ///< K_{(r)(phi)} read in the file
928
929 // Derived data :
930 // ------------
931 protected:
932
933
934 // Constructors - Destructor
935 // -------------------------
936 public:
937 /** Standard constructor.
938 *
939 * @param mp_i Mapping on which the star is contructed
940 * @param file_name Name of the file containing the metric data
941 * @param a_spin_i Spin parameter of the model
942 *
943 */
944 AltBH_QI(Map& mp_i, const char* file_name, double a_spin_i) ;
945
946
947 AltBH_QI(const AltBH_QI& ) ; ///< Copy constructor
948
949 /** Constructor from a file (see \c sauve(FILE*) ).
950 *
951 * @param mp_i Mapping on which the star is constructed
952 * @param fich input file (must have been created by the function
953 * \c AltBH_QI::sauve )
954 */
955 AltBH_QI(Map& mp_i, FILE* fich) ;
956
957 virtual ~AltBH_QI() ; ///< Destructor
958
959 // Memory management
960 // -----------------
961 protected:
962 /// Deletes all the derived quantities
963 virtual void del_deriv() const ;
964
965 /// Sets to \c 0x0 all the pointers on derived quantities
966 virtual void set_der_0x0() const ;
967
968 // Mutators / assignment
969 // ---------------------
970 public:
971 /// Assignment to another \c AltBH_QI
972 void operator=(const AltBH_QI& ) ;
973
974 // Accessors
975 // ---------
976 public:
977
978 /// Returns K_{(r)(phi)}/sin(theta).
979 const Scalar& get_krphi() const {return krphi;} ;
980
981 // Outputs
982 // -------
983 public:
984 virtual void sauve(FILE* ) const ; ///< Save in a file
985
986 protected:
987 /// Operator >> (virtual function called by the operator <<).
988 virtual ostream& operator>>(ostream& ) const ;
989
990 // Global quantities
991 // -----------------
992 public:
993
994
995 // Computational routines
996 // ----------------------
997 public:
998
999 /// Computation of the extrinsic curvature
1000 virtual void extrinsic_curvature() ;
1001
1002 };
1003
1004 //-------------------//
1005 // class ScalarBH //
1006 //-------------------//
1007
1008 /**
1009 * Black hole with scalar hair spacetime (***under development***).
1010 * \ingroup(compactobjects)
1011 *
1012 * The metric is expressed:
1013 * \f[
1014 * ds^2 = copy Carlos metric
1015
1016 * \f]
1017 *
1018 *
1019 */
1020 class ScalarBH : public Compobj {
1021
1022 // Data :
1023 // -----
1024 protected:
1025
1026 //char description1[256] ; ///< String describing the model
1027 // char description2[256] ; ///< String describing the model
1028 Scalar ff0 ; ///< Metric field F_0 of Herdeiro \& Radu (2015)
1029 Scalar ff1 ; ///< Metric field F_1 of Herdeiro \& Radu (2015)
1030 Scalar ff2 ; ///< Metric field F_2 of Herdeiro \& Radu (2015)
1031 Scalar ww ; ///< Metric field W of Herdeiro \& Radu (2015)
1032 Scalar sfield ; ///< Scalar field (modulus of Phi)
1033 double rHor ; ///< Event horizon coordinate radius
1034
1035 // Constructors - Destructor
1036 // -------------------------
1037 public:
1038 /** Standard constructor.
1039 *
1040 * @param mp_i Mapping on which the star is contructed
1041 * @param file_name Name of the file containing the metric data
1042 * @param a_spin_i Spin parameter of the model
1043 *
1044 */
1045 ScalarBH(Map& mp_i, const char* file_name) ;
1046
1047 ScalarBH(const ScalarBH& ) ; ///< Copy constructor
1048
1049 /** Constructor from a file (see \c sauve(FILE*) ).
1050 *
1051 * @param mp_i Mapping on which the star is constructed
1052 * @param fich input file (must have been created by the function
1053 * \c ScalarBH::sauve )
1054 */
1055 ScalarBH(Map& mp_i, FILE* fich) ;
1056
1057 virtual ~ScalarBH() ; ///< Destructor
1058
1059 // Memory management
1060 // -----------------
1061 protected:
1062 /// Deletes all the derived quantities
1063 virtual void del_deriv() const ;
1064
1065 /// Sets to \c 0x0 all the pointers on derived quantities
1066 virtual void set_der_0x0() const ;
1067
1068 // Mutators / assignment
1069 // ---------------------
1070 public:
1071 /// Assignment to another \c ScalarBH
1072 void operator=(const ScalarBH& ) ;
1073
1074 // Accessors
1075 // ---------
1076 public:
1077 /// Returns f0
1078 const Scalar& get_ff0() const {return ff0; } ;
1079 const Scalar& get_ff1() const {return ff1; } ;
1080 const Scalar& get_ff2() const {return ff2; } ;
1081 const Scalar& get_ww() const {return ww; } ;
1082 const Scalar& get_sfield() const {return sfield; } ;
1083 const double get_rHor() const {return rHor; } ;
1084
1085 // Outputs
1086 // -------
1087 public:
1088 virtual void sauve(FILE* ) const ; ///< Save in a file
1089
1090 protected:
1091 /// Operator >> (virtual function called by the operator <<).
1092 virtual ostream& operator>>(ostream& ) const ;
1093
1094 // Global quantities
1095 // -----------------
1096 public:
1097
1098
1099 // Computational routines
1100 // ----------------------
1101 public:
1102 virtual void update_metric();
1103 };
1104
1105
1106 //------------------------//
1107 // class HiggsMonopole //
1108 //------------------------//
1109
1110 /**
1111 * Higgs monopole (***under development***).
1112 * \ingroup(compactobjects)
1113 *
1114 *
1115 */
1116 class HiggsMonopole : public Compobj {
1117
1118 // Data :
1119 // -----
1120 protected:
1121
1122 char description1[256] ; ///< String describing the model
1123 char description2[256] ; ///< String describing the model
1124
1125 Scalar hh ; ///< Higgs scalar field
1126
1127 Scalar grr ; ///< Metric coefficient g_rr
1128
1129 Scalar press ; ///< Fluid pressure
1130
1131 // Derived data :
1132 // ------------
1133 protected:
1134
1135
1136 // Constructors - Destructor
1137 // -------------------------
1138 public:
1139 /** Standard constructor.
1140 *
1141 * @param mp_i Mapping on which the Higgs monopole is contructed
1142 * @param file_name Name of the file containing the data
1143 *
1144 */
1145 HiggsMonopole(Map& mp_i, const char* file_name) ;
1146
1147 HiggsMonopole(const HiggsMonopole& ) ; ///< Copy constructor
1148
1149 virtual ~HiggsMonopole() ; ///< Destructor
1150
1151 // Memory management
1152 // -----------------
1153 protected:
1154 /// Deletes all the derived quantities
1155 // virtual void del_deriv() const ;
1156
1157 /// Sets to \c 0x0 all the pointers on derived quantities
1158 // virtual void set_der_0x0() const ;
1159
1160 // Mutators / assignment
1161 // ---------------------
1162 public:
1163 /// Assignment to another \c AltBH_QI
1164 // void operator=(const AltBH_QI& ) ;
1165
1166 // Accessors
1167 // ---------
1168 public:
1169
1170 /// Returns Higgs field
1171 const Scalar& get_higgs() const {return hh;} ;
1172
1173 /// Returns the metric coefficient g_rr
1174 const Scalar& get_grr() const {return grr;} ;
1175
1176 /// Returns the fluid pressure
1177 const Scalar& get_press() const {return press;} ;
1178
1179 // Outputs
1180 // -------
1181 public:
1182 // virtual void sauve(FILE* ) const ; ///< Save in a file
1183
1184 protected:
1185 /// Operator >> (virtual function called by the operator <<).
1186 virtual ostream& operator>>(ostream& ) const ;
1187
1188 // Global quantities
1189 // -----------------
1190 public:
1191
1192
1193 // Computational routines
1194 // ----------------------
1195 public:
1196
1197 /// Computation of the extrinsic curvature
1198 // virtual void extrinsic_curvature() ;
1199
1200 };
1201
1202
1203
1204
1205 }
1206 #endif