bhole_init_kerr.C

00001 /*
00002  *   Copyright (c) 2000-2001 Philippe Grandclement
00003  *
00004  *   This file is part of LORENE.
00005  *
00006  *   LORENE is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   LORENE is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with LORENE; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 
00023 char bhole_init_kerr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bhole/bhole_init_kerr.C,v 1.2 2002/10/16 14:36:32 j_novak Exp $" ;
00024 
00025 /*
00026  * $Id: bhole_init_kerr.C,v 1.2 2002/10/16 14:36:32 j_novak Exp $
00027  * $Log: bhole_init_kerr.C,v $
00028  * Revision 1.2  2002/10/16 14:36:32  j_novak
00029  * Reorganization of #include instructions of standard C++, in order to
00030  * use experimental version 3 of gcc.
00031  *
00032  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00033  * LORENE
00034  *
00035  * Revision 2.1  2000/12/14  10:45:20  phil
00036  * ATTENTION : PASSAGE DE PHI A PSI
00037  *
00038  * Revision 2.0  2000/10/20  09:18:56  phil
00039  * *** empty log message ***
00040  *
00041  *
00042  * $Header: /cvsroot/Lorene/C++/Source/Bhole/bhole_init_kerr.C,v 1.2 2002/10/16 14:36:32 j_novak Exp $
00043  *
00044  */
00045  
00046 //standard
00047 #include <stdlib.h>
00048 #include <math.h>
00049 
00050 // Lorene
00051 #include "tenseur.h"
00052 #include "bhole.h"
00053 
00054 void Bhole::init_kerr (double masse, double moment) {
00055     
00056     // On verifie si le rayon est bien calcule 
00057     assert (rayon == sqrt (masse*masse-moment*moment)/2.) ;
00058     
00059     // Valeur de omega :
00060     omega = moment/2/masse/(masse+sqrt(masse*masse-moment*moment)) ;
00061         
00062     // Calcul de R :
00063     Mtbl grand_r (mp.get_mg()) ;
00064     grand_r = mp.r + (masse*masse-moment*moment)/4/mp.r + masse ;
00065    
00066     // Calcul de sigma :
00067     Mtbl sigma (mp.get_mg()) ;
00068     sigma = moment*moment*mp.cost*mp.cost + grand_r*grand_r ;
00069     
00070     // Calcul de grand_a :
00071     Cmp grand_a (mp) ;
00072     grand_a = 1 + 2*masse/mp.r + 
00073      (3*masse*masse+moment*moment*mp.cost*mp.cost)/2/mp.r/mp.r
00074      + (2*masse*rayon*rayon)/pow(mp.r, 3.) + pow(rayon/mp.r, 4.) ;
00075     grand_a.set_val_inf(1) ;
00076     grand_a.std_base_scal() ;
00077     grand_a.raccord(1) ;
00078    
00079     // Calcul de n_phi :
00080     Cmp n_phi(mp) ;
00081     n_phi = (2*moment*masse*grand_r) / (sigma*(grand_r*grand_r+moment*moment)
00082     + 2*moment*moment*masse*grand_r*mp.sint*mp.sint) ;
00083     n_phi.annule(0) ;
00084     n_phi.set_val_inf (0) ;
00085     n_phi.std_base_scal() ;
00086     
00087     // Calcul de N :
00088     Cmp carre (mp) ;
00089     carre = 1-(2*masse*grand_r)/sigma + (4*moment*moment*masse*masse
00090     *grand_r*grand_r*mp.sint*mp.sint)/
00091     (sigma*sigma*(grand_r*grand_r+moment*moment)+2*moment*moment*sigma*masse*
00092     grand_r*mp.sint*mp.sint) ;
00093     carre.set_val_inf(1) ;
00094     carre.set_val_hor(0, 1) ;
00095     carre.std_base_scal() ;
00096     carre.annule(0) ;
00097     
00098     n_auto.set_etat_qcq() ;
00099     n_auto.set() = sqrt(carre) ;
00100     n_auto.set().set_dzpuis(0) ;
00101     n_auto.set_std_base() ;
00102     n_auto.set().raccord(1) ;
00103     
00104     // Calcul de psi :
00105     psi_auto.set_etat_qcq() ;
00106     psi_auto.set() = pow(grand_a, 0.25) ;
00107     psi_auto.set().set_dzpuis(0) ;
00108     psi_auto.set_std_base() ;
00109     psi_auto.set().raccord(1) ;
00110     
00111     // Calcul du shift :
00112     shift_auto.set_etat_qcq() ;
00113     shift_auto.set_std_base() ;
00114     Valeur auxi (mp.get_mg()) ;
00115     auxi = n_phi.va.mult_st().mult_sp() ;
00116     shift_auto.set(0) = auxi ;
00117     auxi = -n_phi.va.mult_st().mult_cp() ;
00118     shift_auto.set(1) = auxi ;
00119     shift_auto.set(2).set_etat_zero() ;
00120     
00121     shift_auto.inc_dzpuis() ;
00122     
00123     for (int i=0 ; i<2 ; i++) {
00124     shift_auto.set(i).mult_r() ;
00125     shift_auto.set(i).raccord(1) ;
00126     assert (shift_auto(i).check_dzpuis (0)) ;
00127     }
00128 }

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