On 2016-06-15 11:38 GMT+02:00 BLATMAN Geraud wrote: > > Dear users, > > I am wondering how to obtain the weights related to a Gauss quadrature rule > in OpenTURNS. These weights should be computed somewhere since Gauss > quadrature can be used to estimate the coefficients of a polynomial chaos > expansion, as shown by the following commands taken from the Use Cases Guide > (Section 4.3.4) : > > >>> marginalDegrees = [2] * dim > >>> evaluationCoeffStrategy_3 = IntegrationStrategy( > >>> GaussProductExperiment(distributionMu, marginalDegrees)) > > So I have tried to retrieve the weights from the ‘GaussProductExperiment’ > object as follows : > > >>> myExp = GaussProductExperiment(distributionMu, marginalDegrees) > >>> weights = myExp.getWeight() > > However I always get weights all equal to 1/N (N being the sample size), > whatever the distribution (parameter ‘distributionMu’). For instance, if this > distribution is a collection of independent uniform variables over [-1,1], I > would rather expect the well-known Gauss-Legendre quadrature weights. > > Any ideas ?
Hello, it seems that weights are computed only after myExp.generate() is being called. This is annoying, but not trivial to fix. Denis _______________________________________________ OpenTURNS users mailing list [email protected] http://openturns.org/mailman/listinfo/users
