| 1 |
/* |
| 2 |
* Code for testing Base_val::name_* methods |
| 3 |
* |
| 4 |
* |
| 5 |
*/ |
| 6 |
|
| 7 |
/* |
| 8 |
* Copyright (c) 2003 Eric Gourgoulhon. |
| 9 |
* |
| 10 |
* This file is part of LORENE. |
| 11 |
* |
| 12 |
* LORENE is free software; you can redistribute it and/or modify |
| 13 |
* it under the terms of the GNU General Public License version 2 |
| 14 |
* as published by the Free Software Foundation. |
| 15 |
* |
| 16 |
* LORENE is distributed in the hope that it will be useful, |
| 17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 |
* GNU General Public License for more details. |
| 20 |
* |
| 21 |
* You should have received a copy of the GNU General Public License |
| 22 |
* along with LORENE; if not, write to the Free Software |
| 23 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 24 |
* |
| 25 |
*/ |
| 26 |
|
| 27 |
char test_name_C[] = "$Header: /cvsroot/Lorene/Codes/Test/Base_val/test_name.C,v 1.4 2014/10/13 08:53:59 j_novak Exp $" ; |
| 28 |
|
| 29 |
/* |
| 30 |
* $Id: test_name.C,v 1.4 2014/10/13 08:53:59 j_novak Exp $ |
| 31 |
* $Log: test_name.C,v $ |
| 32 |
* Revision 1.4 2014/10/13 08:53:59 j_novak |
| 33 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 34 |
* |
| 35 |
* Revision 1.3 2014/10/06 15:12:51 j_novak |
| 36 |
* Modified #include directives to use c++ syntax. |
| 37 |
* |
| 38 |
* Revision 1.2 2007/12/11 15:28:26 jl_cornou |
| 39 |
* Jacobi(0,2) polynomials partially implemented |
| 40 |
* |
| 41 |
* Revision 1.1 2003/10/19 20:03:28 e_gourgoulhon |
| 42 |
* First version |
| 43 |
* |
| 44 |
* |
| 45 |
* |
| 46 |
* $Header: /cvsroot/Lorene/Codes/Test/Base_val/test_name.C,v 1.4 2014/10/13 08:53:59 j_novak Exp $ |
| 47 |
* |
| 48 |
*/ |
| 49 |
|
| 50 |
// C headers |
| 51 |
#include <cstdlib> |
| 52 |
|
| 53 |
// Lorene headers |
| 54 |
#include "base_val.h" |
| 55 |
|
| 56 |
using namespace Lorene ; |
| 57 |
|
| 58 |
int main() { |
| 59 |
|
| 60 |
int nz = 3 ; |
| 61 |
Base_val base(nz) ; |
| 62 |
|
| 63 |
base.set_base_r(0, R_JACO02) ; |
| 64 |
|
| 65 |
base.set_base_t(T_LEG_II) ; |
| 66 |
|
| 67 |
base.set_base_p(P_COSSIN_I) ; |
| 68 |
|
| 69 |
char name[8] ; |
| 70 |
|
| 71 |
int np = 6 ; |
| 72 |
int nt = 13 ; |
| 73 |
int nr = 17 ; |
| 74 |
|
| 75 |
for (int k=0; k<np+1; k++) { |
| 76 |
for (int j=0; j<nt; j++) { |
| 77 |
base.name_theta(0, k, j, name) ; |
| 78 |
cout << "k=" << k << ", j=" << j << " : " << name << endl ; |
| 79 |
} |
| 80 |
} |
| 81 |
|
| 82 |
cout << endl ; |
| 83 |
for (int k=0; k<np+1; k++) { |
| 84 |
for (int i=0; i<nr; i++) { |
| 85 |
base.name_r(0, k, 0, i, name) ; |
| 86 |
cout << "k=" << k << ", i=" << i << " : " << name << endl ; |
| 87 |
} |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
return EXIT_SUCCESS ; |
| 92 |
} |