IFEM  90A354
Legendre.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _LEGENDRE_H
15 #define _LEGENDRE_H
16 
17 #include "matrix.h"
18 
19 
20 namespace Legendre
21 {
26  bool GL(std::vector<Real>& weights, std::vector<Real>& points, int n);
27 
32  bool GLL(std::vector<Real>& weights, std::vector<Real>& points, int n);
33 
38  bool eval(int n, Real x, Real& retval);
39 
44  bool derEval(int n, Real x, Real& retval);
45 
50  bool basisDerivatives(int n, utl::matrix<Real>& der);
51 }
52 
53 #endif
#define Real
The floating point type to use.
Definition: ImmersedBoundaries.h:18
bool GLL(std::vector< Real > &weights, std::vector< Real > &points, int n)
Get Gauss-Lobatto-Legendre points and weights in the domain [-1,1].
Definition: Legendre.C:56
bool eval(int n, Real x, Real &retval)
Evaluates the n-th Legendre polynomial.
Definition: Legendre.C:107
bool derEval(int n, Real x, Real &retval)
Evaluates the first derivative of the n-th Legendre polynomial.
Definition: Legendre.C:134
bool basisDerivatives(int n, utl::matrix< Real > &der)
Evaluates first derivatives of the n one-dimensional Lagrange interpolation polynomials through n GLL...
Definition: Legendre.C:167
bool GL(std::vector< Real > &weights, std::vector< Real > &points, int n)
Get Gauss-Legendre points and weights in the domain [-1,1].
Definition: Legendre.C:18
Simple template classes for dense rectangular matrices and vectors.