quadrature {rjacobi}R Documentation

Quadrature information

Description

Builds a data structure with every quadrature related stuff such as integrals, derivatives and interpolations

Usage

quad <- quadrature(Q, type=c('GJ', 'GLJ', 'GRJM', 'GRJP', a=0, b=0,
xinterp=NULL))

Arguments

Q Number of quadrature points
type A string specifying the quadrature type
a α weight
b β weight
xinterp Points where the interpolation matrix should be calculated

Details

This function is a wrapper around the various functions

It returns a list of class quadrature with all the above fields.

The interpolation points can be modified with the xinterp function.

Value

x Quadrature zeros
a α weight
b β weight
w Quadrature weights
D Derivative matrix
type Quadrature type
lagrange Lagrange interpolants
xinterp Interpolation points
imat Interpolation matrix at xinterp

References

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.

See Also

lagrangeGJ zerosGJ weightsGJ diffmatGJ xinterp interpmatGJ

Examples


## Calculates the numerical derivative of jacobi(x,4)
q = quadrature(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)


[Package rjacobi version 0.9.2 Index]