00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __Isol_hor_H_
00028 #define __Isol_hor_H_
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222 class Sym_tensor_trans ;
00223 class Sym_tensor ;
00224 class Vector ;
00225 class Scalar ;
00226 class Metric ;
00227 class Metric_flat ;
00228 class Base_vect ;
00229 class Map ;
00230 class Tbl ;
00231 class Time_slice ;
00232 class Time_slice_conf ;
00233
00234
00235 #include "time_slice.h"
00236 #include "proto.h"
00237 #include "headcpp.h"
00238 #include "cmp.h"
00239 #include "evolution.h"
00240
00241
00242
00243
00244
00245
00252 class Isol_hor : public Time_slice_conf {
00253
00254
00255
00256 protected:
00258 Map_af& mp ;
00259
00261 int nz ;
00262
00264 double radius ;
00265
00267 double omega ;
00268
00270 double boost_x ;
00271
00273 double boost_z ;
00274
00276 double regul ;
00277
00279 mutable Evolution_std<Scalar> n_auto_evol ;
00280
00282 mutable Evolution_std<Scalar> n_comp_evol ;
00283
00285 mutable Evolution_std<Scalar> psi_auto_evol ;
00286
00288 mutable Evolution_std<Scalar> psi_comp_evol ;
00289
00292 mutable Evolution_std<Vector> dn_evol ;
00293
00296 mutable Evolution_std<Vector> dpsi_evol ;
00297
00299 mutable Evolution_std<Vector> beta_auto_evol ;
00300
00302 mutable Evolution_std<Vector> beta_comp_evol ;
00303
00308 mutable Evolution_std<Sym_tensor> aa_auto_evol ;
00309
00314 mutable Evolution_std<Sym_tensor> aa_comp_evol ;
00315
00318 mutable Evolution_std<Sym_tensor> aa_nn ;
00319
00321 mutable Evolution_std<Scalar> aa_quad_evol ;
00322
00324 Metric met_gamt ;
00325
00327 Sym_tensor gamt_point ;
00328
00330 Scalar trK ;
00331
00333 Scalar trK_point ;
00334
00343 Scalar decouple ;
00344
00345
00346
00347 public:
00348
00356 Isol_hor(Map_af& mpi, int depth_in = 3) ;
00357
00380 Isol_hor(Map_af& mpi, const Scalar& lapse_in, const Scalar& psi_in,
00381 const Vector& shift_in, const Sym_tensor& aa_in,
00382 const Metric& gamt, const Sym_tensor& gamt_point,
00383 const Scalar& trK, const Scalar& trK_point,
00384 const Metric_flat& ff_in, int depth_in = 3) ;
00385
00387 Isol_hor(const Isol_hor& ) ;
00388
00400 Isol_hor (Map_af& mp, FILE* fich,
00401 bool partial_read, int depth_in = 3) ;
00402
00404 virtual ~Isol_hor() ;
00405
00406
00407
00408
00409 public:
00411 void operator=(const Isol_hor&) ;
00412
00413
00414 public:
00416 const Map_af& get_mp() const {return mp;} ;
00417
00419 Map_af& set_mp() {return mp; } ;
00420
00424 double get_radius() const {return radius;} ;
00425
00429 void set_radius(double rad) {radius = rad ;} ;
00430
00434 double get_omega() const {return omega ;} ;
00438 void set_omega(double ome) {omega = ome ;} ;
00439
00443 double get_boost_x() const {return boost_x ;} ;
00447 void set_boost_x(double bo) {boost_x = bo ;} ;
00448
00452 double get_boost_z() const {return boost_z ;} ;
00456 void set_boost_z(double bo) {boost_z = bo ;} ;
00457
00458
00459
00460
00461
00462 public:
00463
00465 virtual const Scalar& n_auto() const ;
00466
00468 virtual const Scalar& n_comp() const ;
00469
00471 virtual const Scalar& psi_auto() const ;
00472
00474 virtual const Scalar& psi_comp() const ;
00475
00478 virtual const Vector& dnn() const ;
00479
00483 virtual const Vector& dpsi() const ;
00484
00486 virtual const Vector& beta_auto() const ;
00487
00489 virtual const Vector& beta_comp() const ;
00490
00495 virtual const Sym_tensor& aa_auto() const ;
00496
00501 virtual const Sym_tensor& aa_comp() const ;
00502
00506 virtual const Scalar& aa_quad() const ;
00507
00512 virtual const Metric& tgam() const {return met_gamt ;}
00513
00517 const Scalar get_decouple() const {return decouple ;}
00518
00519
00520 public:
00528 void n_comp (const Isol_hor& comp) ;
00529
00537 void psi_comp (const Isol_hor& comp) ;
00538
00544 void beta_comp (const Isol_hor& comp) ;
00545
00554 double viriel_seul () const ;
00555
00565 void init_bhole () ;
00566
00572 void init_met_trK() ;
00573
00580 void init_bhole_seul () ;
00581
00592 void set_psi(const Scalar& psi_in) ;
00593
00595 void set_nn(const Scalar& nn_in) ;
00596
00598 void set_gamt(const Metric& gam_tilde) ;
00599
00600
00601
00602 public:
00603
00604
00606 const Vector radial_vect_hor() const ;
00607
00609 const Vector tradial_vect_hor() const ;
00610
00612 const Scalar b_tilde() const ;
00613
00615 const Scalar darea_hor() const ;
00616
00618 double area_hor() const ;
00619
00621 double radius_hor() const ;
00622
00624 double ang_mom_hor() const ;
00625
00627 double mass_hor() const ;
00628
00630 double kappa_hor() const ;
00631
00633 double omega_hor() const ;
00634
00636 double ang_mom_adm() const ;
00637
00639 Scalar expansion() const ;
00640
00641
00642
00643
00644 public:
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656 void init_data(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
00657 int solve_lapse, int solve_psi, int solve_shift,
00658 double precis = 1.e-12,
00659 double relax_nn = 0.5, double relax_psi = 0.5,
00660 double relax_beta = 0.5, int niter = 100) ;
00661
00662 void init_data_loop(int bound_nn, double lim_nn, int bound_psi,
00663 int bound_beta, int solve_lapse, int solve_psi,
00664 int solve_shift, double precis= 1.e-12,
00665 double precis_loop= 1.e-12,
00666 double relax_nn = 1., double relax_psi= 1.,
00667 double relax_beta = 1., double relax_loop = 1.,
00668 int niter = 100) ;
00669
00670
00671
00672 void init_data_spher(int bound_nn, double lim_nn, int bound_psi,
00673 int bound_beta, int solve_lapse, int solve_psi,
00674 int solve_shift, double precis = 1.e-12,
00675 double relax = 1., int niter = 100) ;
00676
00677 void init_data_alt(int bound_nn, double lim_nn, int bound_psi,
00678 int bound_beta, int solve_lapse, int solve_psi,
00679 int solve_shift, double precis = 1.e-12,
00680 double relax = 1., int niter = 100) ;
00681
00682 void init_data_CTS_gen(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
00683 int solve_lapse, int solve_psi, int solve_shift,
00684 double precis = 1.e-12, double relax_nn = 1.,
00685 double relax_psi = 1., double relax_beta = 1.,
00686 int niter = 100, double a = 1., double zeta = 4.) ;
00687
00688
00689
00690
00691
00692
00693
00695 const Scalar source_psi() const ;
00696
00698 const Scalar source_nn() const ;
00699
00701 const Vector source_beta() const ;
00702
00704 const Scalar source_b_tilde() const ;
00705
00707 const Vector source_vector_b() const ;
00708
00709
00710
00711
00712
00714 const Valeur boundary_psi_Dir_evol() const ;
00715
00717 const Valeur boundary_psi_Neu_evol() const ;
00718
00720 const Valeur boundary_psi_Dir_spat() const ;
00721
00723 const Valeur boundary_psi_Neu_spat() const ;
00724
00726 const Valeur boundary_psi_app_hor() const ;
00727
00729 const Valeur boundary_psi_Dir() const ;
00730
00732 const Valeur boundary_nn_Dir_kk() const ;
00733
00735 const Valeur boundary_nn_Neu_kk(int nn = 1) const ;
00736
00738 const Valeur boundary_nn_Neu_Cook() const ;
00739
00742 const Valeur boundary_nn_Dir_eff(double aa) const ;
00743
00746 const Valeur boundary_nn_Dir_lapl(int mer = 1) const ;
00747
00750 const Valeur boundary_nn_Neu_eff(double aa) const ;
00751
00753 const Valeur boundary_nn_Dir(double aa) const ;
00754
00756 const Valeur boundary_beta_r() const ;
00757
00759 const Valeur boundary_beta_theta() const ;
00760
00762 const Valeur boundary_beta_phi(double om) const ;
00763
00765 const Valeur boundary_beta_x(double om) const ;
00766
00768 const Valeur boundary_beta_y(double om) const ;
00769
00771 const Valeur boundary_beta_z() const ;
00772
00774 const Valeur beta_boost_x() const ;
00775
00777 const Valeur beta_boost_z() const ;
00778
00780 const Vector vv_bound_cart(double om) const ;
00781
00784 const Vector vv_bound_cart_bin(double om, int hole = 0) const ;
00785
00787 const Valeur boundary_vv_x(double om) const ;
00788
00790 const Valeur boundary_vv_y(double om) const ;
00791
00793 const Valeur boundary_vv_z(double om) const ;
00794
00796 const Valeur boundary_vv_x_bin(double om, int hole = 0) const ;
00797
00799 const Valeur boundary_vv_y_bin(double om, int hole = 0) const ;
00800
00802 const Valeur boundary_vv_z_bin(double om, int hole = 0) const ;
00803
00805 const Valeur boundary_b_tilde_Neu() const ;
00806
00808 const Valeur boundary_b_tilde_Dir() const ;
00809
00814 void update_aa() ;
00815
00827 double regularisation (const Vector& shift_auto, const Vector& shift_comp,
00828 double ang_vel) ;
00829
00839 double regularise_one() ;
00840
00843 void met_kerr_perturb() ;
00844
00845
00846
00847
00848
00849
00850 void aa_kerr_ww(double mm, double aa) ;
00851
00853
00854 double axi_break() const ;
00855
00856
00857
00858
00859
00860 void adapt_hor(double c_min, double c_max) ;
00861
00862
00863
00864
00865 protected:
00867 virtual ostream& operator>>(ostream& ) const ;
00868
00869
00870 public :
00877 virtual void sauve(FILE* fich, bool partial_save) const ;
00878
00879 friend class Bin_hor ;
00880
00881 };
00882
00892 class Single_hor {
00893
00894
00895
00896 protected:
00898 Map_af& mp ;
00899
00901 int nz ;
00902
00904 double radius ;
00905
00907 double omega ;
00908
00910 double regul ;
00911
00913 Scalar n_auto ;
00914
00916 Scalar n_comp ;
00917
00919 Scalar nn ;
00920
00922 Scalar psi_auto ;
00923
00925 Scalar psi_comp ;
00926
00928 Scalar psi ;
00929
00931 mutable Scalar* p_psi4 ;
00932
00935 Vector dn ;
00936
00939 Vector dpsi ;
00940
00942 Vector beta_auto ;
00943
00945 Vector beta_comp ;
00946
00948 Vector beta ;
00949
00951 mutable Metric* p_gam ;
00952
00957 Sym_tensor aa_auto ;
00958
00963 Sym_tensor aa_comp ;
00964
00969 Sym_tensor aa ;
00970
00972 mutable Sym_tensor* p_k_dd ;
00973
00975 Metric tgam ;
00976
00978 Metric_flat ff ;
00979
00981 Sym_tensor hh ;
00982
00984 Sym_tensor gamt_point ;
00985
00987 Scalar trK ;
00988
00990 Scalar trK_point ;
00991
01000 Scalar decouple ;
01001
01002
01003
01004 public:
01005
01009 Single_hor(Map_af& mpi) ;
01010
01012 Single_hor(const Single_hor& ) ;
01013
01021 Single_hor (Map_af& mp, FILE* fich) ;
01022
01024 virtual ~Single_hor() ;
01025
01026
01027
01028
01029 public:
01031 void operator=(const Single_hor&) ;
01032
01033
01034 public:
01036 const Map_af& get_mp() const {return mp;} ;
01037
01039 Map_af& set_mp() {return mp; } ;
01040
01044 double get_radius() const {return radius;} ;
01045
01049 void set_radius(double rad) {radius = rad ;} ;
01050
01054 double get_omega() const {return omega ;} ;
01058 void set_omega(double ome) {omega = ome ;} ;
01059
01060
01061
01062 protected:
01063
01065 void del_deriv() const ;
01066
01068 void set_der_0x0() const ;
01069
01070
01071
01072
01073
01074 public:
01075
01077 const Scalar& get_n_auto() const ;
01078
01080 const Scalar& get_n_comp() const ;
01081
01083 const Scalar& get_nn() const ;
01084
01086 const Scalar& get_psi_auto() const ;
01087
01089 const Scalar& get_psi_comp() const ;
01090
01092 const Scalar& get_psi() const ;
01093
01095 const Scalar& get_psi4() const ;
01096
01098 const Vector& get_dn() const ;
01099
01102 const Vector& get_dpsi() const ;
01103
01105 const Vector& get_beta_auto() const ;
01106
01108 const Vector& get_beta_comp() const ;
01109
01111 const Vector& get_beta() const ;
01112
01116 const Sym_tensor& get_aa_auto() const ;
01117
01121 const Sym_tensor& get_aa_comp() const ;
01122
01126 const Sym_tensor& get_aa() const ;
01127
01131 const Metric& get_tgam() const {return tgam ;}
01132
01135 const Metric& get_gam() const ;
01136
01139 const Sym_tensor& get_k_dd() const ;
01140
01144 const Scalar get_decouple() const {return decouple ;}
01145
01146
01147 public:
01155 void n_comp_import (const Single_hor& comp) ;
01156
01164 void psi_comp_import (const Single_hor& comp) ;
01165
01171 void beta_comp_import (const Single_hor& comp) ;
01172
01181 double viriel_seul () const ;
01182
01192 void init_bhole () ;
01193
01199 void init_met_trK() ;
01200
01207 void init_bhole_seul () ;
01208
01219 void set_psi_auto(const Scalar& psi_in) ;
01220
01222 void set_n_auto(const Scalar& nn_in) ;
01223
01225 void set_beta_auto(const Scalar& shift_in) ;
01226
01228 void set_aa_auto(const Scalar& aa_auto_in) ;
01229
01231 void set_aa_comp(const Scalar& aa_comp_in) ;
01232
01234 void set_aa(const Scalar& aa_in) ;
01235
01236
01237
01238
01239 public:
01240
01241
01243 const Scalar b_tilde() const ;
01244
01246 const Scalar darea_hor() const ;
01247
01249 double area_hor() const ;
01250
01252 double radius_hor() const ;
01253
01255 double ang_mom_hor() const ;
01256
01258 double mass_hor() const ;
01259
01261 double kappa_hor() const ;
01262
01264 double omega_hor() const ;
01265
01267 double ang_mom_adm() const ;
01268
01270 Scalar expansion() const ;
01271
01272
01273
01274
01275
01277 const Valeur boundary_psi_app_hor() const ;
01278
01281 const Valeur boundary_nn_Dir(double aa) const ;
01282
01285 const Valeur boundary_nn_Neu(double aa) const ;
01286
01288 const Valeur boundary_beta_x(double om_orb, double om_loc) const ;
01289
01291 const Valeur boundary_beta_y(double om_orb, double om_loc) const ;
01292
01294 const Valeur boundary_beta_z() const ;
01295
01296
01308 double regularisation (const Vector& shift_auto, const Vector& shift_comp,
01309 double ang_vel) ;
01310
01320 double regularise_one() ;
01321
01322 public :
01329 virtual void sauve(FILE* fich) const ;
01330
01331 friend class Bin_hor ;
01332
01333 };
01334
01335 class Bin_hor {
01336
01337
01338 private:
01339
01340 Single_hor hole1 ;
01341 Single_hor hole2 ;
01342
01344 Single_hor* holes[2] ;
01345
01346 double omega ;
01347
01348 public:
01349
01358 Bin_hor(Map_af& mp1, Map_af& mp2) ;
01359
01360 Bin_hor(const Bin_hor& ) ;
01361
01374 Bin_hor (Map_af& mp1, Map_af& mp2, FILE* fich) ;
01375
01376 virtual ~Bin_hor() ;
01377
01378 public :
01385 void sauve(FILE* fich) const ;
01386
01390 void write_global(ostream&, double lim_nn, int bound_nn,
01391 int bound_psi, int bound_beta, double alpha) const ;
01392
01393 public:
01394
01395 void operator=(const Bin_hor&) ;
01396
01401 Single_hor& set(int i)
01402 { assert( (i==1) || (i==2) );
01403 return *holes[i-1] ;} ;
01407 void set_omega(double ome) {omega = ome ;
01408 hole1.set_omega (ome) ;
01409 hole2.set_omega (ome) ;} ;
01410
01411 public: const Single_hor& operator()(int i) const
01416 { assert( (i==1) || (i==2) );
01417 return *holes[i-1] ;} ;
01418
01420 double get_omega() const {return omega; } ;
01421
01430 void init_bin_hor() ;
01431
01438 double viriel() const ;
01439
01444 void extrinsic_curvature () ;
01445
01450 void decouple () ;
01451
01452 public:
01468 void set_statiques (double precis, double relax, int bound_nn,
01469 double lim_nn, int bound_psi) ;
01470
01497 double coal (double ang_vel, double relax, int nb_om,
01498 int nb_it, int bound_nn, double lim_nn,
01499 int bound_psi, int bound_beta, double omega_eff,
01500 double alpha,
01501 ostream& fich_iteration, ostream& fich_correction,
01502 ostream& fich_viriel, ostream& fich_kss,
01503 int step, int search_mass, double mass_irr,
01504 const int sortie = 0) ;
01505
01506
01521 void solve_lapse (double precis, double relax, int bound_nn,
01522 double lim_nn) ;
01523
01536 void solve_psi (double precis, double relax, int bound_psi) ;
01537
01551 void solve_shift (double precis, double relax, int bound_beta,
01552 double omega_eff) ;
01553
01558 void import_bh (const Bin_hor& bin) ;
01559
01563 double adm_mass() const ;
01564
01569 double komar_mass() const ;
01570
01575 double ang_mom_hor() const ;
01576
01580 double ang_mom_adm() const ;
01581
01588 double proper_distance(const int nr = 65) const ;
01589
01594 Sym_tensor hh_Samaya_hole1() ;
01595
01600 Sym_tensor hh_Samaya_hole2() ;
01601
01605 void set_hh_Samaya() ;
01606
01607
01608
01609 } ;
01610
01611
01612 #endif
01613