getM: Get canonical polynomial chaos expansion size
Description
The getM is a very simple function that determines the size of the canonical polynomial chaos expansion for d random variables up to and including degree p in the expansion. The size is determined from choose(d+p,d) or factorial(d+p)/factorial(d)/factorial(p).
Usage
getM(d,p)
Arguments
d
Number of input random variables
p
Order of the polynomial chaos expansion
Value
M
Number of terms in the canonical d-dimensional polynomial chaos expansion up to and including degree p
References
R. Ghanem and P. Spanos, 1991, Stochastic Finite Elements: A Spectral Approach. Berlin: Springer.