CMP++: Uncertainty Quantification & Bayesian Calibration
Loading...
Searching...
No Matches
cmp::LegendreBasis Struct Reference

Legendre orthogonal polynomial basis. More...

#include <poly.h>

Static Public Member Functions

static double evaluate (size_t deg, double xi)
 
static double normSquared (size_t deg)
 
static Eigen::MatrixXd getJacobiMatrix (int numPoints)
 
static double getPDFWeight ()
 
static double mapToPhysical (double xi, double lowerBound, double upperBound)
 
static double mapToCanonical (double x, double lowerBound, double upperBound)
 

Detailed Description

Legendre orthogonal polynomial basis.

Mathematical Formulation Legendre polynomials \(P_n(\xi)\) are orthogonal with respect to the uniform density function \(w(\xi) = 1/2\) on \([-1, 1]\). The recurrence relation is:

\[ (n+1) P_{n+1}(\xi) = (2n+1) \xi P_n(\xi) - n P_{n-1}(\xi) \]

with \(\int_{-1}^1 P_m(\xi) P_n(\xi) d\xi = \frac{2}{2n+1} \delta_{mn}\).

Implementation Algorithm

  1. evaluate() computes polynomial values using Bonnet's recurrence relation.
  2. getJacobiMatrix() constructs the symmetric tridiagonal Jacobi matrix \(\mathbf{J}\) with \(\alpha_i = 0\) and off-diagonal \(\beta_i = \frac{i}{\sqrt{(2i-1)(2i+1)}}\).

Member Function Documentation

◆ evaluate()

static double cmp::LegendreBasis::evaluate ( size_t  deg,
double  xi 
)
inlinestatic

◆ getJacobiMatrix()

static Eigen::MatrixXd cmp::LegendreBasis::getJacobiMatrix ( int  numPoints)
inlinestatic

◆ getPDFWeight()

static double cmp::LegendreBasis::getPDFWeight ( )
inlinestatic

◆ mapToCanonical()

static double cmp::LegendreBasis::mapToCanonical ( double  x,
double  lowerBound,
double  upperBound 
)
inlinestatic

◆ mapToPhysical()

static double cmp::LegendreBasis::mapToPhysical ( double  xi,
double  lowerBound,
double  upperBound 
)
inlinestatic

◆ normSquared()

static double cmp::LegendreBasis::normSquared ( size_t  deg)
inlinestatic

The documentation for this struct was generated from the following file: