/* * Main code for computing initial configuration * */ /* * Copyright (c) 2004-2005 Francois Limousin * Jose Luis Jaramillo * * 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 init_bh_C[] = "$Header: /cvsroot/Lorene/Codes/Bin_hor/init_bh.C,v 1.9 2014/10/13 08:53:53 j_novak Exp $" ; /* * $Id: init_bh.C,v 1.9 2014/10/13 08:53:53 j_novak Exp $ * $Log: init_bh.C,v $ * Revision 1.9 2014/10/13 08:53:53 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.8 2014/10/06 15:09:42 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.7 2007/04/13 15:30:58 f_limousin * Lots of improvements, generalisation to an arbitrary state of * rotation, implementation of the spatial metric given by Samaya. * * Revision 1.6 2006/06/28 13:36:52 f_limousin * Convergence to a given irreductible mass * * Revision 1.5 2005/03/04 09:42:02 f_limousin * New construction of the object Bin_hor. * * Revision 1.4 2005/02/25 12:31:59 f_limousin * The boundary conditions for psi, N and beta are now parameters in * par_init.d and par_coal.d. * * Revision 1.3 2005/01/03 07:59:02 f_limousin * Drawings. * * Revision 1.2 2004/12/31 15:45:26 f_limousin * Change the parameters in par_init.d * * Revision 1.1 2004/12/29 18:00:20 f_limousin * First version * * * $Header: /cvsroot/Lorene/Codes/Bin_hor/init_bh.C,v 1.9 2014/10/13 08:53:53 j_novak Exp $ * */ //standard #include #include // LORENE #include "type_parite.h" #include "nbr_spx.h" #include "proto.h" #include "coord.h" #include "tenseur.h" #include "tensor.h" #include "isol_hor.h" #include "utilitaires.h" #include "graphique.h" using namespace Lorene ; int main() { char blabla [120] ; ifstream param("par_init.d") ; double precis, relax, radius, separation, lim_nn ; int nz, nt, np, nr1, nrp1, bound_nn, bound_psi ; param.getline(blabla, 120) ; param.getline(blabla, 120) ; param >> separation ; param.getline(blabla, 120) ; param >> nz ; param.getline(blabla, 120) ; param >> nt; param.ignore(1000, '\n'); param >> np; param.ignore(1000, '\n'); param >> nr1; param.ignore(1000, '\n'); param >> nrp1; param.ignore(1000, '\n'); double* bornes = new double[nz+1] ; int* nr_tab = new int[nz]; int* nt_tab = new int[nz]; int* np_tab = new int[nz]; for (int l=0 ; l> bornes[l] ; } radius = bornes[1] ; param.getline(blabla, 120) ; bornes[nz] = __infinity ; param >> precis ; param.getline(blabla, 120) ; param >> relax ; param.getline(blabla, 120) ; param >> bound_nn ; param >> lim_nn ; param.ignore(1000, '\n'); param >> bound_psi ; param.ignore(1000, '\n'); param.close() ; // Type of sampling in theta and phi : int type_t = SYM ; int type_p = NONSYM ; int* type_r = new int[nz] ; type_r[0] = RARE ; for (int l=1 ; l