00001 /* 00002 * Methods of class Iso_hor to compute sources for Psi, N y beta 00003 * 00004 * (see file hor_isol.h for documentation). 00005 * 00006 */ 00007 00008 /* 00009 * Copyright (c) 2004-2005 Jose Luis Jaramillo 00010 * Francois Limousin 00011 * 00012 * This file is part of LORENE. 00013 * 00014 * LORENE is free software; you can redistribute it and/or modify 00015 * it under the terms of the GNU General Public License version 2 00016 * as published by the Free Software Foundation. 00017 * 00018 * LORENE is distributed in the hope that it will be useful, 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 * GNU General Public License for more details. 00022 * 00023 * You should have received a copy of the GNU General Public License 00024 * along with LORENE; if not, write to the Free Software 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 * 00027 */ 00028 00029 char source_hor_C[] = "$Header: /cvsroot/Lorene/C++/Source/Isol_hor/sources_hor.C,v 1.14 2005/06/09 08:05:32 f_limousin Exp $" ; 00030 00031 /* 00032 * $Id: sources_hor.C,v 1.14 2005/06/09 08:05:32 f_limousin Exp $ 00033 * $Log: sources_hor.C,v $ 00034 * Revision 1.14 2005/06/09 08:05:32 f_limousin 00035 * Implement a new function sol_elliptic_boundary() and 00036 * Vector::poisson_boundary(...) which solve the vectorial poisson 00037 * equation (method 6) with an inner boundary condition. 00038 * 00039 * Revision 1.13 2005/04/02 15:49:21 f_limousin 00040 * New choice (Lichnerowicz) for aaquad. New member data nz. 00041 * 00042 * Revision 1.12 2005/03/28 19:42:39 f_limousin 00043 * Implement the metric and A^{ij}A_{ij} of Sergio for pertubations 00044 * of Kerr black holes. 00045 * 00046 * Revision 1.11 2005/03/22 13:25:36 f_limousin 00047 * Small changes. The angular velocity and A^{ij} are computed 00048 * with a differnet sign. 00049 * 00050 * Revision 1.10 2005/03/03 10:11:57 f_limousin 00051 * The function source_psi(), source_nn() and source_beta() are 00052 * now const and return an object const. 00053 * 00054 * Revision 1.9 2005/02/07 10:37:21 f_limousin 00055 * Minor changes. 00056 * 00057 * Revision 1.8 2004/12/31 15:35:18 f_limousin 00058 * Modifications to avoid warnings. 00059 * 00060 * Revision 1.7 2004/12/22 18:16:43 f_limousin 00061 * Many different changes. 00062 * 00063 * Revision 1.6 2004/11/05 10:59:07 f_limousin 00064 * Delete ener_dens, mom_dens and trace stress in functions 00065 * source_nn, source_psi and source_beta. 00066 * And some modification to avoid warnings (source_nn change to source...). 00067 * 00068 * Revision 1.5 2004/11/03 17:16:44 f_limousin 00069 * Delete argument trk_point for source_nn() 00070 * 00071 * Revision 1.4 2004/10/29 15:45:08 jl_jaramillo 00072 * Change name of functions 00073 * 00074 * Revision 1.3 2004/09/28 16:08:26 f_limousin 00075 * Minor modifs. 00076 * 00077 * Revision 1.2 2004/09/09 16:55:08 f_limousin 00078 * Add the 2 lines $Id: sources_hor.C,v 1.14 2005/06/09 08:05:32 f_limousin Exp $Log: for CVS 00079 * 00080 * 00081 * $Header: /cvsroot/Lorene/C++/Source/Isol_hor/sources_hor.C,v 1.14 2005/06/09 08:05:32 f_limousin Exp $ 00082 * 00083 */ 00084 00085 // C++ headers 00086 #include "headcpp.h" 00087 00088 // C headers 00089 #include <stdlib.h> 00090 #include <assert.h> 00091 00092 // Lorene headers 00093 #include "time_slice.h" 00094 #include "isol_hor.h" 00095 #include "metric.h" 00096 #include "evolution.h" 00097 #include "unites.h" 00098 #include "graphique.h" 00099 #include "utilitaires.h" 00100 00101 const Scalar Isol_hor::source_psi() const{ 00102 00103 using namespace Unites ; 00104 00105 // Initialisations 00106 // --------------- 00107 00108 const Base_vect& triad = *(ff.get_triad()) ; 00109 00110 Scalar tmp(mp) ; 00111 Scalar tmp_scal(mp) ; 00112 Sym_tensor tmp_sym(mp, CON, triad) ; 00113 00114 Scalar source(mp) ; 00115 00116 //=============================================== 00117 // Computations of the source for Psi 00118 //=============================================== 00119 00120 const Vector& d_psi = psi().derive_cov(ff) ; // D_i Psi 00121 00122 // Source for Psi 00123 // -------------- 00124 tmp = 0.125* psi() * met_gamt.ricci_scal() 00125 - contract(hh(), 0, 1, d_psi.derive_cov(ff), 0, 1 ) ; 00126 tmp.inc_dzpuis() ; // dzpuis : 3 -> 4 00127 00128 tmp -= contract(hdirac(), 0, d_psi, 0) ; 00129 00130 source = tmp - 0.125* aa_quad() / psi4() / psi()/ psi()/ psi() 00131 + psi()*psi4() * 8.33333333333333e-2* trK*trK ; //## 00132 source.annule_domain(0) ; 00133 00134 return source ; 00135 } 00136 00137 00138 const Scalar Isol_hor::source_nn() const{ 00139 00140 using namespace Unites ; 00141 00142 // Initialisations 00143 // --------------- 00144 00145 const Base_vect& triad = *(ff.get_triad()) ; 00146 00147 Scalar tmp(mp) ; 00148 Scalar tmp_scal(mp) ; 00149 Sym_tensor tmp_sym(mp, CON, triad) ; 00150 00151 Scalar source(mp) ; 00152 00153 //=============================================== 00154 // Computations of the source for NN 00155 //=============================================== 00156 00157 const Vector& dln_psi = ln_psi().derive_cov(ff) ; // D_i ln(Psi) 00158 const Vector& dnnn = nn().derive_cov(ff) ; // D_i N 00159 00160 // Source for N 00161 // ------------ 00162 00163 source = aa_quad() / psi4() / psi4() * nn() + 00164 psi4()*( nn()* 0.3333333333333333* trK*trK - trK_point ) 00165 - 2.* contract(dln_psi, 0, nn().derive_con(met_gamt), 0) 00166 - contract(hdirac(), 0, dnnn, 0) ; 00167 00168 tmp = psi4()* contract(beta(), 0, trK.derive_cov(ff), 0) 00169 - contract( hh(), 0, 1, dnnn.derive_cov(ff), 0, 1 ) ; 00170 00171 tmp.inc_dzpuis() ; // dzpuis: 3 -> 4 00172 00173 source += tmp ; 00174 00175 source.annule_domain(0) ; 00176 00177 return source ; 00178 00179 } 00180 00181 00182 00183 const Vector Isol_hor::source_beta() const { 00184 00185 using namespace Unites ; 00186 00187 // Initialisations 00188 // --------------- 00189 00190 const Base_vect& triad = *(ff.get_triad()) ; 00191 00192 Scalar tmp(mp) ; 00193 Scalar tmp_scal(mp) ; 00194 Sym_tensor tmp_sym(mp, CON, triad) ; 00195 Vector tmp_vect(mp, CON, triad) ; 00196 00197 Vector source(mp, CON, triad) ; 00198 00199 //=============================================== 00200 // Computations of the source for beta 00201 //=============================================== 00202 00203 const Vector& dln_psi = ln_psi().derive_cov(ff) ; // D_i ln(Psi) 00204 const Vector& dnnn = nn().derive_cov(ff) ; // D_i N 00205 00206 // Source for beta (dzpuis = 4) 00207 // ---------------------------- 00208 00209 source = 2.* contract(aa(), 1, 00210 dnnn - 6.*nn() * dln_psi, 0) ; 00211 00212 tmp_vect = 0.66666666666666666* trK.derive_con(met_gamt) ; 00213 tmp_vect.inc_dzpuis() ; 00214 00215 source += 2.* nn() * ( tmp_vect 00216 - contract(met_gamt.connect().get_delta(), 1, 2, 00217 aa(), 0, 1) ) ; 00218 00219 Vector vtmp = contract(hh(), 0, 1, 00220 beta().derive_cov(ff).derive_cov(ff), 1, 2) 00221 + 0.3333333333333333* 00222 contract(hh(), 1, beta().divergence(ff).derive_cov(ff), 0) 00223 - hdirac().derive_lie(beta()) 00224 + gamt_point.divergence(ff) ; // zero in the Dirac gauge 00225 vtmp.inc_dzpuis() ; // dzpuis: 3 -> 4 00226 00227 source -= vtmp ; 00228 00229 source += 0.66666666666666666* beta().divergence(ff) * hdirac() ; 00230 00231 source.annule_domain(0) ; 00232 00233 /* 00234 // Source for beta (dzpuis = 3) 00235 // ---------------------------- 00236 00237 source = 2.* contract(aa(), 1, 00238 dnnn - 6.*nn() * dln_psi, 0) ; 00239 source.dec_dzpuis() ; 00240 00241 tmp_vect = 0.66666666666666666* trK.derive_con(met_gamt) ; 00242 Vector tmp_vect2 (- contract(met_gamt.connect().get_delta(), 1, 2, 00243 aa(), 0, 1)) ; 00244 tmp_vect2.dec_dzpuis() ; 00245 00246 source += 2.* nn() * ( tmp_vect + tmp_vect2 ) ; 00247 00248 Vector vtmp = contract(hh(), 0, 1, 00249 beta().derive_cov(ff).derive_cov(ff), 1, 2) 00250 + 0.3333333333333333* 00251 contract(hh(), 1, beta().divergence(ff).derive_cov(ff), 0) 00252 - hdirac().derive_lie(beta()) 00253 + gamt_point.divergence(ff) ; // zero in the Dirac gauge 00254 00255 source -= vtmp ; 00256 00257 tmp_vect = 0.66666666666666666* beta().divergence(ff) * hdirac() ; 00258 tmp_vect.dec_dzpuis() ; 00259 source += tmp_vect ; 00260 00261 source.annule_domain(0) ; 00262 */ 00263 00264 return source ; 00265 00266 } 00267 00268 00269 00270 00271 00272 00273 00274
1.4.6