00001 /* 00002 * Definition of class Grid_Legendre_Gauss 00003 */ 00004 00005 /* 00006 * Copyright (c) 2005 Eric Gourgoulhon 00007 * 00008 * This file is part of LORENE. 00009 * 00010 * LORENE is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * LORENE is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with LORENE; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 * 00024 */ 00025 00026 /* 00027 * $Id: grid_legendre_gauss.C,v 1.1 2005/11/14 01:56:58 e_gourgoulhon Exp $ 00028 * $Log: grid_legendre_gauss.C,v $ 00029 * Revision 1.1 2005/11/14 01:56:58 e_gourgoulhon 00030 * First version 00031 * 00032 * 00033 * $Header: /cvsroot/Lorene/School05/Monday/grid_legendre_gauss.C,v 1.1 2005/11/14 01:56:58 e_gourgoulhon Exp $ 00034 * 00035 */ 00036 00037 #include <iostream> 00038 00039 using namespace std ; 00040 00041 #include <stdlib.h> 00042 #include <math.h> 00043 00044 #include "grid.h" 00045 00046 //----------------------// 00047 // Standard constructor // 00048 //----------------------// 00049 00050 Grid_Legendre_Gauss::Grid_Legendre_Gauss(int nb_nodes) : Grid(nb_nodes) { 00051 00052 cerr << "Grid_Legendre_Gauss: constructor not implemented yet !" 00053 << endl ; 00054 abort() ; 00055 } 00056 00057 00058 //--------------------// 00059 // Copy constructor // 00060 //--------------------// 00061 00062 Grid_Legendre_Gauss::Grid_Legendre_Gauss(const Grid_Legendre_Gauss& gi) : Grid(gi) {} 00063 00064 00065 //--------------// 00066 // Destructor // 00067 //--------------// 00068 00069 Grid_Legendre_Gauss::~Grid_Legendre_Gauss() {} 00070 00071 00072 //--------------// 00073 // Assignment // 00074 //--------------// 00075 00076 void Grid_Legendre_Gauss::operator=(const Grid_Legendre_Gauss& gi) { 00077 00078 Grid::operator=(gi) ; 00079 } 00080 00081 00082 00083 //-----------// 00084 // Display // 00085 //-----------// 00086 00087 ostream& operator<<(ostream& ost, const Grid_Legendre_Gauss& xn) { 00088 00089 ost << "Legendre Gauss nodes : " ; 00090 int nn = xn.n() ; 00091 ost << "number of nodes : " << nn + 1 << endl ; 00092 for (int i=0; i<=nn; i++) { 00093 ost << " x(" << i << ") = " << xn(i) << endl ; 00094 } 00095 00096 return ost ; 00097 } 00098