00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2007 Driss Yakoubi 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: LegendreBasis.hpp,v 1.4 2008/02/02 19:37:35 yakoubix Exp $ 00019 00020 #ifndef LEGENDRE_BASIS_HPP 00021 #define LEGENDRE_BASIS_HPP 00022 00023 #include <Types.hpp> 00024 #include <Vector.hpp> 00025 00034 class LegendreBasis 00035 { 00036 private: 00037 const size_t __degree; 00039 public: 00040 00046 size_t degree() const 00047 { 00048 return __degree; 00049 } 00050 00056 size_t dimension() const 00057 { 00058 return __degree +1; 00059 } 00060 00067 void getValues(const real_t& x, 00068 Vector<real_t>& values) const; 00069 00078 real_t getValue(const real_t& x, 00079 const size_t& i) const; 00080 00088 void getDerivativeValues(const real_t& x, 00089 Vector<real_t>& values) const; 00090 00099 real_t getDerivativeValue(const real_t& x, 00100 const size_t& i) const; 00101 00102 00110 void getSecondDerivativeValues(const real_t& x, 00111 Vector<real_t>& values) const; 00112 00121 real_t getSecondDerivativeValue(const real_t& x, 00122 const size_t& i) const; 00123 00129 LegendreBasis(const size_t& degree); 00130 00136 LegendreBasis(const LegendreBasis& legendreBasis); 00137 00142 ~LegendreBasis(); 00143 }; 00144 00145 #endif // LEGENDRE_BASIS_HPP
1.5.6