A practical Multilevel quasi-Monte Carlo method
for simulating elliptic PDEs with random
coefficients
Pieterjan Robbe
Co-Authors: D. Nuyens, S. Vandewalle
Overview
Model Problem
Representation of Uncertainty
Multilevel Monte Carlo methods
Multilevel quasi-Monte Carlo methods
Model Problem
• steady-state flow through porous media: Darcy’s law
• second-order elliptic PDE
−∇ ·(k(x; ω)∇p(x; ω)) = f(x)
Representation of Uncertainty
• model k(x; ω) as a lognormal field
• use KL-expansionto take samples of Z := log(k): Z(x; ω) = ¯Z+ ∞ X n=1 p θnfn(x)ξ(ω)
whereθn andfn are eigenvalues and eigenfunctions of
covariance operator C(x, y) := σ2exp −kx − ykp λ x, y ∈ D= [0, 1]3
Representation of Uncertainty
Eigenfunctions in three dimensionsf2 f5 f6
Representation of Uncertainty
A typical sample of kMultilevel Monte Carlo methods
• we are interested in some functional Q:= G(p(x; ω))
• what is the expected value of the functional E[Q]? taking a sample ofQ(ω) consists of 3 steps:
(i) take a sample from the random field,
(ii) solve the resulting deterministic PDE, and
Multilevel Monte Carlo methods
• hierarchy of nested grids {h`}L`=0, h` = h02−`, calledlevels • basic idea= take samples not from one approximation QM
for Quantity of Interest but from multiple Q`, `= 0 . . . L E[Q1] = E[Q0] + (E[Q1] − E[Q0]) = E[Q0] + E[Q1−Q0] E[Q2] = E[Q1] + E[Q2−Q1] = E[Q0] + E[Q1−Q0] + E[Q2−Q1] . . . E[QL] = E[Q0] + L X `=1 E[Q`− Q`−1] := L X `=0 E[Y`]
Multilevel Monte Carlo methods
Error analysis• 2 unknowns: # samples at each level N` and # levelsL
• total error = stochastic error+ discretization error
⇓ ⇓
Multilevel Monte Carlo methods
Practical details• choose λ= 0.3, σ = 1, s = 100, h0 = 1/4, no source term
• geometry of simple 3D flow cell with p(0, y, z) = 1 and p(1, y, z) = 0, no outflow through other boundaries
• Quantity of Interest (QoI) is pressure head at point x∗ = (0.12564, 0.12564, 0.12564)
• assume cost per level C` is proportional to
h−`3γ
• for Matlab’s mldivide, γ ≈ 1.653 hence
C`+1
C` = 2
3γ ≈31.103
Multilevel Monte Carlo methods
mldivide vs AMG level 0 0 1 2 3 4 time [ms] level 1 0 10 20 time [ms] level 2 0 0.1 0.2 0.3 0.4 time [s] level 3 0 5 10 mldivide time [s] sample field compose matrix solve system level 0 0 2 4 6 time [ms] level 1 0 10 20 30 40 time [ms] level 2 0 0.1 0.2 0.3 time [s] level 3 0 1 2 3 AMG time [s] sample field compose matrix solve systemMultilevel Monte Carlo methods
Performance 10−5 10−4 10−3 104 106 108 1010 1012 tolerance on RMSE cost MC MLMC 2Multilevel quasi-Monte Carlo methods
• basic idea: use quasi-Monte Carlo points for faster convergence
• here, we use randomly shifted rank-1 lattice rules:
ξn= frac nz
N + ∆`
Multilevel quasi-Monte Carlo methods
Error analysisE[G(p)] E[G(ph)] E[G(psh)] Q(G(p s h))
discretize truncate approximate
contributions inmean-square-error(MSE):
discretization error= E[G(p − ph)]2 →L
truncation error= E[G(ph− psh)]2
stochastic error= L X `=0 E∆ h (Is− Q∆`)(G(p s `) − G(ps`−1)) 2 i →N`
Multilevel quasi-Monte Carlo methods
Error analysis• randomly shiftedlattice rule: take q shifts at each level
• worst-case analysis of stochastic error yields
stochastic error ≤ L X `=0 1 qkG(p s `) − G(ps`−1))k2H1 mix Cs,α2 N`2α
• solve optimisation problem to find
N`' 2α+1 v u u t 2αC2 s,αk · k2H1 mix q2C`
• estimate norm byvariance: k · k2H1
Multilevel quasi-Monte Carlo methods
Performance 10−5 10−4 10−3 104 106 108 1010 1012 tolerance on RMSE cost MC MLMC QMC MLQMC 2 1Multilevel quasi-Monte Carlo methods
Actual computation times• Quantity of Interest is point evaluation of pressure at x∗
10−5 10−4 10−3 100 101 102 103 104 105 106 107 tolerance on RMSE time [s ] MC MLMC QMC MLQMC 2 1
Multilevel quasi-Monte Carlo methods
Other QoI’s• Quantity of Interest is outflow through rightmost face
10−4 10−3 101 102 103 104 105 tolerance on RMSE time [s ] MLMC MLQMC 2 1
Other features
Parallelization• all samples can be taken independently, as in normal MC
• speedup S= Tseq/Tpar
0 5 10 15 20 0 5 10 15 20 p S (p ) 1D 2D
Other features
Probability density function of Quantity of Interest
• Quantity of Interest is outflow through rightmost face
• QoI ∼ N(ln x; µ, σ) with µ ≈ −0.4917 and σ ≈ 0.3342
0 1 2 3 0 1 2 x p df( x )
Other features
Multiple Quantities of Interest and complex geometries
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 x1 x2 −0.25 0 0.25 mean value 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 x1 x2 0.0000 0.0005 0.0010 0.0015 variance
Other features
Multiple Quantities of Interest and complex geometries
p1 p2 ∂p ∂n= 0 ∂p ∂n= 0 x1 x2 0 1 0 1 materiaal 1 materiaal 1 materiaal 2 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 x2 p( x2 ) 0 0.2 0.4 0.6 0.8 1
Other features
Weaknesses• estimation of discretization error and finest levelL is difficult
Conclusions
• successfully applied Multilevel method to 3D problemin subsurface flow
• derivation and implementation of QMC-variant, with cost
O(−1.2871) instead of O(−2) for MLMC
• applied MLMC to more complex problems: discontinuous
diffusion coefficients, complex geometries . . .