secmembre_hij_stat.C

00001 
00002 // Header Lorene:
00003 #include "nbr_spx.h"
00004 #include "utilitaires.h"
00005 #include "graphique.h"
00006 #include "math.h"
00007 #include "metric.h"
00008 #include "param.h"
00009 #include "param_elliptic.h"
00010 #include "tensor.h"
00011 #include "unites.h"
00012 #include "isol_hole.h"
00013 
00014 //Computes the rhs of hyperbolic equation for conformal metric assuming statioarity; WARNING; up to now, we are only able to handle void spacetimes.
00015 
00016 
00017 void Isol_hole::secmembre_kerr(Sym_tensor& source_hh){ 
00018 
00019   // Getting: hij; hatA; lapse; conf_fact; shift;
00020   // hij; aa; nn; ppsi; bb;
00021 
00022 
00023   using namespace Unites;
00024 
00025   const int nz = (*(hij.get_mp().get_mg())).get_nzone(); 
00026  
00027 
00028   const Vector& beta = shift;
00029   const Sym_tensor& hh  = hij;
00030 
00031  
00032   const Scalar& psi4 = conf_fact*conf_fact*conf_fact*conf_fact;
00033   Scalar ln_psi = log(conf_fact); ln_psi.std_spectral_base();
00034  
00035   const Scalar qq = lapse*conf_fact*conf_fact; 
00036    
00037 
00038   Sym_tensor aa = hatA/(psi4*sqrt(psi4));
00039   aa.std_spectral_base(); //(check...)
00040  
00041   
00042   const Metric_flat& ff = (hij.get_mp()).flat_met_spher() ;
00043    
00044   const Sym_tensor& tgam_uu = ff.con() + hh;
00045    
00046   const Metric tgam(tgam_uu);
00047     
00048   const Base_vect_spher& otriad = hij.get_mp().get_bvect_spher();
00049 
00050   // On met a zero les quantités supposees etre de "matiere"
00051 
00052   Sym_tensor strain_tens = hij; 
00053   for (int ii=1; ii<=3; ii++)
00054     for(int jj=1; jj<=3; jj++)
00055       { strain_tens.set(ii,jj).annule_hard();
00056       }
00057   strain_tens.std_spectral_base();
00058    
00059   //     On met a zero les quantités derivee temporelle
00060 
00061   Vector beta_point = shift;
00062  
00063   for (int ii=1; ii<=3; ii++)
00064    
00065     { beta_point.set(ii).annule_hard();
00066     }
00067   beta_point.annule_domain(nz-1) ; // Pour faire passer un assert, je ne comprends pas pourquoi...  
00068 
00069   
00070   
00071   beta_point.std_spectral_base();
00072   Scalar lapse_point(hij.get_mp());
00073   lapse_point.annule_hard();
00074   lapse_point.annule_domain(nz -1);
00075  
00076   lapse_point.std_spectral_base(); 
00077    
00078   Sym_tensor hh_point = hij; 
00079   for (int ii=1; ii<=3; ii++)
00080     for(int jj=1; jj<=3; jj++)
00081       { hh_point.set(ii,jj).annule_hard();
00082       }
00083   hh_point.annule_domain(nz-1); 
00084   hh_point.std_spectral_base();  
00085 
00086 
00087   // Note: Il sera probablement nécessaire de ne pas mettre a zero hh point;
00088    
00089 
00090   //Sym_tensor Rrij(map, CON, map.get_bvect_spher());
00091 
00092 
00093   // Rrij = 0.5*[ contract (( h_iju, 0,  h_iju.derive_cov(mets).derive_cov(mets), 3), 0,3) - contract((contract(h_iju.derive_cov(mets),1, h_iju.derive_cov(mets),2)), 1,3)] ;
00094                    
00095   //==================================
00096   // Source for hij
00097   //==================================
00098         
00099   const Sym_tensor& tgam_dd = tgam.cov() ;    // {\tilde \gamma}_{ij}
00100   //  const Sym_tensor& tgam_uu = tgam().con() ;    // {\tilde \gamma}^{ij}
00101   const Tensor_sym& dtgam = tgam_dd.derive_cov(ff) ;// D_k {\tilde \gamma}_{ij} // ff etant la métrique plate
00102   const Tensor_sym& dhh = hh.derive_cov(ff) ; // D_k h^{ij}
00103   const Vector& dln_psi = ln_psi.derive_cov(ff) ; // D_i ln(Psi)
00104   const Vector& tdln_psi_u = ln_psi.derive_con(tgam) ; // tD^i ln(Psi)
00105   const Vector& tdnn_u = lapse.derive_con(tgam) ;       // tD^i N
00106   const Vector& dqq = qq.derive_cov(ff) ;         // D_i Q
00107   const Scalar& div_beta = beta.divergence(ff) ;  // D_k beta^k
00108 
00109   Scalar tmp(hij.get_mp()) ;
00110   Sym_tensor sym_tmp(hij.get_mp(), CON, otriad) ; 
00111 
00112   // Quadratic part of the Ricci tensor of gam_tilde 
00113   // ------------------------------------------------
00114         
00115   Sym_tensor ricci_star(hij.get_mp(), CON, otriad) ; 
00116         
00117   ricci_star = contract(hh, 0, 1, dhh.derive_cov(ff), 2, 3) ; 
00118 
00119   ricci_star.inc_dzpuis() ;   // dzpuis : 3 --> 4
00120 
00121   // des_profile (ricci_star(1,1), 1, 8, 1,1, "riccistar");  // A enlever
00122 
00123   for (int i=1; i<=3; i++) {
00124     for (int j=1; j<=i; j++) {
00125       tmp = 0 ; 
00126       for (int k=1; k<=3; k++) {
00127     for (int l=1; l<=3; l++) {
00128       tmp += dhh(i,k,l) * dhh(j,l,k) ; 
00129     }
00130       }
00131       sym_tmp.set(i,j) = tmp ; 
00132     }
00133   }
00134   ricci_star -= sym_tmp ;
00135   for (int i=1; i<=3; i++) {
00136     for (int j=1; j<=i; j++) {
00137       tmp = 0 ; 
00138       for (int k=1; k<=3; k++) {
00139     for (int l=1; l<=3; l++) {
00140       for (int m=1; m<=3; m++) {
00141         for (int n=1; n<=3; n++) {
00142           
00143           tmp += 0.5 * tgam_uu(i,k)* tgam_uu(j,l) 
00144         * dhh(m,n,k) * dtgam(m,n,l)
00145         + tgam_dd(n,l) * dhh(m,n,k) 
00146         * (tgam_uu(i,k) * dhh(j,l,m) + tgam_uu(j,k) *  dhh(i,l,m) )
00147         - tgam_dd(k,l) *tgam_uu(m,n) * dhh(i,k,m) * dhh(j,l,n) ;
00148         }
00149       } 
00150     }
00151       }
00152       sym_tmp.set(i,j) = tmp ; 
00153     }
00154   }
00155   ricci_star += sym_tmp ;
00156 
00157   ricci_star = 0.5 * ricci_star ; 
00158         
00159   // Curvature scalar of conformal metric :
00160   // -------------------------------------
00161         
00162   Scalar tricci_scal = 
00163     0.25 * contract(tgam_uu, 0, 1,
00164             contract(dhh, 0, 1, dtgam, 0, 1), 0, 1 ) 
00165     - 0.5  * contract(tgam_uu, 0, 1,
00166               contract(dhh, 0, 1, dtgam, 0, 2), 0, 1 ) ;  
00167                                                        
00168   // Full quadratic part of source for h : S^{ij}
00169   // --------------------------------------------
00170         
00171   Sym_tensor ss(hij.get_mp(), CON, otriad) ;  // Source secondaire 
00172         
00173   sym_tmp = lapse * (ricci_star + 8.* tdln_psi_u * tdln_psi_u)
00174     + 4.*( tdln_psi_u * tdnn_u + tdnn_u * tdln_psi_u ) 
00175     - 0.3333333333333333 * 
00176     ( lapse * (tricci_scal  + 8.* contract(dln_psi, 0, tdln_psi_u, 0) )
00177       + 8.* contract(dln_psi, 0, tdnn_u, 0) ) *tgam_uu ;
00178 
00179   ss = sym_tmp / psi4  ;
00180         
00181   sym_tmp = contract(tgam_uu, 1, 
00182              contract(tgam_uu, 1, dqq.derive_cov(ff), 0), 1) ;
00183                             
00184   sym_tmp.inc_dzpuis() ; // dzpuis : 3 --> 4
00185   //  des_profile (sym_tmp(1,1), 1, 8, 1,1, "sym_tmp");  // A enlever
00186   
00187 
00188   for (int i=1; i<=3; i++) {
00189     for (int j=1; j<=i; j++) {
00190       tmp = 0 ; 
00191       for (int k=1; k<=3; k++) {
00192     for (int l=1; l<=3; l++) {
00193       tmp += ( hh(i,k)*dhh(l,j,k) + hh(k,j)*dhh(i,l,k)
00194            - hh(k,l)*dhh(i,j,k) ) * dqq(l) ; 
00195     }
00196       }
00197       sym_tmp.set(i,j) += 0.5 * tmp ; 
00198     }
00199   }
00200         
00201   tmp = qq.derive_con(tgam).divergence(tgam) ; 
00202   tmp.inc_dzpuis() ; // dzpuis : 3 --> 4  // reverifier pourquoi
00203         
00204   //  des_profile (tmp, 1, 8, 1,1, "tmp");  // A enlever
00205 
00206   sym_tmp -= 0.3333333333333333 * tmp *tgam_uu ; 
00207                     
00208   ss -= sym_tmp / (psi4*conf_fact*conf_fact) ;  // Voir dans quel sens sont construits psi et psi4 (eviter les multiplications d'erreurs)
00209 
00210   for (int i=1; i<=3; i++) {
00211     for (int j=1; j<=i; j++) {
00212       tmp = 0 ; 
00213       for (int k=1; k<=3; k++) {
00214     for (int l=1; l<=3; l++) {
00215       tmp += tgam_dd(k,l) * aa(i,k) * aa(j,l) ; 
00216     }
00217       }
00218       sym_tmp.set(i,j) = tmp ; 
00219     }
00220   }
00221         
00222   tmp = psi4 * strain_tens.trace(tgam) ; // S = S_i^i  
00223 
00224   ss += (2.*lapse) * ( sym_tmp);// - qpig*( psi4* strain_tens 
00225   //    - 0.3333333333333333 * tmp * tgam_uu );
00226   Sym_tensor ss2 =2.*lapse*( qpig*(psi4*strain_tens - 0.33333333333333 * tmp * tgam_uu));
00227   ss2.inc_dzpuis(4); // A retirer!
00228  
00229   //  des_profile (ss2(1,1), 1, 8, 1,1, "ss2");  // A enlever
00230 
00231   // cout << zone << endl; 
00232 
00233   //  ss2.annule_domain(nz-1); 
00234 
00235   ss += -ss2; // ATTENTION!!!! A RETABLIR!!!!
00236 
00237   // maxabs(ss, "ss tot") ; 
00238   
00239   // Source for h^{ij} 
00240   // -----------------
00241                  
00242   Sym_tensor lbh = hh.derive_lie(beta) ; 
00243 
00244   source_hh =// (lapse*lapse/psi4 - 1.) 
00245     // * hh.derive_con(ff).divergence(ff) 
00246     + 2.* hh_point.derive_lie(beta); // - lbh.derive_lie(beta) ; // La double derivée de
00247   // Lie en Beta est retirée (prise en charge dans tensorelliptic.C)
00248 
00249   source_hh.inc_dzpuis() ; 
00250         
00251   //  des_profile (source_hh(1,1), 1, 8, 1,1, "sourcehh");  // A enlever
00252 
00253   source_hh += 2.* lapse * ss ;
00254               
00255   //## Provisory: waiting for the Lie derivative to allow
00256   //  derivation with respect to a vector with dzpuis != 0
00257   Vector vtmp = beta_point ; 
00258   // vtmp.dec_dzpuis(2) ;  // A remettre si jamais beta point est non nul;
00259 
00260   sym_tmp = hh.derive_lie(vtmp) ; 
00261   sym_tmp.inc_dzpuis(2) ;             
00262 
00263   //  des_profile (sym_tmp(1,1), 1, 8, 1,1, "sym_tmp");  // A enlever
00264 
00265   source_hh += sym_tmp 
00266     + 1.3333333333333333 * div_beta* (hh_point - lbh)
00267     + 2. * (lapse_point - lapse.derive_lie(beta)) * aa  ;
00268               
00269 
00270   for (int i=1; i<=3; i++) {
00271     for (int j=1; j<=i; j++) {
00272       tmp = 0. ; 
00273       for (int k=1; k<=3; k++) {
00274     tmp += ( hh.derive_con(ff)(k,j,i) 
00275          + hh.derive_con(ff)(i,k,j) 
00276          - hh.derive_con(ff)(i,j,k) ) * dqq(k) ;
00277       }
00278       sym_tmp.set(i,j) = tmp ; 
00279     }
00280   }
00281             
00282   source_hh -= lapse / (psi4*conf_fact*conf_fact) * sym_tmp ; 
00283          
00284   tmp =  beta_point.divergence(ff) - div_beta.derive_lie(beta) ; 
00285   tmp.inc_dzpuis() ; 
00286 
00287   //  des_profile (tmp, 1, 8, 1,1, "tmp");  // A enlever
00288 
00289   source_hh += 0.6666666666666666* 
00290     ( tmp - 0.6666666666666666* div_beta * div_beta ) * hh ; 
00291                
00292         
00293   // Term (d/dt - Lie_beta) (L beta)^{ij}--> sym_tmp        
00294   // ---------------------------------------
00295   Sym_tensor l_beta = beta.ope_killing_conf(ff) ; // Attention aux headers a inclure
00296 
00297   sym_tmp = beta_point.ope_killing_conf(ff) - l_beta.derive_lie(beta) ;
00298   
00299   sym_tmp.inc_dzpuis() ; 
00300   
00301   // Final source:
00302   // ------------
00303   source_hh += 0.6666666666666666* div_beta * l_beta - sym_tmp ; 
00304 
00305   // Invert it (because the right source is for a Laplace operator, not a Dalembertain operator as it is initially:
00306 
00307   source_hh = -source_hh;
00308  
00309    
00310   // Annulation de la source
00311 //   for (int ii=1; ii<=3; ii++)
00312 //     for (int jj=1; jj<=3; jj++){
00313 //       source_hh.set(ii,jj).annule_hard();
00314 //     }
00315 //   source_hh.std_spectral_base();
00316  
00317   return; 
00318                            
00319 }          
00320 
00321 
00322 

Generated on Tue Feb 7 01:35:19 2012 for LORENE by  doxygen 1.4.6