/* * Test code for the function Cmp::val_point * */ /* * Copyright (c) 2002 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 test_cmp_val_point_C[] = "$Header: /cvsroot/Lorene/Codes/Test/Cmp/test_cmp_val_point.C,v 1.5 2014/10/13 08:54:00 j_novak Exp $" ; /* * $Id: test_cmp_val_point.C,v 1.5 2014/10/13 08:54:00 j_novak Exp $ * $Log: test_cmp_val_point.C,v $ * Revision 1.5 2014/10/13 08:54:00 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.4 2014/10/06 15:12:52 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.3 2002/10/16 14:37:16 j_novak * Reorganization of #include instructions of standard C++, in order to * use experimental version 3 of gcc. * * Revision 1.2 2002/05/11 12:40:55 e_gourgoulhon * Added test for the basis T_COSSIN_SI. * * Revision 1.1 2002/05/05 16:26:47 e_gourgoulhon * Initial commit * * * $Header: /cvsroot/Lorene/Codes/Test/Cmp/test_cmp_val_point.C,v 1.5 2014/10/13 08:54:00 j_novak Exp $ * */ // C headers #include // Lorene headers #include "cmp.h" #include "nbr_spx.h" using namespace Lorene ; int main() { //----------------------------------------------------------------------- // Input data : number of points, types of sampling, etc... //----------------------------------------------------------------------- int nz = 3 ; // Number of domains int nr = 5 ; // Number of points in r (in each domain) int nt = 7 ; // Number of points in theta (in each domain) int np = 8 ; // Number of points in phi (in each domain) // Type of sampling in theta: // SYM : theta in [0,pi/2] (symmetry with respect equatorial plane) // NONSYM : theta in [0,pi] (no symmetry) int type_t = SYM ; // Type of sampling in phi: // SYM : phi in [0,pi[ (symmetry phi --> phi + pi) // NONSYM : phi in [0,2 pi[ (no symmetry) int type_p = NONSYM ; // Shall the outermost domain be compactified ? bool compact = true ; // Boundaries of the domains: double* bornes = new double[nz+1]; for (int l=0; l> r0 ; if (r0 >=0 ) { cout << "theta ?" << endl ; cin >> theta0 ; cout << "phi ?" << endl ; cin >> phi0 ; double aa0 = aa.val_point(r0, theta0, phi0) ; cout << "value at the point (" << r0 << "," << theta0 << "," << phi0 << ") : " << aa0 << endl ; } } while (r0 >= 0.) ; // Test on every grid point // ------------------------ Cmp bb(mp) ; bb.allocate_all() ; Mtbl mr = r ; Mtbl mtet = tet ; Mtbl mphi = phi ; for (int l=0; l