star_bhns_upmetr_der.C

00001 /*
00002  *  Method of class Star_bhns compute the derivative of metric quantities
00003  *   from the companion black-hole
00004  *
00005  *    (see file star_bhns.h for documentation).
00006  *
00007  */
00008 
00009 /*
00010  *   Copyright (c) 2006-2007 Keisuke Taniguchi
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 star_bhns_upmetr_der_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_upmetr_der.C,v 1.2 2008/05/15 19:18:17 k_taniguchi Exp $" ;
00030 
00031 /*
00032  * $Id: star_bhns_upmetr_der.C,v 1.2 2008/05/15 19:18:17 k_taniguchi Exp $
00033  * $Log: star_bhns_upmetr_der.C,v $
00034  * Revision 1.2  2008/05/15 19:18:17  k_taniguchi
00035  * Change of some parameters.
00036  *
00037  * Revision 1.1  2007/06/22 01:32:55  k_taniguchi
00038  * *** empty log message ***
00039  *
00040  *
00041  * $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_upmetr_der.C,v 1.2 2008/05/15 19:18:17 k_taniguchi Exp $
00042  *
00043  */
00044 
00045 // C++ headers
00046 //#include <>
00047 
00048 // C headers
00049 //#include <>
00050 
00051 // Lorene headers
00052 #include "star_bhns.h"
00053 #include "hole_bhns.h"
00054 #include "utilitaires.h"
00055 
00056 void Star_bhns::update_met_der_comp_bhns(const Hole_bhns& hole) {
00057 
00058     // Computation of d_lapconf_comp
00059     // -----------------------------
00060 
00061     if ( (hole.get_d_lapconf_auto())(1).get_etat() == ETATZERO ) {
00062         assert( (hole.get_d_lapconf_auto())(2).get_etat() == ETATZERO ) ;
00063     assert( (hole.get_d_lapconf_auto())(3).get_etat() == ETATZERO ) ;
00064 
00065     d_lapconf_comp.set_etat_zero() ;
00066     }
00067     else {
00068         d_lapconf_comp.set_etat_qcq() ;
00069     Vector comp_dlapconf( hole.get_d_lapconf_auto() ) ;
00070     comp_dlapconf.dec_dzpuis(2) ; // dzpuis : 2 -> 0 for import
00071 
00072     (d_lapconf_comp.set(1)).import( comp_dlapconf(1) ) ;
00073     (d_lapconf_comp.set(2)).import( comp_dlapconf(2) ) ;
00074     (d_lapconf_comp.set(3)).import( comp_dlapconf(3) ) ;
00075 
00076     d_lapconf_comp.std_spectral_base() ;
00077     d_lapconf_comp.inc_dzpuis(2) ;  // dzpuis : 0 -> 2
00078     }
00079 
00080 
00081     // Computation of d_shift_comp
00082     // ---------------------------
00083 
00084     if ( (hole.get_d_shift_auto())(1,2).get_etat() == ETATZERO ) {
00085         assert( (hole.get_d_shift_auto())(1,1).get_etat() == ETATZERO ) ;
00086     assert( (hole.get_d_shift_auto())(1,3).get_etat() == ETATZERO ) ;
00087 
00088         d_shift_comp.set_etat_zero() ;
00089     }
00090     else {
00091 
00092         d_shift_comp.set_etat_qcq() ;
00093     Tensor comp_dshift( hole.get_d_shift_auto() ) ;
00094     comp_dshift.dec_dzpuis(2) ;  // dzpuis : 2 -> 0 for import
00095 
00096     (d_shift_comp.set(1,1)).import( comp_dshift(1,1) ) ;
00097     (d_shift_comp.set(1,2)).import( comp_dshift(1,2) ) ;
00098     (d_shift_comp.set(1,3)).import( comp_dshift(1,3) ) ;
00099     (d_shift_comp.set(2,1)).import( comp_dshift(2,1) ) ;
00100     (d_shift_comp.set(2,2)).import( comp_dshift(2,2) ) ;
00101     (d_shift_comp.set(2,3)).import( comp_dshift(2,3) ) ;
00102     (d_shift_comp.set(3,1)).import( comp_dshift(3,1) ) ;
00103     (d_shift_comp.set(3,2)).import( comp_dshift(3,2) ) ;
00104     (d_shift_comp.set(3,3)).import( comp_dshift(3,3) ) ;
00105 
00106     d_shift_comp.std_spectral_base() ;
00107     d_shift_comp.inc_dzpuis(2) ;  // dzpuis : 0 -> 2
00108     }
00109 
00110 
00111     // Computation of d_confo_comp
00112     // ---------------------------
00113 
00114     if ( (hole.get_d_confo_auto())(1).get_etat() == ETATZERO ) {
00115         assert( (hole.get_d_confo_auto())(2).get_etat() == ETATZERO ) ;
00116     assert( (hole.get_d_confo_auto())(3).get_etat() == ETATZERO ) ;
00117 
00118         d_confo_comp.set_etat_zero() ;
00119     }
00120     else {
00121         d_confo_comp.set_etat_qcq() ;
00122     Vector comp_dconfo( hole.get_d_confo_auto() ) ;
00123     comp_dconfo.dec_dzpuis(2) ;  // dzpuis : 2 -> 0 for import
00124 
00125     (d_confo_comp.set(1)).import( comp_dconfo(1) ) ;
00126     (d_confo_comp.set(2)).import( comp_dconfo(2) ) ;
00127     (d_confo_comp.set(3)).import( comp_dconfo(3) ) ;
00128 
00129     d_confo_comp.std_spectral_base() ;
00130     d_confo_comp.inc_dzpuis(2) ;  // dzpuis : 0 -> 2
00131     }
00132 
00133 
00134     // The derived quantities are obsolete
00135     // -----------------------------------
00136 
00137     del_deriv() ;
00138 
00139 }

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