00001 /* 00002 * Method of class Star_bin to compute the extrinsic curvature tensor 00003 * 00004 */ 00005 00006 /* 00007 * Copyright (c) 2004 Francois Limousin 00008 * 00009 * This file is part of LORENE. 00010 * 00011 * LORENE is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. 00015 * 00016 * LORENE is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with LORENE; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 * 00025 */ 00026 00027 00028 char star_bin_extr_curv_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/star_bin_extr_curv.C,v 1.8 2005/09/13 19:38:31 f_limousin Exp $" ; 00029 00030 /* 00031 * $Id: star_bin_extr_curv.C,v 1.8 2005/09/13 19:38:31 f_limousin Exp $ 00032 * $Log: star_bin_extr_curv.C,v $ 00033 * Revision 1.8 2005/09/13 19:38:31 f_limousin 00034 * Reintroduction of the resolution of the equations in cartesian coordinates. 00035 * 00036 * Revision 1.7 2005/02/24 16:04:44 f_limousin 00037 * Change the name of some variables (for instance dcov_logn --> dlogn). 00038 * 00039 * Revision 1.6 2005/02/17 17:33:38 f_limousin 00040 * Change the name of some quantities to be consistent with other classes 00041 * (for instance nnn is changed to nn, shift to beta, beta to lnq...) 00042 * 00043 * Revision 1.5 2004/05/25 14:19:01 f_limousin 00044 * Correction of an error : kcar_comp was computed instead 00045 * ok kcar_auto. 00046 * 00047 * Revision 1.4 2004/03/23 09:57:57 f_limousin 00048 * We now make the derivation with respect to the metric tilde 00049 * instead of the flat metric for the computation of dshift. 00050 * 00051 * Revision 1.3 2004/02/27 09:52:41 f_limousin 00052 * Correction of an error on the computation of kcar_auto. 00053 * 00054 * Revision 1.2 2004/01/20 15:18:00 f_limousin 00055 * First version 00056 * 00057 * 00058 * $Header: /cvsroot/Lorene/C++/Source/Star/star_bin_extr_curv.C,v 1.8 2005/09/13 19:38:31 f_limousin Exp $ 00059 * 00060 */ 00061 00062 // C headers 00063 #include <math.h> 00064 00065 // Headers Lorene 00066 #include "star.h" 00067 00068 void Star_bin::extrinsic_curvature(double om){ 00069 00070 // Construction of Omega d/dphi 00071 // ---------------------------- 00072 00073 const Mg3d* mg = mp.get_mg() ; 00074 int nz = mg->get_nzone() ; // total number of domains 00075 Vector omdsdp (mp, CON, mp.get_bvect_cart()) ; 00076 Scalar yya (mp) ; 00077 yya = mp.ya ; 00078 Scalar xxa (mp) ; 00079 xxa = mp.xa ; 00080 00081 if (fabs(mp.get_rot_phi()) < 1e-10){ 00082 omdsdp.set(1) = - om * yya ; 00083 omdsdp.set(2) = om * xxa ; 00084 omdsdp.set(3).annule_hard() ; 00085 } 00086 else{ 00087 omdsdp.set(1) = om * yya ; 00088 omdsdp.set(2) = - om * xxa ; 00089 omdsdp.set(3).annule_hard() ; 00090 } 00091 00092 omdsdp.set(1).set_spectral_va() 00093 .set_base(*(mp.get_mg()->std_base_vect_cart()[0])) ; 00094 omdsdp.set(2).set_spectral_va() 00095 .set_base(*(mp.get_mg()->std_base_vect_cart()[1])) ; 00096 omdsdp.set(3).set_spectral_va() 00097 .set_base(*(mp.get_mg()->std_base_vect_cart()[2])) ; 00098 00099 omdsdp.annule_domain(nz-1) ; 00100 00101 00102 // Gradient tilde (with respect to the cartesian coordinates 00103 // of the mapping) 00104 // D~_j beta^i 00105 00106 const Tensor& dbeta = beta_auto.derive_con(gtilde) ; 00107 00108 // Trace of D~_j beta^i : 00109 Scalar div_beta = beta_auto.divergence(gtilde) ; 00110 00111 // Computation of K^{ij} 00112 // See Eq (49) from Gourgoulhon et al. (2001) 00113 // ------------------------------------------ 00114 00115 for (int i=1; i<=3; i++) 00116 for (int j=1; j<=i; j++) { 00117 tkij_auto.set(i, j) = dbeta(i, j) + dbeta(j, i) - 00118 double(2) /double(3) * div_beta * (gtilde.con())(i,j) ; 00119 } 00120 00121 00122 // Addition (or not !) of u^{ij} 00123 tkij_auto = tkij_auto - 0*hij_auto.derive_lie(omdsdp) ; 00124 00125 tkij_auto = 0.5 * tkij_auto / nn ; 00126 00127 // Computation of K_{ij} K^{ij} 00128 // ---------------------------- 00129 00130 Sym_tensor tkij_auto_cov = tkij_auto.up_down(gtilde) ; 00131 00132 kcar_auto = contract(tkij_auto_cov, 0, 1, tkij_auto, 0, 1,true) ; 00133 00134 // The derived quantities are obsolete 00135 // ----------------------------------- 00136 00137 del_deriv() ; 00138 }
1.4.6