et_bin_upmetr.C

00001 /*
00002  * Methods Etoile_bin::update_metric
00003  *
00004  * (see file etoile.h for documentation)
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2000-2001 Eric Gourgoulhon
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License as published by
00015  *   the Free Software Foundation; either version 2 of the License, or
00016  *   (at your option) any later version.
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 
00030 char et_bin_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr.C,v 1.4 2003/10/24 12:26:38 k_taniguchi Exp $" ;
00031 
00032 /*
00033  * $Id: et_bin_upmetr.C,v 1.4 2003/10/24 12:26:38 k_taniguchi Exp $
00034  * $Log: et_bin_upmetr.C,v $
00035  * Revision 1.4  2003/10/24 12:26:38  k_taniguchi
00036  * Suppress the method of update metric for NS-BH
00037  *
00038  * Revision 1.3  2003/10/24 11:46:07  k_taniguchi
00039  * Change some notations
00040  *
00041  * Revision 1.2  2002/12/19 14:52:42  e_gourgoulhon
00042  * Added the new function
00043  *         void update_metric(const Bhole& comp)
00044  * to treat the case where the companion is a black hole
00045  *
00046  * Revision 1.1.1.1  2001/11/20 15:19:28  e_gourgoulhon
00047  * LORENE
00048  *
00049  * Revision 2.9  2000/09/27  12:49:57  keisuke
00050  * Utilisation de d_logn_auto_div dans le calcul de d_logn_auto dans
00051  * la version avec relaxation.
00052  *
00053  * Revision 2.8  2000/09/22  15:53:06  keisuke
00054  * Calcul de d_logn_auto prenant en compte d_logn_auto_div.
00055  *
00056  * Revision 2.7  2000/03/07  14:55:08  eric
00057  * Ajout de l'appel a extrinsic_curvature.
00058  *
00059  * Revision 2.6  2000/03/07  08:33:24  eric
00060  * Appel de Cmp::import_sym / asym (pour tenir compte de la symetrie /
00061  *  plan y=0).
00062  *
00063  * Revision 2.5  2000/02/12  18:38:11  eric
00064  * Ajout de la version avec relaxation.
00065  * Appel de set_std_base() sur nnn et a_car.
00066  *
00067  * Revision 2.4  2000/02/12  11:42:49  eric
00068  * Appel de Tenseur::set_std_base() sur les Tenseurs importes du
00069  * compagnon.
00070  *
00071  * Revision 2.3  2000/02/10  18:54:41  eric
00072  * Traitement du cas ETATZERO.
00073  *
00074  * Revision 2.2  2000/02/10  16:55:10  eric
00075  * Appel de change_triad sur d_logn_auto et d_beta_auto.
00076  *
00077  * Revision 2.1  2000/02/04  17:14:32  eric
00078  * *** empty log message ***
00079  *
00080  * Revision 2.0  2000/02/04  16:38:00  eric
00081  * *** empty log message ***
00082  *
00083  *
00084  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr.C,v 1.4 2003/10/24 12:26:38 k_taniguchi Exp $
00085  *
00086  */
00087 
00088 // Headers Lorene
00089 #include "etoile.h"
00090 #include "bhole.h"
00091 
00092             //----------------------------------//
00093             //   Version without relaxation //
00094             //----------------------------------//
00095 
00096 void Etoile_bin::update_metric(const Etoile_bin& comp) {
00097 
00098     // Computation of quantities coming from the companion
00099     // ---------------------------------------------------
00100 
00101     if ( (comp.logn_auto).get_etat() == ETATZERO ) {
00102     logn_comp.set_etat_zero() ;
00103     }
00104     else{
00105     logn_comp.set_etat_qcq() ;
00106     (logn_comp.set()).import_symy( comp.logn_auto() ) ;
00107     logn_comp.set_std_base() ;   // set the bases for spectral expansions
00108     }
00109 
00110 
00111     if ( (comp.beta_auto).get_etat() == ETATZERO ) {
00112     beta_comp.set_etat_zero() ;
00113     }
00114     else{
00115     beta_comp.set_etat_qcq() ;
00116     (beta_comp.set()).import_symy( comp.beta_auto() ) ; 
00117     beta_comp.set_std_base() ;   // set the bases for spectral expansions
00118     }
00119 
00120 
00121     if ( (comp.shift_auto).get_etat() == ETATZERO ) {
00122     shift_comp.set_etat_zero() ;
00123     }
00124     else{
00125     shift_comp.set_etat_qcq() ; 
00126 
00127     (shift_comp.set(0)).import_asymy( comp.shift_auto(0) ) ;  // N^x antisym
00128     (shift_comp.set(1)).import_symy( comp.shift_auto(1) ) ;   // N^y sym.
00129     (shift_comp.set(2)).import_asymy( comp.shift_auto(2) ) ;  // N^z anisym
00130 
00131     shift_comp.set_std_base() ;   // set the bases for spectral expansions
00132     }
00133     shift_comp.set_triad( *((comp.shift_auto).get_triad()) ) ;
00134     
00135 
00136 
00137     // Lapse function N
00138     // ----------------
00139 
00140     Tenseur logn_total = logn_auto + logn_comp ; 
00141 
00142     nnn = exp( unsurc2 * logn_total ) ;
00143 
00144     nnn.set_std_base() ;   // set the bases for spectral expansions
00145 
00146     // Conformal factor A^2
00147     // ---------------------
00148     
00149     a_car = exp( 2*unsurc2*( beta_auto + beta_comp - logn_total ) ) ;
00150 
00151     a_car.set_std_base() ;   // set the bases for spectral expansions
00152 
00153     // Shift vector N^i
00154     // ----------------
00155 
00156     shift = shift_auto + shift_comp ;
00157 
00158     // Derivatives of metric coefficients
00159     // ----------------------------------
00160 
00161     // ... (d/dX,d/dY,d/dZ)(logn_auto) :
00162     d_logn_auto_regu = logn_auto_regu.gradient() ;    // (d/dx, d/dy, d/dz)
00163     d_logn_auto_regu.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)
00164 
00165     if ( *(d_logn_auto_div.get_triad()) != ref_triad ) {
00166 
00167     // Change the basis from spherical coordinate to Cartesian one
00168     d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ;
00169 
00170     // Change the basis from mapping coordinate to absolute one
00171     d_logn_auto_div.change_triad( ref_triad ) ;
00172 
00173     }
00174 
00175     d_logn_auto = d_logn_auto_regu + d_logn_auto_div ;
00176 
00177     // ... (d/dX,d/dY,d/dZ)(beta_auto) :
00178     d_beta_auto = beta_auto.gradient() ;    // (d/dx, d/dy, d/dz)
00179     d_beta_auto.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)
00180 
00181     if (relativistic) {
00182     // ... extrinsic curvature (tkij_auto and akcar_auto)
00183     extrinsic_curvature() ;
00184     }
00185 
00186     // The derived quantities are obsolete
00187     // -----------------------------------
00188 
00189     del_deriv() ;
00190 
00191 
00192 }
00193 
00194 
00195 
00196             //----------------------------------//
00197             //    Version with relaxation       //
00198             //----------------------------------//
00199 
00200 void Etoile_bin::update_metric(const Etoile_bin& comp,
00201                    const Etoile_bin& star_jm1, double relax) {
00202 
00203 
00204     // Computation of quantities coming from the companion
00205     // ---------------------------------------------------
00206 
00207     if ( (comp.logn_auto).get_etat() == ETATZERO ) {
00208     logn_comp.set_etat_zero() ;
00209     }
00210     else{
00211     logn_comp.set_etat_qcq() ;
00212     (logn_comp.set()).import_symy( comp.logn_auto() ) ;
00213     logn_comp.set_std_base() ;   // set the bases for spectral expansions
00214     }
00215 
00216 
00217     if ( (comp.beta_auto).get_etat() == ETATZERO ) {
00218     beta_comp.set_etat_zero() ;
00219     }
00220     else{
00221     beta_comp.set_etat_qcq() ;
00222     (beta_comp.set()).import_symy( comp.beta_auto() ) ;
00223     beta_comp.set_std_base() ;   // set the bases for spectral expansions
00224     }
00225 
00226     
00227     if ( (comp.shift_auto).get_etat() == ETATZERO ) {
00228     shift_comp.set_etat_zero() ; 
00229     }
00230     else{  
00231     shift_comp.set_etat_qcq() ; 
00232 
00233     (shift_comp.set(0)).import_asymy( comp.shift_auto(0) ) ;  // N^x antisym
00234     (shift_comp.set(1)).import_symy( comp.shift_auto(1) ) ;   // N^y sym.
00235     (shift_comp.set(2)).import_asymy( comp.shift_auto(2) ) ;  // N^z anisym
00236 
00237     shift_comp.set_std_base() ;   // set the bases for spectral expansions
00238     }
00239     shift_comp.set_triad( *((comp.shift_auto).get_triad()) ) ;  
00240     
00241     // Relaxation on logn_comp, beta_comp, shift_comp
00242     // ----------------------------------------------
00243     double relaxjm1 = 1. - relax ; 
00244     
00245     logn_comp = relax * logn_comp + relaxjm1 * (star_jm1.get_logn_comp()) ; 
00246     
00247     beta_comp = relax * beta_comp + relaxjm1 * (star_jm1.get_beta_comp()) ; 
00248     
00249     shift_comp = relax * shift_comp + relaxjm1 * (star_jm1.get_shift_comp()) ; 
00250         
00251     // Lapse function N
00252     // ----------------
00253     
00254     Tenseur logn_total = logn_auto + logn_comp ; 
00255     
00256     nnn = exp( unsurc2 * logn_total ) ; 
00257     
00258     nnn.set_std_base() ;   // set the bases for spectral expansions
00259     
00260     // Conformal factor A^2
00261     // ---------------------
00262     
00263     a_car = exp( 2*unsurc2*( beta_auto + beta_comp - logn_total ) ) ; 
00264 
00265     a_car.set_std_base() ;   // set the bases for spectral expansions
00266     
00267     // Shift vector N^i
00268     // ----------------
00269     
00270     shift = shift_auto + shift_comp ; 
00271 
00272     // Derivatives of metric coefficients
00273     // ----------------------------------
00274     
00275     // ... (d/dX,d/dY,d/dZ)(logn_auto) : 
00276     d_logn_auto_regu = logn_auto_regu.gradient() ;    // (d/dx, d/dy, d/dz)
00277     d_logn_auto_regu.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)  
00278     
00279     if ( *(d_logn_auto_div.get_triad()) != ref_triad ) {
00280 
00281     // Change the basis from spherical coordinate to Cartesian one
00282     d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ;
00283 
00284     // Change the basis from mapping coordinate to absolute one
00285     d_logn_auto_div.change_triad( ref_triad ) ;
00286 
00287     }
00288 
00289     d_logn_auto = d_logn_auto_regu + d_logn_auto_div ;      
00290     
00291     // ... (d/dX,d/dY,d/dZ)(beta_auto) : 
00292     d_beta_auto = beta_auto.gradient() ;    // (d/dx, d/dy, d/dz)
00293     d_beta_auto.change_triad(ref_triad) ;   // -->  (d/dX, d/dY, d/dZ)        
00294 
00295     // ... extrinsic curvature (tkij_auto and akcar_auto)
00296     extrinsic_curvature() ; 
00297     
00298     // The derived quantities are obsolete
00299     // -----------------------------------
00300     
00301     del_deriv() ;                
00302     
00303                   
00304 } 

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