Commit 9a9a7aa8 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

adapted notebook

parent 00d45164
%% Cell type:markdown id: tags:
# Elliptic Experiments
%% Cell type:markdown id: tags:
All results published in:
[1] Baumgarten, N. and Wieners, C. The parallel finite element system M++ with integrated multilevel
preconditioning and multilevel Monte Carlo methods. Computers & Mathematics with Applications.
2020
Main sources of this work:
[2] Giles, M.B., 2015. Multilevel Monte Carlo methods. Acta Numerica 24, 259–328.
[3] Dietrich, C.R., Newsam, G.N., 1997. Fast and exact simulation of stationary
Gaussian processes through circulant embedding of the covariance matrix.
SIAM Journal on Scientific Computing 18, 1088–1107.
[4] Charrier, J., Scheichl, R., Teckentrup, A.L., 2013. Finite element error analysis
of elliptic PDEs with random coefficients and its application to multilevel
Monte Carlo methods. SIAM Journal on Numerical Analysis 51, 322–352.
[5] Cliffe, K.A., Giles, M.B., Scheichl, R., Teckentrup, A.L., 2011. Multilevel Monte
Carlo methods and applications to elliptic PDEs with random coefficients.
Computing and Visualization in Science 14, 3.
%% Cell type:markdown id: tags:
### Stochastic subsurface flow problem
%% Cell type:markdown id: tags:
We apply the MLMC method an elliptic model problem in the case of a stochastically modeled permeability
$\kappa \colon \Omega \times \overline{D} \longrightarrow \mathbb{R}_{\text{sym}}^{d \times d}$
\begin{align}
\text{div} \, \big( \kappa(\omega, x_1, x_2) u(\omega, x_1, x_2) \big) &= 0, \quad \text{on} \quad D = (0,1)^2\\
u(\omega, x_1,x_2) &= 0, \quad \text{on} \quad x_2 = 0 \\
\nabla u(\omega, x_1,x_2) \cdot n &=-1, \quad \text{on} \quad x_2 = 1 \\
\nabla u(\omega, x_1,x_2) \cdot n &= 0, \quad \text{on} \quad x_1 \in \{ 0, 1 \}
\end{align}
on a suitable probability space $(\Omega, \mathcal{F}_\Omega , \mathbb{P})$.
We assume that the permeability tensor is isotropic and only depending on the scalar value
$\kappa_0(\omega, x)>0$. We choose a log-normal ansatz
\begin{align} \label{kappa_g}
\kappa_0(\omega, x) = \exp\big(g(\omega, x)\big)\,,
\end{align}
where $g \colon \Omega \times \bar D \rightarrow \mathbb{R}$ is a Gaussian field with a
covariance kernel characterized by
\begin{align} \label{covariance_fct}
C(x,y) = \sigma^2 \exp(- \| x- y \|_2^s / \lambda^s)
\end{align}
depending on variance $\sigma^2$, correlation length $\lambda$, and a smoothing parameter $s$.
For efficient sampling of these log-normal fields, we use the special structure of covariance matrices
with circulant embeddings and fast Fourier transforms.
The stochastic fields as above yield uniform regularity estimates for the elliptic model problem, thus for some $0 < t \leq 1$,
it is shown that
\begin{align}\label{regularity}
\| u(\omega, \cdot) &\|_{H^{r + 1}(D)} \lesssim \frac{\kappa_{\text{max}}(\omega) \| \kappa(\omega, \cdot) \|_{C^t(\overline{D})}^2}{\kappa_{\text{min}(\omega)^4}} \nonumber \\
&\left( \| f(\omega, \cdot) \|_{H^{t-1}(D)} + \| \kappa(\omega, \cdot) \|_{C^t(\overline{D})} \| u_{D}(\omega, \cdot) \|_{H^{t+\frac{1}{2}}(\Gamma_{D})} \right)
\end{align}
for almost all $\omega \in \Omega$ and for all $0 < r < t$. Therefore,
we can also retrieve convergence results for the finite element
solution $u_h(\omega)\in V_h^c(u_D)$.
%% Cell type:code id: tags:
``` python
import sys
sys.path.append('..')
import mpp.python.mppy as mppy
import mpp.python.mppy.utilities as utils
from python.mlmc_mppy import *
import pandas as pd
mpp = mppy.Mpp(project_name='MLMC',
executable='MLMC-M++',
mpp = mppy.Mpp(project_name='MLUQ',
executable='MLUQ-M++',
kernels=4,
mute=False)
mpp.build()
```
%% Output
================ running cmake ================
-- Project directory= /home/niklas/CLionProjects/mlmc
-- Mpp directory= /home/niklas/CLionProjects/mlmc/mpp
-- Setting prepare commit message hook to mpp
file: /home/niklas/CLionProjects/mlmc/mpp/doc/../../.git/modules/mpp/hooks/prepare-commit-msg
-- Failed to find LLVM FileCheck
-- git Version: v1.5.2-bf585a27
-- Version: 1.5.2
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Fully splitted MPI world communicator
-- A library with LAPACK API found.
-- C Compiler optimization= -O3
-- C++ version= 17
-- Compiler version= c++
-- Compiler optimization= -O3
-- Suppress deprecated warnings= OFF
-- Building space time library= OFF
-- Time dimension= 0
-- Using fftw library= ON
-- Space dimension= 2
-- Affine linear transformations= ON
-- Geometric tolerance= 1e-10
-- Near zero= 1e-15
-- Very large= 1e30
-- Infinity= 1e100
-- Checking for module 'libtirpc'
-- No package 'libtirpc' found
-- Could NOT find TIRPC (missing: TIRPC_LIBRARIES TIRPC_INCLUDE_DIRS)
-- Building mpp unit tests= OFF
-- Building mpp interval arithmetic unit tests= OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/niklas/CLionProjects/mlmc/build
================ running make ================
[ 0%] Building CXX object mpp/googletest/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 5%] Built target benchmark
[ 9%] Built target LIB_BASIC
[ 56%] Built target superlu
[ 56%] Built target benchmark_main
[ 59%] Built target LIB_MATH
[ 64%] Built target LIB_MESH
[ 67%] Built target LIB_DISC
[ 71%] Built target LIB_VECTOR
[ 76%] Built target LIB_ELEM
[ 81%] Built target LIB_SOLVERS
[ 81%] Built target MPP_LIBRARIES
[ 84%] Built target PDESOLVER
[ 85%] Built target PROBLEMS
[ 86%] Built target GENERATORS
[ 88%] Built target MONTECARLO
[ 89%] Linking CXX executable MLMC-M++
[ 89%] Built target MLMC-M++
[ 90%] Linking CXX static library ../../../lib/libgtest.a
[ 90%] Built target gtest
[ 90%] Building CXX object mpp/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 90%] Building CXX object mpp/googletest/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 90%] Linking CXX static library ../../../lib/libgtest_main.a
[ 90%] Built target gtest_main
[ 91%] Linking CXX static library ../../../lib/libgmock.a
[ 91%] Built target gmock
[ 91%] Building CXX object mpp/googletest/googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[ 91%] Linking CXX static library ../../../lib/libgmock_main.a
[ 91%] Built target gmock_main
[ 92%] Building CXX object mpp/tests/CMakeFiles/LIB_TEST.dir/TestEnvironment.cpp.o
[ 92%] Linking CXX static library libLIB_TEST.a
[ 92%] Built target LIB_TEST
[ 93%] Building CXX object mlmc/tests/CMakeFiles/TestWelfordAggregateMPI.dir/estimators/datastructure/TestWelfordAggregate.cpp.o
[ 95%] Building CXX object mlmc/tests/CMakeFiles/TestNormalDistribution.dir/generators/TestNormalDistribution.cpp.o
[ 95%] Building CXX object mlmc/tests/CMakeFiles/TestPlotting.dir/generators/TestPlotting.cpp.o
[ 95%] Building CXX object mlmc/tests/CMakeFiles/TestMonteCarloMPI.dir/estimators/TestMonteCarlo.cpp.o
[ 95%] Linking CXX executable TestWelfordAggregateMPI
[ 95%] Linking CXX executable TestNormalDistribution
[ 95%] Built target TestWelfordAggregateMPI
[ 95%] Building CXX object mlmc/tests/CMakeFiles/TestUniformDistribution.dir/generators/TestUniformDistribution.cpp.o
[ 95%] Built target TestNormalDistribution
[ 95%] Building CXX object mlmc/tests/CMakeFiles/TestCirculantEmbedding.dir/generators/TestCirculantEmbedding.cpp.o
[ 95%] Linking CXX executable TestMonteCarloMPI
[ 95%] Linking CXX executable TestPlotting
[ 95%] Built target TestPlotting
[ 96%] Building CXX object mlmc/tests/CMakeFiles/TestSymmetricCovariance.dir/generators/TestSymmetricCovariance.cpp.o
[ 96%] Linking CXX executable TestUniformDistribution
[ 96%] Built target TestMonteCarloMPI
[ 96%] Building CXX object mlmc/tests/CMakeFiles/TestMultilevelErrors.dir/estimators/datastructure/TestMultilevelErrors.cpp.o
[ 96%] Built target TestUniformDistribution
[ 96%] Building CXX object mlmc/tests/CMakeFiles/TestMainMPI.dir/TestMain.cpp.o
[ 96%] Linking CXX executable TestSymmetricCovariance
[ 96%] Built target TestSymmetricCovariance
[ 97%] Building CXX object mlmc/tests/CMakeFiles/TestLevelMaps.dir/estimators/datastructure/TestLevelMaps.cpp.o
[ 98%] Linking CXX executable TestCirculantEmbedding
[ 98%] Built target TestCirculantEmbedding
[ 98%] Building CXX object mlmc/tests/CMakeFiles/TestPDESolverMPI.dir/pdesolver/TestPDESolver.cpp.o
[ 98%] Linking CXX executable TestMultilevelErrors
[ 98%] Built target TestMultilevelErrors
[ 98%] Building CXX object mlmc/tests/CMakeFiles/TestExponents.dir/estimators/datastructure/TestExponents.cpp.o
[ 98%] Linking CXX executable TestMainMPI
[ 98%] Linking CXX executable TestLevelMaps
[ 98%] Built target TestMainMPI
[ 99%] Building CXX object mlmc/tests/CMakeFiles/TestPDESolver.dir/pdesolver/TestPDESolver.cpp.o
[ 99%] Built target TestLevelMaps
[100%] Building CXX object mlmc/tests/CMakeFiles/TestMultilevelMonteCarloMPI.dir/estimators/TestMultilevelMonteCarlo.cpp.o
[100%] Linking CXX executable TestExponents
[100%] Linking CXX executable TestPDESolverMPI
[100%] Built target TestExponents
[100%] Building CXX object mlmc/tests/CMakeFiles/TestSPRNG5MPI.dir/generators/TestSPRNG5.cpp.o
[100%] Built target TestPDESolverMPI
[100%] Linking CXX executable TestSPRNG5MPI
[100%] Built target TestSPRNG5MPI
[100%] Linking CXX executable TestMultilevelMonteCarloMPI
[100%] Linking CXX executable TestPDESolver
[100%] Built target TestMultilevelMonteCarloMPI
[100%] Built target TestPDESolver
0
%% Cell type:markdown id: tags:
### Introductry example
%% Cell type:markdown id: tags:
As introductury example we want to take a look at the specific configuration $\sigma=1.0$, $\lambda=0.15$ and $s=1.8$. We solve this problem with linear Lagrange finite elements and initialize $l_{\text{init}} = [3, 4, 5]$ with $M_l^{\text{init}} = [12, 6, 3]$. We aim for an $\varepsilon = 0.01$ w.r.t the $L^2$-norm.
%% Cell type:code id: tags:
``` python
mpp.reset_data()
mpp.clean_data()
kwargs={"GeneratorPlotting": 1,
"PDESolverPlotting": 1,
"initLevels": [4, 5, 6]}
mpp.run(4, config="mlmc_elliptic", kwargs=kwargs)
```
%% Output
================ running mpp ================
start program on 4 procs at Mon May 17 21:37:56 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorPlotting: ........ 1
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 1
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 7
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.01
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [4, 5, 6]
smoothing: ................ 1.0
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.010000
MonteCarlo l=4: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=4: MeanQ=0.574 MeanY=0.574 MeanQcomm=0.574 MeanYcomm=0.574
MonteCarlo l=4: SVarQ=0.000976 SVarY=0.000976 SVarQcomm=0.000976 SVarYcomm=0.000976
MonteCarlo l=4: 0.17 seconds
MonteCarlo l=5: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=5: MeanQ=0.572 MeanY=2.2e-05 MeanQcomm=0.572 MeanYcomm=2.2e-05
MonteCarlo l=5: SVarQ=0.00107 SVarY=3.95e-07 SVarQcomm=0.00107 SVarYcomm=3.95e-07
MonteCarlo l=5: 0.35 seconds
MonteCarlo l=6: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=6: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=6: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=6: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=6: MeanQ=0.562 MeanY=0.000187 MeanQcomm=0.562 MeanYcomm=-0.000187
MonteCarlo l=6: SVarQ=0.00115 SVarY=1.84e-08 SVarQcomm=0.00115 SVarYcomm=1.84e-08
MonteCarlo l=6: 0.91 seconds
Multilevel Method: alpha=-3.09 beta=4.42 gamma=1.91
Multilevel Method: dM=[9, -4, -1]
MonteCarlo l=4: Start with: M=12 dM=9 MComm=12 dMComm=9
MonteCarlo l=4: MeanQ=0.574 MeanY=0.574 MeanQcomm=0.574 MeanYcomm=0.574
MonteCarlo l=4: SVarQ=0.000976 SVarY=0.000976 SVarQcomm=0.000976 SVarYcomm=0.000976
MonteCarlo l=4: End with: M=21 dM=0 MComm=21 dMComm=0
MonteCarlo l=4: MeanQ=0.572 MeanY=0.572 MeanQcomm=0.572 MeanYcomm=0.572
MonteCarlo l=4: SVarQ=0.000748 SVarY=0.000748 SVarQcomm=0.000748 SVarYcomm=0.000748
MonteCarlo l=4: 0.12 seconds
Multilevel Method: alpha=-3.09 beta=4.42 gamma=1.91
Multilevel Method: dM=[-5, -4, -1]
Multilevel Method: numErr=0
Multilevel Method: statErr=0.00598
Multilevel Method: 1.54 seconds
MultilevelMonteCarlo Experiment: 1.54 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.572389, 2.19764e-05, 0.000186619]
E(Qf): .................... [0.572389, 0.571883, 0.562116]
V(Qf-Qc): ................. [0.000748448, 3.94978e-07, 1.84e-08]
V(Qf): .................... [0.000748448, 0.00107062, 0.00114612]
E(cost): .................. [81, 289, 1089]
Used Levels: .............. [4, 5, 6]
Used Samples: ............. [21, 6, 3]
Exponents Info:
Final alpha: .............. -3.09
Final beta: ............... 4.42
Final gamma: .............. 1.91
Estimator Results Info:
Cost: ..................... 4.38e+03
Value: .................... 1.72
Epsilon: .................. 0.01
Total Error: .............. 0.00598
Numerical Error: .......... 0
Stochastical Error: ....... 0.00598
end program after 1.57 seconds on 4 procs at Mon May 17 21:37:58 2021
0
%% Cell type:code id: tags:
``` python
from mpp.python.mppy.utilities import VtkPlot
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
@interact(n=widgets.IntSlider(min=0, max=5, step=1, value=0))
def plot_nth_frame(n):
p = VtkPlot(figsize=(16, 12))
plt.axis('off')
gs = gridspec.GridSpec(2, 2)
p.ax1 = p.fig.add_subplot(gs[0])
p.add_vtu("Kappa.5.0.{}.vtu".format(n), ax=p.ax1)
p.add_quivers("Flux.5.0.{}.vtu".format(n), ax=p.ax1)
p.ax2 = p.fig.add_subplot(gs[1])
p.add_vtu("Kappa.5.1.{}.vtu".format(n), ax=p.ax2)
p.add_quivers("Flux.5.1.{}.vtu".format(n), ax=p.ax2)
p.ax3 = p.fig.add_subplot(gs[2])
p.add_vtu("Pressure.5.0.{}.vtu".format(n), ax=p.ax3)
p.ax4 = p.fig.add_subplot(gs[3])
p.add_vtu("Pressure.5.1.{}.vtu".format(n), ax=p.ax4)
```
%% Output
%% Cell type:code id: tags:
``` python
from mpp.python.mppy.utilities import VtkPlot
from ipywidgets import interact, interactive, fixed, interact_manual
import ipywidgets as widgets
@interact(n=widgets.IntSlider(min=0, max=2, step=1, value=0))
def plot_nth_frame(n):
p = VtkPlot(figsize=(16, 12))
plt.axis('off')
gs = gridspec.GridSpec(2, 2)
p.ax1 = p.fig.add_subplot(gs[0])
p.add_vtu("Kappa.6.0.{}.vtu".format(n), ax=p.ax1)
p.add_quivers("Flux.6.0.{}.vtu".format(n), ax=p.ax1)
p.ax2 = p.fig.add_subplot(gs[1])
p.add_vtu("Kappa.6.1.{}.vtu".format(n), ax=p.ax2)
p.add_quivers("Flux.6.1.{}.vtu".format(n), ax=p.ax2)
p.ax3 = p.fig.add_subplot(gs[2])
p.add_vtu("Pressure.6.0.{}.vtu".format(n), ax=p.ax3)
p.ax4 = p.fig.add_subplot(gs[3])
p.add_vtu("Pressure.6.1.{}.vtu".format(n), ax=p.ax4)
```
%% Output
%% Cell type:markdown id: tags:
## Convergence tests
%% Cell type:code id: tags:
``` python
test_case = True
if test_case:
mpp.kernels = 4
mpp.mute = False
kwargs = {"epsilon": 0.0,
"initLevels": [3, 4, 5, 6, 7],
"initSamples": [100, 100, 100, 100, 100]}
epsilons = [0.1, 0.03, 0.01, 0.003]
else:
mpp.kernels = 32
mpp.mute = True
kwargs = {"epsilon": 0.0,
"initLevels": [3, 4, 5, 6, 7, 8, 9],
"initSamples": [500, 500, 500, 500, 500, 500, 500]}
epsilons = [0.1, 0.03, 0.01, 0.003, 0.001, 0.0003]
mpp.kernels = 32
mpp.mute = False
kwargs = {"epsilon": 0.0,
"initLevels": [3, 4, 5, 6, 7, 8, 9],
"initSamples": [500, 500, 500, 500, 500, 500, 500]}
epsilons = [0.1, 0.03, 0.01, 0.003, 0.001, 0.0003]
```
%% Cell type:markdown id: tags:
### Dependency on $s$
%% Cell type:code id: tags:
``` python
mpp.clean_data()
mpp.reset_data()
smoothings = [1.0, 1.4, 1.8]
for smoothing in smoothings:
kwargs["smoothing"] = smoothing
mpp.run(config="mlmc_elliptic", kwargs=kwargs)
mpp.parse_log()
convergence_plot(mpp)
```
%% Output
================ running mpp ================
start program on 4 procs at Mon May 17 21:42:10 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 7
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.0
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5, 6, 7]
smoothing: ................ 1.0
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [100, 100, 100, 100, 100]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: Non-Adaptive Method
MonteCarlo l=3: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=3: MeanQ=0.578 MeanY=0.578 MeanQcomm=0.578 MeanYcomm=0.578
MonteCarlo l=3: SVarQ=0.0006 SVarY=0.0006 SVarQcomm=0.0006 SVarYcomm=0.0006
MonteCarlo l=3: 0.22 seconds
MonteCarlo l=4: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=4: MeanQ=0.576 MeanY=0.000396 MeanQcomm=0.576 MeanYcomm=0.000396
MonteCarlo l=4: SVarQ=0.000787 SVarY=9.33e-06 SVarQcomm=0.000787 SVarYcomm=9.33e-06
MonteCarlo l=4: 0.63 seconds
MonteCarlo l=5: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=5: MeanQ=0.578 MeanY=0.000295 MeanQcomm=0.578 MeanYcomm=0.000295
MonteCarlo l=5: SVarQ=0.000767 SVarY=7.21e-07 SVarQcomm=0.000767 SVarYcomm=7.21e-07
MonteCarlo l=5: 2.37 seconds
MonteCarlo l=6: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=6: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=6: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=6: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=6: MeanQ=0.583 MeanY=8.71e-05 MeanQcomm=0.583 MeanYcomm=8.71e-05
MonteCarlo l=6: SVarQ=0.000713 SVarY=5.86e-08 SVarQcomm=0.000713 SVarYcomm=5.86e-08
MonteCarlo l=6: 12.68 seconds
MonteCarlo l=7: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=7: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=7: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=7: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=7: MeanQ=0.578 MeanY=1.53e-05 MeanQcomm=0.578 MeanYcomm=1.53e-05
MonteCarlo l=7: SVarQ=0.000743 SVarY=5.82e-09 SVarQcomm=0.000743 SVarYcomm=5.82e-09
MonteCarlo l=7: 3:03.00 minutes
Multilevel Method: 3:19.00 minutes
MultilevelMonteCarlo Experiment: 3:19.00 minutes
Multilevel Results Info:
E(Qf-Qc): ................. [0.578307, 0.000395706, 0.000294877, 8.71071e-05, 1.52505e-05]
E(Qf): .................... [0.578307, 0.57591, 0.577993, 0.582794, 0.577772]
V(Qf-Qc): ................. [0.000599564, 9.33252e-06, 7.20785e-07, 5.86411e-08, 5.81729e-09]
V(Qf): .................... [0.000599564, 0.000786781, 0.000767353, 0.000712759, 0.00074299]
E(cost): .................. [25, 81, 289, 1089, 4225]
Used Levels: .............. [3, 4, 5, 6, 7]
Used Samples: ............. [100, 100, 100, 100, 100]
Exponents Info:
Final alpha: .............. 1.59
Final beta: ............... 3.56
Final gamma: .............. 1.9
Estimator Results Info:
Cost: ..................... 5.71e+03
Value: .................... 0.579
Epsilon: .................. 0
Total Error: .............. 0.00251
Numerical Error: .......... 3.69e-05
Stochastical Error: ....... 0.00247
end program after 3:20.00 minutes on 4 procs at Mon May 17 21:45:30 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:45:30 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 7
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.0
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5, 6, 7]
smoothing: ................ 1.4
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [100, 100, 100, 100, 100]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: Non-Adaptive Method
MonteCarlo l=3: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=3: MeanQ=0.578 MeanY=0.578 MeanQcomm=0.578 MeanYcomm=0.578
MonteCarlo l=3: SVarQ=0.00055 SVarY=0.00055 SVarQcomm=0.00055 SVarYcomm=0.00055
MonteCarlo l=3: 0.33 seconds
MonteCarlo l=4: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=4: MeanQ=0.576 MeanY=0.000328 MeanQcomm=0.576 MeanYcomm=0.000328
MonteCarlo l=4: SVarQ=0.000728 SVarY=9.57e-06 SVarQcomm=0.000728 SVarYcomm=9.57e-06
MonteCarlo l=4: 1.01 seconds
MonteCarlo l=5: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=5: MeanQ=0.579 MeanY=0.000216 MeanQcomm=0.579 MeanYcomm=0.000216
MonteCarlo l=5: SVarQ=0.000715 SVarY=4.41e-07 SVarQcomm=0.000715 SVarYcomm=4.41e-07
MonteCarlo l=5: 4.02 seconds
MonteCarlo l=6: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=6: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=6: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=6: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=6: MeanQ=0.583 MeanY=5.44e-05 MeanQcomm=0.583 MeanYcomm=5.44e-05
MonteCarlo l=6: SVarQ=0.000671 SVarY=3.24e-08 SVarQcomm=0.000671 SVarYcomm=3.24e-08
MonteCarlo l=6: 19.85 seconds
MonteCarlo l=7: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=7: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=7: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=7: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=7: MeanQ=0.578 MeanY=4.18e-06 MeanQcomm=0.578 MeanYcomm=4.18e-06
MonteCarlo l=7: SVarQ=0.000702 SVarY=1.89e-09 SVarQcomm=0.000702 SVarYcomm=1.89e-09
MonteCarlo l=7: 4:03.00 minutes
Multilevel Method: 4:29.00 minutes
MultilevelMonteCarlo Experiment: 4:29.00 minutes
Multilevel Results Info:
E(Qf-Qc): ................. [0.578356, 0.00032828, 0.000216081, 5.44446e-05, 4.18205e-06]
E(Qf): .................... [0.578356, 0.576178, 0.578523, 0.582864, 0.577891]
V(Qf-Qc): ................. [0.000549747, 9.5713e-06, 4.41496e-07, 3.23804e-08, 1.8867e-09]
V(Qf): .................... [0.000549747, 0.000727518, 0.000715004, 0.000671427, 0.000701838]
E(cost): .................. [25, 81, 289, 1089, 4225]
Used Levels: .............. [3, 4, 5, 6, 7]
Used Samples: ............. [100, 100, 100, 100, 100]
Exponents Info:
Final alpha: .............. 2.09
Final beta: ............... 4.07
Final gamma: .............. 1.9
Estimator Results Info:
Cost: ..................... 5.71e+03
Value: .................... 0.579
Epsilon: .................. 0
Total Error: .............. 0.00238
Numerical Error: .......... 1.66e-05
Stochastical Error: ....... 0.00237
end program after 4:29.00 minutes on 4 procs at Mon May 17 21:49:59 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:50:00 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 7
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.0
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5, 6, 7]
smoothing: ................ 1.8
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [100, 100, 100, 100, 100]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: Non-Adaptive Method
MonteCarlo l=3: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=3: MeanQ=0.578 MeanY=0.578 MeanQcomm=0.578 MeanYcomm=0.578
MonteCarlo l=3: SVarQ=0.000515 SVarY=0.000515 SVarQcomm=0.000515 SVarYcomm=0.000515
MonteCarlo l=3: 0.47 seconds
MonteCarlo l=4: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=4: MeanQ=0.576 MeanY=0.000263 MeanQcomm=0.576 MeanYcomm=0.000263
MonteCarlo l=4: SVarQ=0.000691 SVarY=1.06e-05 SVarQcomm=0.000691 SVarYcomm=1.06e-05
MonteCarlo l=4: 1.57 seconds
MonteCarlo l=5: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=5: MeanQ=0.579 MeanY=0.000151 MeanQcomm=0.579 MeanYcomm=0.000151
MonteCarlo l=5: SVarQ=0.000689 SVarY=3.44e-07 SVarQcomm=0.000689 SVarYcomm=3.44e-07
MonteCarlo l=5: 5.84 seconds
MonteCarlo l=6: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=6: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=6: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=6: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=6: MeanQ=0.583 MeanY=3.59e-05 MeanQcomm=0.583 MeanYcomm=3.59e-05
MonteCarlo l=6: SVarQ=0.000646 SVarY=2.5e-08 SVarQcomm=0.000646 SVarYcomm=2.5e-08
MonteCarlo l=6: 52.01 seconds
MonteCarlo l=7: Start with: M=0 dM=100 MComm=0 dMComm=100
MonteCarlo l=7: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=7: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=7: End with: M=100 dM=0 MComm=100 dMComm=0
MonteCarlo l=7: MeanQ=0.578 MeanY=7.77e-08 MeanQcomm=0.578 MeanYcomm=7.77e-08
MonteCarlo l=7: SVarQ=0.000671 SVarY=1.35e-09 SVarQcomm=0.000671 SVarYcomm=1.35e-09
MonteCarlo l=7: 4:04.00 minutes
Multilevel Method: 5:04.00 minutes
MultilevelMonteCarlo Experiment: 5:04.00 minutes
Multilevel Results Info:
E(Qf-Qc): ................. [0.578392, 0.000262824, 0.000151208, 3.58885e-05, 7.7655e-08]
E(Qf): .................... [0.578392, 0.576381, 0.578912, 0.583096, 0.578039]
V(Qf-Qc): ................. [0.000515423, 1.06057e-05, 3.4394e-07, 2.49798e-08, 1.35031e-09]
V(Qf): .................... [0.000515423, 0.000690634, 0.00068941, 0.000645945, 0.000670814]
E(cost): .................. [25, 81, 289, 1089, 4225]
Used Levels: .............. [3, 4, 5, 6, 7]
Used Samples: ............. [100, 100, 100, 100, 100]
Exponents Info:
Final alpha: .............. 3.72
Final beta: ............... 4.26
Final gamma: .............. 1.9
Estimator Results Info:
Cost: ..................... 5.71e+03
Value: .................... 0.579
Epsilon: .................. 0
Total Error: .............. 0.0023
Numerical Error: .......... 3.09e-06
Stochastical Error: ....... 0.00229
end program after 5:04.00 minutes on 4 procs at Mon May 17 21:55:04 2021
%% Cell type:markdown id: tags:
### Dependency on $\sigma$
%% Cell type:code id: tags:
``` python
mpp.clean_data()
mpp.reset_data()
sigmas = [1.0, 1.5, 2.0]
for sigma in sigmas:
kwargs["sigma"] = sigma
mpp.run(config="mlmc_elliptic", kwargs=kwargs)
mpp.parse_log()
convergence_plot(mpp)
```
%% Cell type:markdown id: tags:
### Convergence tests - dependency on $\lambda$
%% Cell type:code id: tags:
``` python
mpp.clean_data()
mpp.reset_data()
lambdas = [0.05, 0.10, 0.15]
for lamb in lambdas:
kwargs["lambda"] = [lamb, lamb]
mpp.run(config="mlmc_elliptic", kwargs=kwargs)
mpp.parse_log()
convergence_plot(mpp)
```
%% Cell type:markdown id: tags:
### Multilevel Monte Carlo - Experiments with $s = 1.4$
%% Cell type:code id: tags:
``` python
mpp.clean_data()
mpp.reset_data()
kwargs={"smoothing": 1.4,
"maxLevel": 10}
for epsilon in epsilons:
kwargs["epsilon"] = epsilon
mpp.run(config="mlmc_elliptic", kwargs=kwargs)
mpp.parse_log()
convergence_plot(mpp)
mlmc_plot(mpp)
```
%% Output
================ running mpp ================
start program on 4 procs at Mon May 17 21:59:21 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.1
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.4
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.100000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: 0.05 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.00101 MeanQcomm=0.575 MeanYcomm=0.00101
MonteCarlo l=4: SVarQ=0.00058 SVarY=3.62e-06 SVarQcomm=0.00058 SVarYcomm=3.62e-06
MonteCarlo l=4: 0.05 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.568 MeanY=0.000131 MeanQcomm=0.568 MeanYcomm=-0.000131
MonteCarlo l=5: SVarQ=0.00239 SVarY=3.29e-08 SVarQcomm=0.00239 SVarYcomm=3.29e-08
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=2.95 beta=6.78 gamma=1.84
Multilevel Method: dM=[-10, -4, -1]
Multilevel Method: numErr=7.5e-05
Multilevel Method: statErr=0.00685
Multilevel Method: 0.17 seconds
MultilevelMonteCarlo Experiment: 0.17 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.589255, 0.0010069, 0.000130532]
E(Qf): .................... [0.589255, 0.574521, 0.567724]
V(Qf-Qc): ................. [0.000556271, 3.61744e-06, 3.28505e-08]
V(Qf): .................... [0.000556271, 0.000580218, 0.00238987]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [12, 6, 3]
Exponents Info:
Final alpha: .............. 2.95
Final beta: ............... 6.78
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 790
Value: .................... 1.18
Epsilon: .................. 0.1
Total Error: .............. 0.00693
Numerical Error: .......... 7.5e-05
Stochastical Error: ....... 0.00685
end program after 0.21 seconds on 4 procs at Mon May 17 21:59:22 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:59:22 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.03
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.4
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.030000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: 0.04 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.00101 MeanQcomm=0.575 MeanYcomm=0.00101
MonteCarlo l=4: SVarQ=0.00058 SVarY=3.62e-06 SVarQcomm=0.00058 SVarYcomm=3.62e-06
MonteCarlo l=4: 0.05 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.568 MeanY=0.000131 MeanQcomm=0.568 MeanYcomm=-0.000131
MonteCarlo l=5: SVarQ=0.00239 SVarY=3.29e-08 SVarQcomm=0.00239 SVarYcomm=3.29e-08
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=2.95 beta=6.78 gamma=1.84
Multilevel Method: dM=[-10, -4, -1]
Multilevel Method: numErr=7.5e-05
Multilevel Method: statErr=0.00685
Multilevel Method: 0.16 seconds
MultilevelMonteCarlo Experiment: 0.16 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.589255, 0.0010069, 0.000130532]
E(Qf): .................... [0.589255, 0.574521, 0.567724]
V(Qf-Qc): ................. [0.000556271, 3.61744e-06, 3.28505e-08]
V(Qf): .................... [0.000556271, 0.000580218, 0.00238987]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [12, 6, 3]
Exponents Info:
Final alpha: .............. 2.95
Final beta: ............... 6.78
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 790
Value: .................... 1.18
Epsilon: .................. 0.03
Total Error: .............. 0.00693
Numerical Error: .......... 7.5e-05
Stochastical Error: ....... 0.00685
end program after 0.20 seconds on 4 procs at Mon May 17 21:59:23 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:59:23 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.01
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.4
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.010000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: 0.05 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.00101 MeanQcomm=0.575 MeanYcomm=0.00101
MonteCarlo l=4: SVarQ=0.00058 SVarY=3.62e-06 SVarQcomm=0.00058 SVarYcomm=3.62e-06
MonteCarlo l=4: 0.06 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.568 MeanY=0.000131 MeanQcomm=0.568 MeanYcomm=-0.000131
MonteCarlo l=5: SVarQ=0.00239 SVarY=3.29e-08 SVarQcomm=0.00239 SVarYcomm=3.29e-08
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=2.95 beta=6.78 gamma=1.84
Multilevel Method: dM=[2, -4, -1]
MonteCarlo l=3: Start with: M=12 dM=2 MComm=12 dMComm=2
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: End with: M=14 dM=0 MComm=14 dMComm=0
MonteCarlo l=3: MeanQ=0.588 MeanY=0.588 MeanQcomm=0.588 MeanYcomm=0.588
MonteCarlo l=3: SVarQ=0.000545 SVarY=0.000545 SVarQcomm=0.000545 SVarYcomm=0.000545
MonteCarlo l=3: 0.01 seconds
Multilevel Method: alpha=2.95 beta=6.78 gamma=1.84
Multilevel Method: dM=[-1, -4, -1]
Multilevel Method: numErr=7.5e-05
Multilevel Method: statErr=0.00629
Multilevel Method: 0.20 seconds
MultilevelMonteCarlo Experiment: 0.20 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.588399, 0.0010069, 0.000130532]
E(Qf): .................... [0.588399, 0.574521, 0.567724]
V(Qf-Qc): ................. [0.000545153, 3.61744e-06, 3.28505e-08]
V(Qf): .................... [0.000545153, 0.000580218, 0.00238987]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [14, 6, 3]
Exponents Info:
Final alpha: .............. 2.95
Final beta: ............... 6.78
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 1.18e+03
Value: .................... 1.77
Epsilon: .................. 0.01
Total Error: .............. 0.00636
Numerical Error: .......... 7.5e-05
Stochastical Error: ....... 0.00629
end program after 0.23 seconds on 4 procs at Mon May 17 21:59:23 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:59:24 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.003
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.4
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.003000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: 0.04 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.00101 MeanQcomm=0.575 MeanYcomm=0.00101
MonteCarlo l=4: SVarQ=0.00058 SVarY=3.62e-06 SVarQcomm=0.00058 SVarYcomm=3.62e-06
MonteCarlo l=4: 0.05 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.568 MeanY=0.000131 MeanQcomm=0.568 MeanYcomm=-0.000131
MonteCarlo l=5: SVarQ=0.00239 SVarY=3.29e-08 SVarQcomm=0.00239 SVarYcomm=3.29e-08
MonteCarlo l=5: 0.10 seconds
Multilevel Method: alpha=2.95 beta=6.78 gamma=1.84
Multilevel Method: dM=[133, 1, -1]
MonteCarlo l=3: Start with: M=12 dM=133 MComm=12 dMComm=133
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000556 SVarY=0.000556 SVarQcomm=0.000556 SVarYcomm=0.000556
MonteCarlo l=3: End with: M=145 dM=0 MComm=145 dMComm=0
MonteCarlo l=3: MeanQ=0.58 MeanY=0.58 MeanQcomm=0.58 MeanYcomm=0.58
MonteCarlo l=3: SVarQ=0.000564 SVarY=0.000564 SVarQcomm=0.000564 SVarYcomm=0.000564
MonteCarlo l=3: 0.22 seconds
MonteCarlo l=4: Start with: M=6 dM=1 MComm=6 dMComm=1
MonteCarlo l=4: MeanQ=0.575 MeanY=0.00101 MeanQcomm=0.575 MeanYcomm=0.00101
MonteCarlo l=4: SVarQ=0.00058 SVarY=3.62e-06 SVarQcomm=0.00058 SVarYcomm=3.62e-06
MonteCarlo l=4: End with: M=7 dM=0 MComm=7 dMComm=0
MonteCarlo l=4: MeanQ=0.572 MeanY=0.000805 MeanQcomm=0.572 MeanYcomm=0.000805
MonteCarlo l=4: SVarQ=0.000547 SVarY=3.3e-06 SVarQcomm=0.000547 SVarYcomm=3.3e-06
MonteCarlo l=4: 0.02 seconds
Multilevel Method: alpha=2.63 beta=6.65 gamma=1.84
Multilevel Method: dM=[1, 0, -1]
MonteCarlo l=3: Start with: M=145 dM=1 MComm=145 dMComm=1
MonteCarlo l=3: MeanQ=0.58 MeanY=0.58 MeanQcomm=0.58 MeanYcomm=0.58
MonteCarlo l=3: SVarQ=0.000564 SVarY=0.000564 SVarQcomm=0.000564 SVarYcomm=0.000564
MonteCarlo l=3: End with: M=146 dM=0 MComm=146 dMComm=0
MonteCarlo l=3: MeanQ=0.58 MeanY=0.58 MeanQcomm=0.58 MeanYcomm=0.58
MonteCarlo l=3: SVarQ=0.000562 SVarY=0.000562 SVarQcomm=0.000562 SVarYcomm=0.000562
MonteCarlo l=3: 0.01 seconds
Multilevel Method: alpha=2.63 beta=6.65 gamma=1.84
Multilevel Method: dM=[0, 0, -1]
Multilevel Method: numErr=7.79e-05
Multilevel Method: statErr=0.00208
Multilevel Method: 0.42 seconds
MultilevelMonteCarlo Experiment: 0.42 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.5796, 0.000805392, 0.000130532]
E(Qf): .................... [0.5796, 0.57152, 0.567724]
V(Qf-Qc): ................. [0.000562129, 3.29876e-06, 3.28505e-08]
V(Qf): .................... [0.000562129, 0.000546552, 0.00238987]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [146, 7, 3]
Exponents Info:
Final alpha: .............. 2.63
Final beta: ............... 6.65
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 1.58e+03
Value: .................... 2.33
Epsilon: .................. 0.003
Total Error: .............. 0.00216
Numerical Error: .......... 7.79e-05
Stochastical Error: ....... 0.00208
end program after 0.46 seconds on 4 procs at Mon May 17 21:59:25 2021
%% Cell type:markdown id: tags:
### Multilevel Monte Carlo - Experiments with $s = 1.8$
%% Cell type:code id: tags:
``` python
mpp.clean_data()
mpp.reset_data()
kwargs={"smoothing": 1.8,
"maxLevel": 10}
for epsilon in epsilons:
kwargs["epsilon"] = epsilon
mpp.run(config="mlmc_elliptic", kwargs=kwargs)
mpp.parse_log()
convergence_plot(mpp)
mlmc_plot(mpp)
```
%% Output
================ running mpp ================
start program on 4 procs at Mon May 17 21:58:39 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.1
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.8
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.100000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000488 SVarY=0.000488 SVarQcomm=0.000488 SVarYcomm=0.000488
MonteCarlo l=3: 0.04 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.000563 MeanQcomm=0.575 MeanYcomm=0.000563
MonteCarlo l=4: SVarQ=0.000538 SVarY=4.46e-06 SVarQcomm=0.000538 SVarYcomm=4.46e-06
MonteCarlo l=4: 0.05 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.567 MeanY=0.00022 MeanQcomm=0.567 MeanYcomm=-0.00022
MonteCarlo l=5: SVarQ=0.00238 SVarY=1.04e-07 SVarQcomm=0.00238 SVarYcomm=1.04e-07
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=1.36 beta=5.43 gamma=1.84
Multilevel Method: dM=[-10, -4, -1]
Multilevel Method: numErr=0.00018
Multilevel Method: statErr=0.00644
Multilevel Method: 0.17 seconds
MultilevelMonteCarlo Experiment: 0.17 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.588754, 0.000562561, 0.000219564]
E(Qf): .................... [0.588754, 0.574628, 0.566813]
V(Qf-Qc): ................. [0.000487613, 4.46305e-06, 1.03643e-07]
V(Qf): .................... [0.000487613, 0.000537707, 0.00238108]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [12, 6, 3]
Exponents Info:
Final alpha: .............. 1.36
Final beta: ............... 5.43
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 790
Value: .................... 1.18
Epsilon: .................. 0.1
Total Error: .............. 0.00662
Numerical Error: .......... 0.00018
Stochastical Error: ....... 0.00644
end program after 0.21 seconds on 4 procs at Mon May 17 21:58:40 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:58:40 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.03
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.8
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.030000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000488 SVarY=0.000488 SVarQcomm=0.000488 SVarYcomm=0.000488
MonteCarlo l=3: 0.04 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.000563 MeanQcomm=0.575 MeanYcomm=0.000563
MonteCarlo l=4: SVarQ=0.000538 SVarY=4.46e-06 SVarQcomm=0.000538 SVarYcomm=4.46e-06
MonteCarlo l=4: 0.05 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.567 MeanY=0.00022 MeanQcomm=0.567 MeanYcomm=-0.00022
MonteCarlo l=5: SVarQ=0.00238 SVarY=1.04e-07 SVarQcomm=0.00238 SVarYcomm=1.04e-07
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=1.36 beta=5.43 gamma=1.84
Multilevel Method: dM=[-10, -4, -1]
Multilevel Method: numErr=0.00018
Multilevel Method: statErr=0.00644
Multilevel Method: 0.17 seconds
MultilevelMonteCarlo Experiment: 0.17 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.588754, 0.000562561, 0.000219564]
E(Qf): .................... [0.588754, 0.574628, 0.566813]
V(Qf-Qc): ................. [0.000487613, 4.46305e-06, 1.03643e-07]
V(Qf): .................... [0.000487613, 0.000537707, 0.00238108]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [12, 6, 3]
Exponents Info:
Final alpha: .............. 1.36
Final beta: ............... 5.43
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 790
Value: .................... 1.18
Epsilon: .................. 0.03
Total Error: .............. 0.00662
Numerical Error: .......... 0.00018
Stochastical Error: ....... 0.00644
end program after 0.20 seconds on 4 procs at Mon May 17 21:58:41 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:58:41 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.01
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.8
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.010000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000488 SVarY=0.000488 SVarQcomm=0.000488 SVarYcomm=0.000488
MonteCarlo l=3: 0.04 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.000563 MeanQcomm=0.575 MeanYcomm=0.000563
MonteCarlo l=4: SVarQ=0.000538 SVarY=4.46e-06 SVarQcomm=0.000538 SVarYcomm=4.46e-06
MonteCarlo l=4: 0.06 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.567 MeanY=0.00022 MeanQcomm=0.567 MeanYcomm=-0.00022
MonteCarlo l=5: SVarQ=0.00238 SVarY=1.04e-07 SVarQcomm=0.00238 SVarYcomm=1.04e-07
MonteCarlo l=5: 0.10 seconds
Multilevel Method: alpha=1.36 beta=5.43 gamma=1.84
Multilevel Method: dM=[0, -4, -1]
Multilevel Method: numErr=0.00018
Multilevel Method: statErr=0.00644
Multilevel Method: 0.20 seconds
MultilevelMonteCarlo Experiment: 0.20 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.588754, 0.000562561, 0.000219564]
E(Qf): .................... [0.588754, 0.574628, 0.566813]
V(Qf-Qc): ................. [0.000487613, 4.46305e-06, 1.03643e-07]
V(Qf): .................... [0.000487613, 0.000537707, 0.00238108]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [12, 6, 3]
Exponents Info:
Final alpha: .............. 1.36
Final beta: ............... 5.43
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 790
Value: .................... 1.18
Epsilon: .................. 0.01
Total Error: .............. 0.00662
Numerical Error: .......... 0.00018
Stochastical Error: ....... 0.00644
end program after 0.23 seconds on 4 procs at Mon May 17 21:58:41 2021
================ running mpp ================
start program on 4 procs at Mon May 17 21:58:42 2021
Running on: niklas-ThinkPad-T470p
Config Info:
GeneratorVerbose: ......... 0
PDESolverVerbose: ......... 0
LinearVerbose: ............ 0
MeshVerbose: .............. 1
MainVerbose: .............. 1
MCVerbose: ................ 1
precision: ................ 3
MLMCVerbose: .............. 1
PDESolverPlotting: ........ 0
lambda: ................... [0.15, 0.15]
Model: .................... LagrangeElliptic
AssembleVerbose: .......... 0
degree: ................... 1
MCParallel: ............... false
maxLevel: ................. 10
Problem: .................. StochasticLaplace2D
StochasticField: .......... LogNormal
epsilon: .................. 0.003
ConfigVerbose: ............ 1
onlyFine: ................. false
Mean: ..................... 0.0
initLevels: ............... [3, 4, 5]
smoothing: ................ 1.8
Quantity: ................. L2
sigma: .................... 1.0
NewtonVerbose: ............ 0
initSamples: .............. [12, 6, 3]
MultilevelMonteCarlo Experiment: Start
Multilevel Method: epsilon=0.003000
MonteCarlo l=3: Start with: M=0 dM=12 MComm=0 dMComm=12
MonteCarlo l=3: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=3: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=3: End with: M=12 dM=0 MComm=12 dMComm=0
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000488 SVarY=0.000488 SVarQcomm=0.000488 SVarYcomm=0.000488
MonteCarlo l=3: 0.08 seconds
MonteCarlo l=4: Start with: M=0 dM=6 MComm=0 dMComm=6
MonteCarlo l=4: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=4: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=4: End with: M=6 dM=0 MComm=6 dMComm=0
MonteCarlo l=4: MeanQ=0.575 MeanY=0.000563 MeanQcomm=0.575 MeanYcomm=0.000563
MonteCarlo l=4: SVarQ=0.000538 SVarY=4.46e-06 SVarQcomm=0.000538 SVarYcomm=4.46e-06
MonteCarlo l=4: 0.06 seconds
MonteCarlo l=5: Start with: M=0 dM=3 MComm=0 dMComm=3
MonteCarlo l=5: MeanQ=0 MeanY=0 MeanQcomm=0 MeanYcomm=0
MonteCarlo l=5: SVarQ=0 SVarY=0 SVarQcomm=0 SVarYcomm=0
MonteCarlo l=5: End with: M=3 dM=0 MComm=3 dMComm=0
MonteCarlo l=5: MeanQ=0.567 MeanY=0.00022 MeanQcomm=0.567 MeanYcomm=-0.00022
MonteCarlo l=5: SVarQ=0.00238 SVarY=1.04e-07 SVarQcomm=0.00238 SVarYcomm=1.04e-07
MonteCarlo l=5: 0.09 seconds
Multilevel Method: alpha=1.36 beta=5.43 gamma=1.84
Multilevel Method: dM=[121, 2, -1]
MonteCarlo l=3: Start with: M=12 dM=121 MComm=12 dMComm=121
MonteCarlo l=3: MeanQ=0.589 MeanY=0.589 MeanQcomm=0.589 MeanYcomm=0.589
MonteCarlo l=3: SVarQ=0.000488 SVarY=0.000488 SVarQcomm=0.000488 SVarYcomm=0.000488
MonteCarlo l=3: End with: M=133 dM=0 MComm=133 dMComm=0
MonteCarlo l=3: MeanQ=0.58 MeanY=0.58 MeanQcomm=0.58 MeanYcomm=0.58
MonteCarlo l=3: SVarQ=0.000487 SVarY=0.000487 SVarQcomm=0.000487 SVarYcomm=0.000487
MonteCarlo l=3: 0.19 seconds
MonteCarlo l=4: Start with: M=6 dM=2 MComm=6 dMComm=2
MonteCarlo l=4: MeanQ=0.575 MeanY=0.000563 MeanQcomm=0.575 MeanYcomm=0.000563
MonteCarlo l=4: SVarQ=0.000538 SVarY=4.46e-06 SVarQcomm=0.000538 SVarYcomm=4.46e-06
MonteCarlo l=4: End with: M=8 dM=0 MComm=8 dMComm=0
MonteCarlo l=4: MeanQ=0.571 MeanY=0.00011 MeanQcomm=0.571 MeanYcomm=0.00011
MonteCarlo l=4: SVarQ=0.000439 SVarY=4.14e-06 SVarQcomm=0.000439 SVarYcomm=4.14e-06
MonteCarlo l=4: 0.02 seconds
Multilevel Method: alpha=-1 beta=5.32 gamma=1.84
Multilevel Method: dM=[-1, -1, -1]
Multilevel Method: numErr=0
Multilevel Method: statErr=0.00205
Multilevel Method: 0.42 seconds
MultilevelMonteCarlo Experiment: 0.42 seconds
Multilevel Results Info:
E(Qf-Qc): ................. [0.580011, 0.000109767, 0.000219564]
E(Qf): .................... [0.580011, 0.570929, 0.566813]
V(Qf-Qc): ................. [0.000487137, 4.14125e-06, 1.03643e-07]
V(Qf): .................... [0.000487137, 0.000439172, 0.00238108]
E(cost): .................. [25, 81, 289]
Used Levels: .............. [3, 4, 5]
Used Samples: ............. [133, 8, 3]
Exponents Info:
Final alpha: .............. -1
Final beta: ............... 5.32
Final gamma: .............. 1.84
Estimator Results Info:
Cost: ..................... 1.18e+03
Value: .................... 1.75
Epsilon: .................. 0.003
Total Error: .............. 0.00205
Numerical Error: .......... 0
Stochastical Error: ....... 0.00205
end program after 0.47 seconds on 4 procs at Mon May 17 21:58:43 2021
%% Cell type:code id: tags:
``` python
```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment