IFEM  90A354
Functions
Legendre.h File Reference

Various utility methods for Spectral elements. More...

#include "matrix.h"
Include dependency graph for Legendre.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool Legendre::GL (std::vector< Real > &weights, std::vector< Real > &points, int n)
 Get Gauss-Legendre points and weights in the domain [-1,1]. More...
 
bool Legendre::GLL (std::vector< Real > &weights, std::vector< Real > &points, int n)
 Get Gauss-Lobatto-Legendre points and weights in the domain [-1,1]. More...
 
bool Legendre::eval (int n, Real x, Real &retval)
 Evaluates the n-th Legendre polynomial. More...
 
bool Legendre::derEval (int n, Real x, Real &retval)
 Evaluates the first derivative of the n-th Legendre polynomial. More...
 
bool Legendre::basisDerivatives (int n, utl::matrix< Real > &der)
 Evaluates first derivatives of the n one-dimensional Lagrange interpolation polynomials through n GLL-points. More...
 

Detailed Description

Various utility methods for Spectral elements.

Date
Mar 19 2009
Author
Einar Christensen / SINTEF

Function Documentation

◆ basisDerivatives()

bool Legendre::basisDerivatives ( int  n,
utl::matrix< Real > &  der 
)

Evaluates first derivatives of the n one-dimensional Lagrange interpolation polynomials through n GLL-points.

Parameters
[in]nNumber of GLL points/polynomials
[out]derEvaluated values

References Legendre::basisDerivatives(), Legendre::eval(), Legendre::GLL(), Real, and utl::matrix< T >::resize().

Referenced by Legendre::basisDerivatives().

◆ derEval()

bool Legendre::derEval ( int  n,
Real  x,
Real retval 
)

Evaluates the first derivative of the n-th Legendre polynomial.

Parameters
[in]nPolynomial degree
[in]xEvaluation point
[out]retvalValue of the first derivative at point x

References Legendre::derEval(), and Real.

Referenced by Legendre::derEval(), Legendre::GL(), and Legendre::GLL().

◆ eval()

bool Legendre::eval ( int  n,
Real  x,
Real retval 
)

Evaluates the n-th Legendre polynomial.

Parameters
[in]nPolynomial degree
[in]xEvaluation point
[out]retvalPolynomial value at point x

References Legendre::eval(), and Real.

Referenced by Legendre::basisDerivatives(), Legendre::eval(), and Legendre::GLL().

◆ GL()

bool Legendre::GL ( std::vector< Real > &  weights,
std::vector< Real > &  points,
int  n 
)

Get Gauss-Legendre points and weights in the domain [-1,1].

Parameters
[out]weightsComputed Gauss-Legendre weight
[out]pointsComputed Gauss-Legendre points
[in]nNumber of Gauss points

References Legendre::derEval(), Legendre::GL(), Real, and DenseMatrix::solveEigNon().

Referenced by Legendre::GL(), and Legendre::GLL().

◆ GLL()

bool Legendre::GLL ( std::vector< Real > &  weights,
std::vector< Real > &  points,
int  n 
)

Get Gauss-Lobatto-Legendre points and weights in the domain [-1,1].

Parameters
[out]weightsComputed Gauss-Legendre weight
[out]pointsComputed Gauss-Legendre points
[in]nNumber of Gauss points

References Legendre::derEval(), Legendre::eval(), Legendre::GL(), Legendre::GLL(), and Real.

Referenced by Legendre::basisDerivatives(), and Legendre::GLL().