/* * Main code for Isolated Horizon in arbitrary gauge * */ /* * Copyright (c) 2004-2005 Jose Luis Jaramillo * 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 version 2 * as published by the Free Software Foundation. * * 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 isolhor_C[] = "$Header: /cvsroot/Lorene/Codes/Isol_hor/isolhor_KS.C,v 1.3 2014/10/13 08:53:56 j_novak Exp $" ; /* * $Id: isolhor_KS.C,v 1.3 2014/10/13 08:53:56 j_novak Exp $ * $Log: isolhor_KS.C,v $ * Revision 1.3 2014/10/13 08:53:56 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.2 2014/10/06 15:09:44 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.1 2005/10/21 16:21:42 jl_jaramillo * First version * * Revision 1.30 2005/09/12 12:34:09 f_limousin * Compilation Warning - Change of convention for the angular velocity * Add Berlin boundary condition in the case of binary horizons. * * Revision 1.29 2005/06/09 08:09:10 f_limousin * Implementation of the Kerr-Shild metric * * Revision 1.28 2005/04/08 12:14:42 f_limousin * Dependance in phi. * * Revision 1.27 2005/04/08 09:30:53 jl_jaramillo * Calculation of the expansion and its radial derivative * * Revision 1.26 2005/04/06 08:17:09 f_limousin * Writing of global quantities in resformat.d * * Revision 1.25 2005/04/03 19:48:52 f_limousin * Implementation of set_psi(psi_in). * * Revision 1.24 2005/04/02 15:52:05 f_limousin * New data member nz. Lichnerowicz choice for aquad. Delete function * compute_ww(). * * Revision 1.23 2005/03/31 09:46:33 f_limousin * New functions compute_ww(..) and aa_kerr_ww(). * * Revision 1.22 2005/03/30 12:08:33 f_limousin * Implementation of K^{ij} (Eq.(13) Of Sergio (2002)). * * Revision 1.21 2005/03/28 19:42:24 f_limousin * Implement the metric and A^{ij}A_{ij} of Sergio for pertubations * of Kerr black holes. * * Revision 1.20 2005/03/24 16:50:53 f_limousin * Add parameters solve_shift and solve_psi in par_isol.d and in function * init_dat(...). Implement Isolhor::kerr_perturb(). * * Revision 1.19 2005/03/22 13:25:49 f_limousin * Small changes. The angular velocity and A^{ij} are computed * with a differnet sign. * * Revision 1.18 2005/03/15 19:28:11 f_limousin * Implement initial data for Kerr black hole in isotropic coordinates. * * Revision 1.17 2005/03/09 10:33:31 f_limousin * Delete functions init_data_b_neumann(...) and init_data_berlin(...) * --> New parameter solve_lapse in the function init_data(...). * * Revision 1.16 2005/03/03 10:18:57 f_limousin * Addition of the boost in x and z-direction. * The grid and the mapping are now saved in the output file. * * Revision 1.15 2004/12/31 12:30:07 f_limousin * Change the construction of an Isol_hor and the function sauve(FILE*, bool). * * Revision 1.14 2004/11/18 10:02:37 jl_jaramillo * gamt and gamt_point well constructed as tensor in spaherical * components * * Revision 1.13 2004/11/09 12:40:08 f_limousin * Add some printing * * Revision 1.12 2004/11/05 17:53:26 f_limousin * Perturbations of the conformal metric and its time derivative. * * Revision 1.8 2004/11/02 17:42:00 f_limousin * New method sauve(...) to save in a binary file. * * Revision 1.6 2004/10/29 15:41:02 jl_jaramillo * ADM angular momentum added * * Revision 1.5 2004/10/01 16:48:47 f_limousin * *** empty log message *** * * Revision 1.4 2004/09/28 15:57:45 f_limousin * Add the 2 lines $Id and $Log to see the comments * * * Revision 1.1 2004/02/18 19:16:28 jl_jaramillo * First version: c'est loin d'etre pret tout ca !!! * * * $Header: /cvsroot/Lorene/Codes/Isol_hor/isolhor_KS.C,v 1.3 2014/10/13 08:53:56 j_novak Exp $ * */ // C++ headers #include "headcpp.h" // C headers #include #include #include // Lorene headers #include "tenseur.h" #include "metric.h" #include "evolution.h" #include "param.h" #include "nbr_spx.h" #include "utilitaires.h" #include "graphique.h" #include "time_slice.h" #include "isol_hor.h" using namespace Lorene ; int main() { //====================================================================== // Construction and initialization of the various objects //====================================================================== // Setup of a multi-domain grid (Lorene class Mg3d) // ------------------------------------------------ int nz, nt, np, nr1, nrp1 ; ifstream fpar("par_hor.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'); int type_t = SYM ; // symmetry with respect to the equatorial plane int type_p = NONSYM ; // no symmetry in phi // Reading of the parameter file // ------------------------------ int niter, bound_nn, bound_psi, bound_beta, solve_lapse, solve_psi ; int solve_shift ; double radius, relax, seuil, ang_vel, boost_x, boost_z, lim_nn ; fpar >> radius; fpar.ignore(1000, '\n'); fpar >> relax; fpar.ignore(1000, '\n'); fpar >> seuil; fpar.ignore(1000, '\n'); fpar >> niter; fpar.ignore(1000, '\n'); fpar >> ang_vel; fpar.ignore(1000, '\n'); fpar >> boost_x ; fpar >> boost_z; fpar.ignore(1000, '\n'); fpar >> bound_nn ; fpar >> lim_nn ; fpar.ignore(1000, '\n'); fpar >> bound_psi ; fpar.ignore(1000, '\n'); fpar >> bound_beta ; fpar.ignore(1000, '\n'); fpar >> solve_lapse ; fpar.ignore(1000, '\n'); fpar >> solve_psi ; fpar.ignore(1000, '\n'); fpar >> solve_shift ; 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