Debian Codegraph @

School05/Monday/grid_legendre_gauss.C

raw
1 /*
2 * Definition of class Grid_Legendre_Gauss
3 */
4
5 /*
6 * Copyright (c) 2005 Eric Gourgoulhon
7 *
8 * This file is part of LORENE.
9 *
10 * LORENE is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * LORENE is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with LORENE; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26 /*
27 * $Id: grid_legendre_gauss.C,v 1.2 2014/10/06 15:09:48 j_novak Exp $
28 * $Log: grid_legendre_gauss.C,v $
29 * Revision 1.2 2014/10/06 15:09:48 j_novak
30 * Modified #include directives to use c++ syntax.
31 *
32 * Revision 1.1 2005/11/14 01:56:58 e_gourgoulhon
33 * First version
34 *
35 *
36 * $Header: /cvsroot/Lorene/School05/Monday/grid_legendre_gauss.C,v 1.2 2014/10/06 15:09:48 j_novak Exp $
37 *
38 */
39
40 #include <iostream>
41
42 using namespace std ;
43
44 #include <cstdlib>
45 #include <cmath>
46
47 #include "grid.h"
48
49 //----------------------//
50 // Standard constructor //
51 //----------------------//
52
53 Grid_Legendre_Gauss::Grid_Legendre_Gauss(int nb_nodes) : Grid(nb_nodes) {
54
55 cerr << "Grid_Legendre_Gauss: constructor not implemented yet !"
56 << endl ;
57 abort() ;
58 }
59
60
61 //--------------------//
62 // Copy constructor //
63 //--------------------//
64
65 Grid_Legendre_Gauss::Grid_Legendre_Gauss(const Grid_Legendre_Gauss& gi) : Grid(gi) {}
66
67
68 //--------------//
69 // Destructor //
70 //--------------//
71
72 Grid_Legendre_Gauss::~Grid_Legendre_Gauss() {}
73
74
75 //--------------//
76 // Assignment //
77 //--------------//
78
79 void Grid_Legendre_Gauss::operator=(const Grid_Legendre_Gauss& gi) {
80
81 Grid::operator=(gi) ;
82 }
83
84
85
86 //-----------//
87 // Display //
88 //-----------//
89
90 ostream& operator<<(ostream& ost, const Grid_Legendre_Gauss& xn) {
91
92 ost << "Legendre Gauss nodes : " ;
93 int nn = xn.n() ;
94 ost << "number of nodes : " << nn + 1 << endl ;
95 for (int i=0; i<=nn; i++) {
96 ost << " x(" << i << ") = " << xn(i) << endl ;
97 }
98
99 return ost ;
100 }
101