Commit 6312d7fa by niklas.baumgarten

### Setup comparison notebook and geo file

parent 5d272a9f
 POINTS: 0 0 3 0 3 3 0 3 CELLS: 3 1 0 1 3 3 1 1 2 3 FACES: 2 1 0 1 2 1 1 2 2 1 2 3 2 1 3 0
 %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: # Comparison MLMC and SG # Comparison MLMC and SG %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: The aim of this project is to compare Multilevel MC methods with intrusive methods. We investigate an uncertain advection equation The aim of this project is to compare Multilevel MC methods with intrusive methods. We investigate an uncertain advection equation \begin{align} \begin{align} \partial_t u + \Omega \cdot \nabla u = 0 \partial_t u + \Omega \cdot \nabla u = 0 \end{align} \end{align} Here, \$\Omega=\frac{1}{\sqrt{2}}(1,1)^T\$, i.e. \$\Omega\$ is the unit vector into the upper right direction. The initial condition is Here, \$\Omega=\frac{1}{\sqrt{2}}(1,1)^T\$, i.e. \$\Omega\$ is the unit vector into the upper right direction. The initial condition is \begin{align} \begin{align} u(t=0, x, \xi) = \frac{1}{4 \pi \cdot 0.01} \exp \left( - \frac{\Vert x - x_C(\xi) \Vert^2}{4 \cdot 0.01} \right) u(t=0, x, \xi) = \frac{1}{4 \pi \cdot 0.01} \exp \left( - \frac{\Vert x - x_C(\xi) \Vert^2}{4 \cdot 0.01} \right) \end{align} \end{align} The center point \$x_C\$ is unvertain and has the form The center point \$x_C\$ is unvertain and has the form \begin{align} \begin{align} x_c(\xi) = \begin{pmatrix} 0.75 \\ 0.75 \end{pmatrix} + \sigma \xi \cdot \begin{pmatrix} 1 \\ 1 \end{pmatrix} x_c(\xi) = \begin{pmatrix} 0.75 \\ 0.75 \end{pmatrix} + \sigma \xi \cdot \begin{pmatrix} 1 \\ 1 \end{pmatrix} \end{align} \end{align} We choose \$\sigma = 0.1\$ and the random variable \$\xi\$ is uniformly distributed in \$[−1, 1]\$. The final time at which we investigate the solution is \$t_{\text{end}} = 2.0\$ and the spatial domain \$D\$ is given by \$D = [0, 3] \times [0, 3]\$. We choose \$\sigma = 0.1\$ and the random variable \$\xi\$ is uniformly distributed in \$[−1, 1]\$. The final time at which we investigate the solution is \$t_{\text{end}} = 2.0\$ and the spatial domain \$D\$ is given by \$D = [0, 3] \times [0, 3]\$. %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: ### First SG Results ### First SG Results %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: Figures 1 and 2 show first results and give a first impression of the solution. Figures 1 and 2 show first results and give a first impression of the solution. The results have been computed with stochastic-Galerkin (SG) using 6 moments. Note that since The results have been computed with stochastic-Galerkin (SG) on 92544 triangular cells using 6 moments. Note that since the equation is linear, the SG solution will be equivalent to the stochastic-Collocation solution. the equation is linear, the SG solution will be equivalent to the stochastic-Collocation solution. 92544 Zellen %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: %% Cell type:markdown id: tags: ### First MLMC Results ### First MLMC Results %% Cell type:code id: tags: %% Cell type:code id: tags: ``` python ``` python import sys import sys sys.path.append('..') sys.path.append('..') from python.mlmc_mppy import mpp from python.mlmc_mppy import mpp from mpp.python.vtk_utilities import * from mpp.python.vtk_utilities import * import pandas as pd import pandas as pd mpp.mute = False mpp.mute = False mpp.build() mpp.build() mpp.executable = "MLMC-M++" mpp.executable = "MLMC-M++" ``` ``` %%%% Output: stream ================ build sprng5 ================ -- libsprng.a found. ================ running cmake ================ -- Setting prepare commit message hook to mpp file: /home/niklas/CLionProjects/mlmc/mpp/doc/../../.git/modules/mpp/hooks/prepare-commit-msg -- C++ version= 17 -- Compiler version= c++ -- Compiler optimization= -O0 -- A library with LAPACK API found. -- Using SuperLU 4.0 -- Time independent problem -- 2 dimensional problem -- Only affine linear transformations -- Geometric tolerance= 1e-10 -- is near zero= 1e-15 -- very large= 1e30 -- infinity= 1e100 -- Configuring done -- Generating done -- Build files have been written to: /home/niklas/CLionProjects/mlmc/build ================ running make ================ [ 3%] Built target LIB_PS [ 5%] Built target gtest [ 7%] Built target gtest_main Scanning dependencies of target MLMC [ 9%] Built target gmock [ 9%] Building CXX object mlmc/src/CMakeFiles/MLMC.dir/main/MainProgram.cpp.o [ 77%] Built target SRC [ 78%] Built target gmock_main [ 78%] Linking CXX static library libMLMC.a [ 92%] Built target MLMC [ 93%] Linking CXX executable MLMC-M++ [ 94%] Linking CXX executable BenchmarkTransportResults [ 96%] Linking CXX executable BenchmarkEllipticResults [ 96%] Linking CXX executable TestMainProgram [ 97%] Built target BenchmarkTransportResults [ 98%] Linking CXX executable TestMultilevelPlotter [ 98%] Built target TestMultilevelPlotter [ 99%] Built target MLMC-M++ [100%] Built target TestMainProgram [100%] Built target BenchmarkEllipticResults %% Cell type:code id: tags: %% Cell type:code id: tags: ``` python ``` python mpp.reset_data() mpp.reset_data() mpp.clean_data() mpp.clean_data() mpp.run(4, config="mlmc_vs_sg") mpp.run(4, config="mlmc_vs_sg") ``` ``` %%%% Output: stream ================ running mpp ================ [1;31mError: Assembling for Problem=StochasticInitialConditions2D with Model=DGTransport not implemented [0m on proc 3 in /home/niklas/CLionProjects/mlmc/mlmc/src/main/MainProgram.cpp on line 199 [1;31mError: Assembling for Problem=StochasticInitialConditions2D with Model=DGTransport not implemented [0m on proc 0 in /home/niklas/CLionProjects/mlmc/mlmc/src/main/MainProgram.cpp on line 199 [1;31mError: Assembling for Problem=StochasticInitialConditions2D with Model=DGTransport not implemented [0m on proc 1 in /home/niklas/CLionProjects/mlmc/mlmc/src/main/MainProgram.cpp on line 199 [1;31mError: Assembling for Problem=StochasticInitialConditions2D with Model=DGTransport not implemented [0m on proc 2 in /home/niklas/CLionProjects/mlmc/mlmc/src/main/MainProgram.cpp on line 199 -------------------------------------------------------------------------- Primary job terminated normally, but 1 process returned a non-zero exit code. Per user-direction, the job has been aborted. -------------------------------------------------------------------------- -------------------------------------------------------------------------- mpirun detected that one or more processes exited with non-zero status, thus causing the job to be terminated. The first process to do so was: Process name: [[6777,1],0] Exit code: 1 -------------------------------------------------------------------------- %%%% Output: execute_result 1 %% Cell type:code id: tags: %% Cell type:code id: tags: ``` python ``` python mpp.parse_log() mpp.parse_log() mpp.show_convergence_results() mpp.show_convergence_results() mpp.show_mlmc_results() mpp.show_mlmc_results() ``` ``` ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!