CreateQuadrature: Create a full or sparse numerical quadrature.

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/CreateQuadrature.R

Description

Creates a full-tensor multivariate quadrature based on one-dimensional quadrature rules or a Smolyak sparse-tensor multivariate quadrature based on nested one-dimensional quadrature rules.

Usage

1
CreateQuadrature(N,L,QuadPoly,ExpPoly,QuadType,ParamDistrib)

Arguments

N

Number of random variables

L

Level of quadrature used in the approximation.

QuadPoly

The type of one-dimensional quadrature rule to be used. For SPARSE, one can use ClenshawCurtis or Fejer. For FULL, one could choose Hermite,Legendre,Jacobi or Laguerre

ExpPoly

The polynomial used in the expansion. Options are Hermite, Legendre, Jacobi, Laguerre

QuadType

Type of quadrature. Options are SPARSE or FULL

ParamDistrib

Shape parameters used for the definition of random variables.

Value

QuadSize

Number of quadrature points

QuadNodes

A (QuadSize x n) matrix containing the QuadSize d-dimensional quadrature points.

QuadWeights

A n-tuple vector containing the quadrature weights associated with each quadrature point

PolyNodes

A (m x n) matrix containing the m d-dimensional multivariate polynomial evaluated at the n quadrature points.

Author(s)

Jordan Ko

References

J. Ko, 2009, Applications of the generalized polynomial chaos to the numerical simulationof stochastic shear flows, Doctoral thesis, University of Paris VI.

See Also

tell.GPCE.quad

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
rm(list = setdiff(ls(), lsf.str()))

# random variable definitgeion
d <- 3              # number of random variables
L <- 4              # quadrature level in each dimention. 
                    # could be anisotropic eg c(3,4,5) for full quadrature 

# PCE definition
QuadType <- "FULL"              # type of quadrature
QuadPoly <- rep("LEGENDRE",d)   # polynomial to use
ExpPoly <- rep("LEGENDRE",d)    # polynomial to use
ParamDistrib <- NULL

# QuadType <- "SPARSE"                                  # type of quadrature
# QuadPoly <- 'ClenshawCurtis'                          # polynomial to use
# ExpPoly <- rep("LEGENDRE",d)    # polynomial to use

Quadrature = CreateQuadrature(d,L,QuadPoly,ExpPoly,QuadType,ParamDistrib) # quadrature

GPC documentation built on May 30, 2017, 12:50 a.m.