/* Computes the Kerr metric in Dirac gauge. * */ /* * Copyright (c) 2004 Francois Limousin * * This file is part of LORENE. * * LORENE is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * LORENE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with LORENE; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ char kerr_C[] = "$Header: /cvsroot/Lorene/Codes/Kerr/kerr.C,v 1.6 2014/10/13 08:53:57 j_novak Exp $" ; /* * $Id: kerr.C,v 1.6 2014/10/13 08:53:57 j_novak Exp $ * $Log: kerr.C,v $ * Revision 1.6 2014/10/13 08:53:57 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.5 2014/10/06 15:09:45 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.4 2006/01/24 16:01:33 f_limousin * Version ok for lambda = 0 and lambda = 1/3 * * Revision 1.3 2005/11/10 16:35:30 f_limousin * Improve the convergence and the accuracy of the solution * * Revision 1.2 2005/11/08 14:18:57 f_limousin * First version * * * $Header: /cvsroot/Lorene/Codes/Kerr/kerr.C,v 1.6 2014/10/13 08:53:57 j_novak Exp $ * */ // headers C++ #include "headcpp.h" // headers C #include #include // headers Lorene #include "tenseur.h" #include "tensor.h" #include "graphique.h" #include "nbr_spx.h" #include "metric.h" #include "proto.h" #include "utilitaires.h" using namespace Lorene ; int main(){ //------------------------------------------------------------------ // Parameters of the computation //------------------------------------------------------------------ int nt, np, nz, nr1, nrp1 ; double aa, hh, mm ; ifstream fpar("parkerr.d") ; fpar.ignore(1000, '\n') ; fpar.ignore(1000, '\n') ; fpar >> nz; fpar.ignore(1000, '\n'); fpar >> nt; fpar.ignore(1000, '\n'); fpar >> np; fpar.ignore(1000, '\n'); fpar >> nr1; fpar.ignore(1000, '\n'); fpar >> nrp1; fpar.ignore(1000, '\n'); // Type of sampling in theta and phi : int type_t = SYM ; int type_p = NONSYM ; cout << "total number of domains : nz = " << nz << endl ; cout << "number of points in phi : np = " << np << endl ; cout << "number of points in theta : nt = " << nt << endl ; double relax, seuil ; int niter ; fpar >> relax; fpar.ignore(1000, '\n'); fpar >> seuil; fpar.ignore(1000, '\n'); fpar >> niter; fpar.ignore(1000, '\n'); int* nr_tab = new int[nz]; int* nt_tab = new int[nz]; int* np_tab = new int[nz]; double* bornes = new double[nz+1]; for (int l=0; l> hh ; fpar.ignore(1000, '\n') ; fpar >> mm ; fpar.ignore(1000, '\n') ; fpar >> seuil ; fpar.ignore(1000, '\n') ; for (int l=0; l diff_xi) diff_xi = diff(i) ; if(diff_xi < seuil) { cout << "========================================================================" << endl ; cout << "step = " << mer << " diff_xi = "<< diff_xi << endl ; cout << "========================================================================" << endl ; mer = niter ; } xi = relax * xi + (1-relax) * xi_jm1 ; for (int i=1; i<=3; i++) { xi_jm1.set(i) = xi(i) ; } } // End of the main iteration cout << "========================================================================" << endl ; // Compute h_uu in dirac gauge : //----------------------------- Sym_tensor guu_dirac (mp, CON, mp.get_bvect_cart()) ; guu_dirac = g_uu.derive_lie(xi) ; guu_dirac.dec_dzpuis(2) ; guu_dirac = guu_dirac + g_uu ; cout << "Relative difference between g_uu in dirac gauge and in isotropic gauge " << endl ; cout << " Comp 1 1 : " ; for (int l=0; l