quad {rjacobi} | R Documentation |
Calculates the Interpolation matrix of the Q point Gauss-Jacobi quadrature.
quad <- quadGJ(Q, a=0, b=0) quad <- quadGLJ(Q, a=0, b=0) quad <- quadGRJM(Q, a=0, b=0) quad <- quadGRJP(Q, a=0, b=0)
Q |
Number of quadrature points |
a |
α parameter of Jacobi polynomial. Defaults to 0 |
b |
β parameter of Jacobi polynomial. Defaults to 0 |
This function is actually a set of wrappers around the functions
zerosGJ
, weightsGJ
,
diffmatGJ
and interpmatGJ
.
It is basically a friendly interface to these functions.
Different types of quadrature are possible:
GJ
GLJ
, includes both end
points
GRJM
, includes the -1 end
point
GRJP
, includes the +1 end
pointx |
Quadrature nodes |
w |
Quadrature weights |
D |
Derivative matrix |
interp |
A function that computes the interpolation matrix given a set of nodes. |
Abramowitz, Milton and Stegun, Irene (editors); "Handbook of Mathematical functions", Dover Publications 1965.
Karniadakis, George Em and Sherwin, Spencer; "Spectral/hp Element Methods for Computational Fluid Dynamics", Oxford Science Publications, 2nd edition, 2005.
quadrature
zerosGJ
weightsGJ
diffmatGJ
interpmatGJ
## Calculates the numerical derivative of jacobi(x,4) q = quadGJ(5) f <- jacobi(q$x, 4) df <- q$D %*% f x <- seq(-1, 1, len=51) ff <- djacobi(x, 4) plot(x, ff, ty='l', xlab="x", ylab="dP_4^(0,0)/dx", main="Analytical and Numerical derivative") points(q$x,df)