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 #ifndef __SPHEROID_H_
00027 #define __SPHEROID_H_
00028
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 #include "metric.h"
00075
00080 class Spheroid {
00081
00082
00083
00084
00085 protected:
00087 Scalar h_surf ;
00088
00092 Tensor jac2d ;
00093
00096 Tensor proj ;
00097
00100 Sym_tensor qq ;
00101
00104 Vector ss ;
00105
00109 Vector ephi;
00110
00111 Metric qab ;
00112
00113 Scalar ricci;
00114
00118 Sym_tensor hh ;
00119
00120 Scalar trk ;
00121
00125 Vector ll ;
00126
00130 Sym_tensor jj ;
00131
00134 Scalar fff;
00135
00139 Scalar ggg;
00140
00141
00142
00143 Scalar zeta;
00144
00147 bool issphere ;
00148
00149
00150
00151
00152 protected:
00153 mutable Scalar* p_sqrt_q ;
00154 mutable double* p_area ;
00155 mutable double* p_angu_mom ;
00156 mutable double* p_mass ;
00157 mutable double* p_multipole_mass ;
00158 mutable double* p_multipole_angu ;
00159 mutable double* p_epsilon_A_minus_one ;
00160 mutable double* p_epsilon_P_minus_one ;
00161 mutable Scalar* p_theta_plus ;
00162 mutable Scalar* p_theta_minus ;
00163 mutable Sym_tensor* p_shear ;
00164 mutable Tensor* p_delta ;
00165
00166
00167
00168
00169
00170 public:
00175 Spheroid(const Map_af& map, double radius) ;
00185 Spheroid(const Scalar& h_in, const Metric& gamij, const Sym_tensor& Kij) ;
00186 Spheroid(const Spheroid& ) ;
00187
00189 Spheroid(FILE* ) ;
00190
00191 virtual ~Spheroid() ;
00192
00193
00194
00195
00196 protected:
00198 virtual void del_deriv() const ;
00199
00201 void set_der_0x0() const ;
00202
00203
00204
00205
00206 public:
00208 void operator=(const Spheroid&) ;
00209
00210
00212 void set_ephi(const Scalar&) ;
00213
00214
00215
00216
00217 public:
00219 const Scalar& get_hsurf() const {return h_surf ; } ;
00220
00222 const Metric& get_qab() const {return qab ; } ;
00223
00225 const Scalar& get_ricci() const {return ricci ; } ;
00226
00228 const Sym_tensor& get_hh() const {return hh ; } ;
00229
00231 const Sym_tensor& get_qq() const {return qq ; } ;
00232
00234 const Tensor& get_proj() const {return proj ; } ;
00235
00237 const Tensor& get_jac2d() const {return jac2d ; } ;
00238
00240 const Scalar& get_trk() const {return trk; } ;
00241
00243 const Vector& get_ll() const {return ll;} ;
00244
00246 const Vector& get_ss() const {return ss;} ;
00247
00249 const Vector& get_ephi() const {return ephi;};
00250
00252 const Sym_tensor& get_jj() const {return jj;} ;
00253
00255 const Scalar& get_fff() const {return fff;} ;
00256
00258 const Scalar& get_ggg() const {return ggg;} ;
00259
00261 bool get_issphere() const{return issphere;};
00262
00264 Scalar& set_hsurf() {del_deriv() ; return h_surf ; } ;
00265
00267 Metric& set_qab() {del_deriv() ; return qab ; } ;
00268
00270 Scalar& set_ricci() {del_deriv() ; return ricci ; } ;
00271
00273 Sym_tensor& set_qq() {del_deriv() ; return qq ; } ;
00274
00276 Tensor& set_proj() {del_deriv() ; return proj ; } ;
00277
00279 Sym_tensor& set_hh() {del_deriv() ; return hh ; } ;
00280
00282 Scalar& set_trk() {del_deriv() ; return trk; } ;
00283
00285 Vector& set_ll() {del_deriv() ; return ll;} ;
00286
00288 Vector& set_ss() {del_deriv() ; return ss;} ;
00289
00291 Sym_tensor& set_jj() {del_deriv() ; return jj;} ;
00292
00294 Scalar& set_fff() {del_deriv() ; return fff;} ;
00295
00297 Scalar& set_ggg() {del_deriv() ; return ggg;} ;
00298
00300 bool set_issphere() {del_deriv() ; return issphere; };
00301
00303 void update_from_tslice(const Metric& gamij, const Sym_tensor& Kij) ;
00304
00305
00306
00307 public:
00308
00310
00311
00313 const Scalar& sqrt_q() const ;
00314
00319 double area() const ;
00320
00328 double angu_mom() const ;
00329
00336 double mass() const;
00337
00343 double multipole_mass(const int order) const;
00344
00345
00351 double multipole_angu(const int order) const;
00352
00353
00354
00356 double epsilon_A_minus_one() const;
00357
00361 double epsilon_P_minus_one() const;
00362
00364 const Scalar& theta_plus() const ;
00365
00367 const Scalar& theta_minus() const ;
00368
00370 const Sym_tensor& shear () const ;
00371
00373
00374 Tensor derive_cov2dflat(const Tensor& uu) const ;
00375
00377
00378 const Tensor& delta() const;
00379
00381
00382 Tensor derive_cov2d(const Tensor& uu) const ;
00383
00384
00385
00386 public:
00387 virtual void sauve(FILE *) const ;
00388
00390 friend ostream& operator<<(ostream& , const Spheroid& ) ;
00391
00392 };
00393
00394 ostream& operator<<(ostream& , const Spheroid& ) ;
00395
00396
00397
00398
00399
00404 class App_hor : public Spheroid {
00405
00406
00407
00408 public:
00409 App_hor(const Mg3d& grid_angu, double radius) ;
00410
00418 App_hor(const Scalar& h_in, const Metric& gamij, const Sym_tensor& Kij) ;
00419 App_hor(const App_hor& ) ;
00420
00422 App_hor(FILE* ) ;
00423
00424 virtual ~App_hor() ;
00425
00426
00427
00428 public:
00430 void operator=(const App_hor&) ;
00431
00432 bool check_expansion(double thres = 1.e-7) const ;
00433
00435 const Sym_tensor& lie_derive_shear(const Scalar& bb, const Scalar& lapse) ;
00436
00440 const Sym_tensor& lie_derive_theta_plus(const Scalar& bb, const Scalar& lapse);
00441
00445 const Sym_tensor& lie_derive_theta_minus(const Scalar& bb, const Scalar& lapse);
00446
00448 const Sym_tensor& lie_derive_q_ab(const Scalar& bb, const Scalar& lapse) ;
00449
00453 const Scalar& l_non_affinity(const Scalar& bb, const Scalar& lapse) ;
00454
00455 } ;
00456
00457
00458 #endif