/* * Code for computing an equilibrium configuration of a rotating boson star * * (see file boson_star.h for documentation). * */ /* * Copyright (c) 2012 Claire Some, Eric Gourgoulhon * * 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 bostar_C[] = "$Header: /cvsroot/Lorene/Codes/BosonStar/bostar.C,v 1.3 2014/10/13 08:53:55 j_novak Exp $" ; /* * $Id: bostar.C,v 1.3 2014/10/13 08:53:55 j_novak Exp $ * $Log: bostar.C,v $ * Revision 1.3 2014/10/13 08:53:55 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.2 2012/12/03 15:28:03 c_some * First call to Boson_star::equilibrium * * Revision 1.1 2012/11/23 15:41:44 c_some * First version * * * $Header: /cvsroot/Lorene/Codes/BosonStar/bostar.C,v 1.3 2014/10/13 08:53:55 j_novak Exp $ * */ // C++ headers // C headers // Lorene headers #include "boson_star.h" #include "nbr_spx.h" using namespace Lorene ; int main() { // Identification of all the subroutines called by the code : system("ident bostar > identif.d") ; //------------------------------------------------------------------ // Parameters of the computation //------------------------------------------------------------------ int kkk, mer_max, mermax_poisson, graph, nz, nzadapt, nt, np, mer_triax ; double mmm, rphi_c, iphi_c, precis, thres_adapt, relax, relax_poisson, ampli_triax, precis_adapt ; ifstream fpar("param.d") ; if ( !fpar.good() ) { cerr << "Problem in opening the file param.d ! " << endl ; abort() ; } fpar.ignore(1000,'\n') ; // skip title fpar >> mmm ; fpar.ignore(1000,'\n') ; fpar >> kkk ; fpar.ignore(1000,'\n') ; fpar >> rphi_c ; fpar.ignore(1000,'\n') ; fpar >> iphi_c ; fpar.ignore(1000,'\n') ; fpar.ignore(1000,'\n') ; // skip title fpar >> mer_max ; fpar.ignore(1000,'\n') ; fpar >> precis ; fpar.ignore(1000,'\n') ; fpar >> thres_adapt ; fpar.ignore(1000,'\n') ; fpar >> mer_triax ; fpar.ignore(1000,'\n') ; fpar >> ampli_triax ; fpar.ignore(1000,'\n') ; fpar >> relax ; fpar.ignore(1000,'\n') ; fpar >> mermax_poisson ; fpar.ignore(1000,'\n') ; fpar >> relax_poisson ; fpar.ignore(1000,'\n') ; fpar >> precis_adapt ; fpar.ignore(1000,'\n') ; fpar >> graph ; fpar.ignore(1000,'\n') ; fpar.ignore(1000,'\n') ; // skip title fpar >> nz ; fpar.ignore(1000,'\n') ; fpar >> nzadapt; fpar.ignore(1000,'\n') ; fpar >> nt; fpar.ignore(1000,'\n') ; fpar >> np; fpar.ignore(1000,'\n') ; int* nr = new int[nz]; int* nt_tab = new int[nz]; int* np_tab = new int[nz]; double* bornes = new double[nz+1]; fpar.ignore(1000,'\n'); // skip title for (int l=0; l> nr[l]; fpar >> bornes[l]; fpar.ignore(1000,'\n') ; np_tab[l] = np ; nt_tab[l] = nt ; } bornes[nz] = __infinity ; fpar.close(); //----------------------------------------------------------------------- // Construction of the multi-grid and the mapping //----------------------------------------------------------------------- // Type of r sampling : int* type_r = new int[nz]; type_r[0] = RARE ; for (int l=1; l