Adaptive sparse generalized polynomial chaos expansion

Share:

Description

The function tell.GPCE.sparse is used for generalized polynomial chaos expansion of external models. When a functional model is given to the function GPCE.sparse, this latter automatically call the function tell.GPCE.sparse. When in the function GPCE.sparse the Model option is NULL then this latter returns a list of Designs and a list of Arguments, Args, the ones entered for previous the GPCE.sparse run. Then the Designs, the Args and the vector of manually calculated outputs need to be given to the function tell.GPCE.sparse to run the algorithm.

Usage

1
2
## S3 method for class 'GPCE.sparse'
tell(x,Output,...)

Arguments

x

ResultObjectDesign2EvalArgs: a list of arguments returned by the GPCE.sparse function

Output

the vector of the manually calculated model outputs

...

additional parameters

Value

The same as the GPCE.sparse function

Author(s)

Munoz Zuniga Miguel

References

G. Blatman and B. Sudret, 2010, An adapive algorithm to build up sparse polynomial chaos expansions for stochastic finite element analysis, Probabilistic Engineering Mechanics, 25, 183–197.

See Also

GPCE.sparse

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
### External model (for the example the function Model defined below will be used externaly)
### Model definition: y= 1 + Phi_1(x1)*Phi_1(x2) + Phi_3(x2)
Model <- function(x){
  PHerm = hermite.he.polynomials(5, normalized=FALSE)
  y=1+unlist(polynomial.values(PHerm[2],x[,1]))*unlist(polynomial.values(PHerm[2],x[,2]))+
  unlist(polynomial.values(PHerm[4],x[,2]))/sqrt(factorial(3))
  return(y)
}

### initialized Output
Output=c()

### Get a first design
ResultObject=GPCE.sparse(PCSpace="Gaussian",InputDim=3,InputDistrib=rep("Gaussian",3))
names(ResultObject)

### Calculate the model output for the given design and concatenate the model output results
### into the output vector 
Output=c(Output,Model(ResultObject$Design2Eval))

### Give the design and the calculated ouput to the tell function
ResultObject=tell(ResultObject,Output)
names(ResultObject)

### If the expansion has been calculated the function tell return the full expansion 
### paramaters, the moments analysis, the sensitivity analysis and the output distribution
### If not the function tell() return an enriched design. 
Output=c(Output,Model(ResultObject$Design2Eval))

### Give the design and the calculated ouput to the tell function
ResultObject=tell(ResultObject,Output)
names(ResultObject)
###

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.