Commit 6c439858 authored by Davide Torlo's avatar Davide Torlo
Browse files

set the reproducibility report with all the notebooks. The supplementary...

set the reproducibility report with all the notebooks. The supplementary material file must be updated
parent ccccd891
MIT License
Copyright (c) 2021 Davide Torlo, Philipp Öffner and Hendrik Ranocha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Stability of Positivity Preserving Patankar-Type Schemes
This repository contains the code for the reproducibility of "A new Stability Approach for Positivity-Preserving Patankar-type Schemes" by D. Torlo, P. Öffner and H. Ranocha.
\ No newline at end of file
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
This repository contains the code for the reproducibility of "A new Stability Approach for Positivity-Preserving Patankar-type Schemes" by D. Torlo, P. Öffner and H. Ranocha [arXiv preprint](https://arxiv.org).
We provide some *Julia* codes and Jupyter notebooks to reproduce the simulations of the paper, some *Mathematica* notebook to reproduce the symbolic computations and the results of the paper, and the supplementary material file with all the results that could not fit in the article.
### Julia codes
In folder [simulations](simulations/) there are:
* the implementations of all the Patankar and modified Patankar schemes ([Patankar Runge--Kutta](simulations/mPRK.jl) and [modified Patankar Deferred Correction](simulations/mPDeC.jl)) and some auxiliary functions ([Lagrange polynomials file](simulations/Lagrange_polynomials.jl))
* the study of the general **linear $2\times 2$ system** searching for the maximum $\Delta t$ bound for which we do not observe oscillations for all the schemes is in the [CFL notebook](simulations/SearchingCFLconditions.ipynb)
* the study of the spurious steady state for all the methods is in the [Inconsistency notebook](simulations/Inconsistency.ipynb)
* the test of the stability bound previously found on **scalar nonlinear problem** is in [Nonlinear Problem notebook](simulations/Nonlinear_Problems.ipynb)
* the test of the inconsistency on **Robertson problem** is in [Robertson notebook](simulations/Robertson_Problem.ipynb)
* the test of the inconsistency on **HIRES problem** is in [HIRES notebook](simulations/Problem_HIRES.ipynb)
### Mathematica notebooks
In folder [symbolic_computations](simbolic_computations/) contains:
* the computations of the $\Delta t$ bound on the general **linear $2\times 2$ system** for the **MPRK(2,2,1)** scheme is in the [MPRK(2,2,1) notebook](simbolic_computations/MPRK_2_2_1_generalSystem.nb)
* the computations of the $\Delta t$ bound and the Taylor expansion to understand which scheme has inconsistency on the **symmetric linear $2\times 2$ system** for some of the **MPRK(2,2,$\alpha$)** schemes is in the [MPRK(2,2,$\alpha$) notebook](simbolic_computations/MPRK_2_2_alpha.nb)
* the Taylor expansion to understand if **MPRK(3,2)** has inconsistency on the **symmetric linear $2\times 2$ system** is in the [MPRK(3,2) notebook](simbolic_computations/MPRK_3_2.nb)
* the Taylor expansion to understand if **mPDeC2** and **mPDeC3** have inconsistencies on the **symmetric linear $2\times 2$ system** is in the [MPDeC notebook](simbolic_computations/MPDeC.nb)
### Supplementary material
In folder [supplementary_material](supplementary_material/) there is the [file](supplementary_material/supplementary_material.pdf) with the supplementary results which are only described in the report
## Disclaimer
Everything is provided as-is and without warranty. Use at your own risk!
This source diff could not be displayed because it is too large. You can view the blob instead.
%% Cell type:code id: tags:
``` julia
ENV["PYCALL_JL_RUNTIME_PYTHON"]="/compute/dtorlo/julia/JuliaVEnv/bin/python3"
```
%%%% Output: execute_result
"/compute/dtorlo/julia/JuliaVEnv/bin/python3"
%% Cell type:code id: tags:
``` julia
using PyPlot; plt=PyPlot
using PyCall
using FastGaussQuadrature, Compat
using LinearAlgebra
# line cyclers adapted to colourblind people
cycler = pyimport("cycler").cycler
line_cycler = (cycler(color=["#E69F00", "#56B4E9", "#009E73", "#0072B2", "#D55E00", "#CC79A7", "#F0E442","#E69F00", "#56B4E9", "#009E73", "#0072B2", "#D55E00", "#CC79A7", "#F0E442"]) +
cycler(linestyle=["-", "--", "-.", ":", "-", "--", "-.", ":","-", "--", "-.", ":", "-", "--"]))
marker_cycler = (cycler(color=["#E69F00", "#56B4E9", "#009E73", "#0072B2", "#D55E00", "#CC79A7", "#F0E442"]) +
cycler(linestyle=["none", "none", "none", "none", "none", "none", "none"]) +
cycler(marker=["4", "2", "3", "1", "+", "x", "."]))
# matplotlib's standard cycler
standard_cycler = cycler("color", ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"])
plt.rc("axes", prop_cycle=line_cycler)
include("mPDeC.jl")
include("mPRK.jl")
function overshootMeasure(u1)
if u1>0.9
return 1.
else
return 0.
end
end
```
%%%% Output: execute_result
overshootMeasure (generic function with 1 method)
%% Cell type:markdown id: tags:
## Fix a 2x2 linear system
$$
\begin{cases}
u_1'= -\theta u_1 + (1-\theta) u_2\\
u_1'= +\theta u_1 - (1-\theta) u_2
\end{cases}
$$
with $\theta = 0.9$.
A general initial condition is
$$
\begin{pmatrix}
u_1^0\\u_2^0
\end{pmatrix}
=\begin{pmatrix}
1-\varepsilon\\\varepsilon
\end{pmatrix}
$$
with $\varepsilon = 10^{-300}$.
Fix the timestep to $\Delta t =1$.
The method is inconsistent if $u^1_2 \approx \varepsilon$ instead of the exact solution $u_2(\Delta t) \approx 0.43$
%% Cell type:code id: tags:
``` julia
θ=0.9
param_a,param_b= (1-θ),θ #10^2, 10^2 # 1, 1 #
function prod_dest(c)
d= length(c)
p=zeros(d,d)
d=zeros(d,d)
p[1,2]=param_a*c[2]
d[2,1]=param_a*c[2]
p[2,1]=param_b*c[1]
d[1,2]=param_b*c[1]
return p, d
end
uInf=[param_a param_b]
function exact_solution(c0,time)
c_exact=zeros(size(c0)[1],size(time)[1])
a=param_a
b=param_b
A= [ -b a; b -a]
for it=1:length(time)
t=time[it]
c_exact[:,it] = c0+(1- exp(-(a+b)*t))/(a+b).*(A*c0)
end
return c_exact
end
function rhs_function(u)
return zeros(length(u))
end
function SIf(c)
#Production terms
d=length(c)
f=zeros(d)
f[1]=param_a*c[2]
f[2]=param_b*c[1]
return f
end
function SIg(c)
#Destruction terms divided by c
d=length(c)
g=zeros(d)
g[1]=param_b
g[2]=param_a
return -g
end
ep=1e-300
u0=[1-ep; ep]
dt=2
tt=0:dt:dt
a=param_a
b=param_b
A= [ -b a; b -a]
u_exact = u0+(1- exp(-(a+b)*dt))/(a+b).*(A*u0)
u_exact
```
%%%% Output: execute_result
2-element Array{Float64,1}:
0.2218017549129514
0.7781982450870486
%% Cell type:markdown id: tags:
#### MPRK22($\alpha$) method for this system
%% Cell type:code id: tags:
``` julia
problem="system2"
folder="Simulations/searchingCFL/Inconsistency"
order=2
mkpath(folder)
folder = string(folder,"system2/")
mkpath(folder)
αs = range(0.5,stop=4,length=36)
l1=length(αs)
AA=zeros(l1)
QQ=zeros(l1)
Threads.@threads for i1=1:l1
α=αs[i1]
print(i1)
AA[i1]=α
try
tout,uu=mPRK22(prod_dest, rhs_function, tt,u0, α)
QQ[i1]= overshootMeasure(uu[1,2])
if isnan(tmp)
QQ[i1]=1.0
end
catch e
QQ[i1]=1.0
end
end
```
%% Cell type:code id: tags:
``` julia
plt.plot(αs[QQ.>0.5],QQ[QQ.>0.5],"rx")
plt.plot(αs[QQ.<0.5],QQ[QQ.<0.5],"go")
plt.xlabel(L"\alpha")
plt.ylabel(L"Inconsistent")
plt.savefig(string(folder,"RK2Inconsistency.pdf"))
```
%%%% Output: display_data
![](data:image/png;base64,iVB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YiRAEAACsRAgCAABWIgQBAAArEYIAAICVCEEAAMBKhCAAAGAlQhAAALASIQgAAFjp/wH5SYl+HJQdbgAAAABJRU5ErkJggg==)
%% Cell type:markdown id: tags:
#### DeC equispaced all orders
%% Cell type:code id: tags:
``` julia
tout,uu=dec_correction(prod_dest, rhs_function, tt,u0, 11,12,"equispaced")
```
%%%% Output: execute_result
(0:2:2, [1.0 1.0000000000000009; 1.0e-300 5.170604644494139e-293])
%% Cell type:code id: tags:
``` julia
distributions=["equispaced","gaussLobatto"]
distrShort=["eq","glb"]
for (idist, dist) in enumerate(distributions)
incons=zeros(30)
print(dist)
open(string(folder,"InconsistencyDeC$(distrShort[idist])AllSystems.tex"), "w") do io
write(io,"Order & Inconsistency \\\\ \\hline \n")
for order=1:30
print("Order $(order) ")
try
tout,uu=dec_correction(prod_dest, rhs_function, tt,u0, max(order-1,1),order,dist)
incons[order]= overshootMeasure(uu[1,2])
if isnan(incons[order])
incons[order]=1.0
end
catch e
incons[order]=1.0
end
println("Order $(order) Inconsistency $(incons[order])")
write(io, " $(order) & $(incons[order]) \\\\ \n")
end
end
end
```
%% Cell type:markdown id: tags:
### MPRKSO(4,3)
%% Cell type:code id: tags:
``` julia
tout,uu=mPRKSO3(prod_dest, rhs_function, tt,u0)
tmp= overshootMeasure(uu[1,2])
print(tmp)
```
%% Cell type:markdown id: tags:
## MPRK(3,2) inspired from a SSPRK(3,3)
%% Cell type:code id: tags:
``` julia
tout,uu=mPRK32(prod_dest, rhs_function, tt,u0)
tmp= overshootMeasure(uu[1,2])
println(tmp)
```
%% Cell type:markdown id: tags:
### MPRKSO22($\alpha$,$\beta$)
%% Cell type:code id: tags:
``` julia
l1=201
l2=201
as=range(0.,stop=0.5,length=l1)
bs=range(0.,stop=10,length=l2)
AA=zeros(l1,l2)
BB=zeros(l1,l2)
QQ=zeros(l1,l2)
Threads.@threads for k=1:l1
print(k)
for j= 1:l2
AA[k,j]=as[k]
BB[k,j]=bs[j]
try
tout,uu=mPRKSO2(prod_dest,rhs_function, tt,u0, as[k],bs[j])
QQ[k,j]= overshootMeasure(uu[1,2])
if isnan(QQ[k,j])
QQ[k,j]=1.0
end
catch e
QQ[k,j]=1.0
end
end
end
```
%% Cell type:code id: tags:
``` julia
nLevels=4
colls=zeros(nLevels,3)
colls[:,1]=[x for x in range(0,stop=1,length=nLevels)]
colls[:,2]=[1-sqrt.(2*x*(1-x)) for x in range(0,stop=1,length=nLevels)]
colls[:,3]=[1-x for x in range(0,stop=1,length=nLevels)]
levels=[0
0.2
0.5
1.1]
#levels=[0
# 0.0005
# 0.001
# range(6,stop=11,length=13)
# 16]
PyPlot.contourf(AA,BB,QQ,levels, colors=colls)
#PyPlot.colorbar()
PyPlot.xlabel(L"\alpha")
PyPlot.ylabel(L"$\beta$")
#PyPlot.title("log10 Variation Lyapunov mPRK3")
PyPlot.savefig(string(folder,"InconsistencyRKSO2.pdf"))
PyPlot.show()
```
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkIAAAG2CAYAAACTTOmSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAiCklEQVR4nO3dfZBV5X3A8d/ytoB1aSQVYeTNxILxJa7QGCANGg2Z1qRi697UlwxOY0ciNRCnVZikBUwig0kJbYymMKmxcTDe2ypxxqSR6QQDRRtfIJP4RpNYpRmJNdHFl3QVPP3D7JaFXdy7e+8959zz+czcP/Zw7+6jR+TLc57nnJYkSZIAACigYWkPAAAgLUIIACgsIQQAFJYQAgAKSwgBAIUlhACAwhJCAEBhCSEAoLCEEABQWEIIACisTIXQ97///fjIRz4SkyZNipaWlti8eXOvX0+SJFatWhWTJk2KMWPGxFlnnRWPPvpoOoMFAHIvUyH0yiuvxLvf/e648cYb+/z1G264IdatWxc33nhjPPjgg3HcccfFBz/4wXjppZcaPFIAoBm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8bjjz8eTz/9dNrDAzJOCAG59s53vjOuu+66+Lu/+7tob2+PiRMnxr333huTJ0+Oc889N+3hARln1xgAUFhmhACAwhJCAEBhCSEAoLCEEABQWEIIACgsIQQAFJYQAgAKSwgBAIUlhACAwhJCAEBhCSEAoLCEEABQWP8Hqg5BwbESdIEAAAAASUVORK5CYII=)
%% Cell type:markdown id: tags:
### MPRK43($\alpha,\beta$)
%% Cell type:code id: tags:
``` julia
l1=201
l2=201
as=range(1/3,stop=3,length=l1)
bs=range(0.28,stop=0.75,length=l2)
AA=zeros(l1,l2)
BB=zeros(l1,l2)
QQ=zeros(l1,l2)
Threads.@threads for k=1:l1
print(k)
for j= 1:l2
AA[k,j]=as[k]
BB[k,j]=bs[j]
try
tout,uu=mPRK3(prod_dest,rhs_function, tt,u0, as[k],bs[j])
QQ[k,j]= overshootMeasure(uu[1,2])
if isnan(QQ[k,j])
QQ[k,j]=1.0
end
catch e
QQ[k,j]=1.0
end
end
end
```
%% Cell type:code id: tags:
``` julia
problem="system2"
folder="Simulations/searchingCFL/Inconsistency"
order=2
mkpath(folder)
folder = string(folder,"system2/")
mkpath(folder)
nLevels=4
colls=zeros(nLevels,3)
colls[:,1]=[x for x in range(0,stop=1,length=nLevels)]
colls[:,2]=[1-sqrt.(2*x*(1-x)) for x in range(0,stop=1,length=nLevels)]
colls[:,3]=[1-x for x in range(0,stop=1,length=nLevels)]
levels=[0
0.2
0.7
1.1]
#levels=[0
# 0.0005
# 0.001
# range(6,stop=11,length=13)
# 16]
PyPlot.contourf(AA,BB,QQ,levels, colors=colls)
#PyPlot.colorbar()
PyPlot.xlabel(L"\alpha")
PyPlot.ylabel(L"$\beta$")
#PyPlot.title("log10 Variation Lyapunov mPRK3")
PyPlot.savefig(string(folder,"InconsistencyRK43.pdf"))
PyPlot.show()
println(maximum(QQ))
```
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkYAAAGwCAYAAABM/qr1AAAAOXRFWHRTb2Z0d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+t8NW3KFHQwAFIAwoptcpK8FqRdHAAw/3koDAEiEEQBAIowAABJhBACQCCMAgEQYAQAkwggAIBFGAACJMAIASIQRAEAijAAAEmFEr3LRELn6hkIPAwAGlDDijMQRAMONMAIASIQRAEAijAAAEmEEAJAIIwCARBgBACTCCAAgEUYAAIkwAgBIhBEAQCKMeF++FgSA4WJUoQdAcctFiqL6iIYtucIOBgD6WdHNGK1bty4mT54c5eXlUV1dHbt27Trr9u3t7bFy5cqYOHFilJWVxTXXXBOPP/74AI12+PCFsgAMB0U1Y7R58+ZYtmxZrFu3LubMmRPf+c53Yv78+XHgwIG46qqret2nvr4+3nzzzdi4cWNce+21cfTo0Xj33XcHeOQAwFBQVGG0Zs2auPvuu2Px4sUREbF27dr4p3/6p1i/fn2sXr26x/b/+I//GDt27IhXX301LrvssoiImDRp0kAOGQAYQormrbQTJ07Evn37oq6urtv6urq62LNnT6/7/PCHP4yampp45JFH4sMf/nB85CMfifvvvz9+85vfnPF12tvbo62trdsCABBRRDNGx44di46OjqisrOy2vrKyMo4cOdLrPq+++mrs3r07ysvL4+mnn45jx47F0qVL45e//OUZrzNavXp1PPTQQ3kfPwAw+BXNjFGnkpKSbo+zLOuxrtOpU6eipKQknnzyybjhhhvi1ltvjTVr1sSmTZvOOGu0YsWKaG1t7VoOHTqU998BABicimbGaNy4cTFy5Mges0NHjx7tMYvUafz48fHhD384KioqutZNmzYtsiyL119/Pa677roe+5SVlUVZWVl+Bw8ADAlFM2NUWloa1dXV0djY2G19Y2NjzJ49u9d95syZE2+88Ub8+te/7lr38ssvx4gRI2LChAn9Ol4AYOgpmjCKiFi+fHl897vfjccffzxefPHF+OpXvxrNzc2xZMmSiDj9NtjnP//5ru3vvPPOuPzyy+PP/uzP4sCBA7Fz5874i7/4i/jiF78YF110UaF+DQBgkCqat9IiIhYuXBjHjx+PVatWRUtLS8yYMSO2b98eEydOjIiIlpaWaG5u7tr+kksuicbGxrjvvvuipqYmLr/88qivr4+HH364UL8CADCIFVUY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3/1V3HHHXf0um1ZWVmUlZXlZ9AAwJBSNDNGpaWlUV1dHY2Njd3WNzY2xuzZs/v8PFmWRXt7e76HR4Hl6htceA1AvyuaGaOIiOXLl8eiRYuipqYmamtrY8OGDdHc3BxLliyJiNNvgx0+fDieeOKJiIj41re+FVdddVVMnTo1Ik7f1+jRRx+N++67r2C/A/1HFAHQ34oqjBYuXBjHjx+PVatWRUtLS8yYMSO2b98eEydOjIiIlpaWaG5u7tr+1KlTsWLFinjttddi1KhRcc0118Q3vvGNuOeeewr1KwAAg1hR3ceoENzHqLh13scowowRAP9vyN/HCACg0IQRRa1zlshsEQADQRhR9EQRAANFGAEAJMIIACARRgAAiTACAEiEEQBAUlR3vi6Ezvtb/ubkyQKPBADoq87/b+f7PtXD/s7Xr7/+elRVVRV6GADAefj5z38eV199dd6eb9iH0alTp+KNN96ISy+9NEpKSgb0tdva2qKqqioOHTqU19uZc2aO+cBzzAeeYz7wHPOB19raGldddVX86le/ig984AN5e95h/1baiBEjYsKECQUdw9ixY/2HNMAc84HnmA88x3zgOeYDb8SI/F4u7eJrAIBEGAEAJMKogMrKyuLBBx+MsrKyQg9l2HDMB55jPvAc84HnmA+8/jrmw/7iawCATmaMAAASYQQAkAgjAIBEGAEAJMKon61bty4mT54c5eXlUV1dHbt27Trjti+88EKUlJT0WA4ePDiAIx7cdu7cGX/0R38UV155ZZSUlMS2bdved58dO3ZEdXV1lJeXx9VXXx3f/va3+3+gQ8i5HnPn+YVZvXp1/N7v/V5ceumlccUVV8SCBQvipZdeet/9nOfn73yOufP8wqxfvz5mzpzZdcPM2traePbZZ8+6T77OcWHUjzZv3hzLli2LlStXRlNTU8ydOzfmz58fzc3NZ93vpZdeipaWlq7luuuuG6ARD35vv/12fOxjH4u//du/7dP2r732Wtx6660xd+7caGpqiq9//evxla98JbZu3drPIx06zvWYd3Ken58dO3bEl7/85fjxj38cjY2N8e6770ZdXV28/fbbZ9zHeX5hzueYd3Ken58JEybEN77xjdi7d2/s3bs3br755v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fnH31q1/NDhw4kG3cuDEbPXp09g//8A+F+hUGnXM95s7zC/OlL30pq6ioyF544YWspaWla3nnnXe6tnGe59f5HHPn+YVZsWJFtnPnzuy1117LfvKTn2Rf//rXsxEjRmTPPfdclmX9e44Lo372rW99K5s4cWJWWlqaXX/99d0+3nnXXXdln/rUp7oe/83f/E12zTXXZOXl5dkHP/jB7BOf+ET2zDPPFGDUg1fnR2Tfu9x1111ZlvU85lmWZS+88EI2a9asrLS0NJs0aVK2fv36gR/4IHaux9x5fmF6O9YRkX3ve9/r2sZ5nl/nc8yd5xfmi1/8Ytf/O3/nd34nmzdvXlcUZVn/nuMlWZauTgIAGOZcYwQAkAgjAIBEGAEAJMIIACARRgAAiTACAEiEEQBAIowAABJhBACQCCMAgEQYAQAkwggYkv7t3/4tfv/3fz8uuuiimDp1avz7v/97bNiwIf74j/+40EMDipgvkQWGnB//+MfxB3/wB/Hggw/GZz/72fjLv/zLaG9vj5dffjm2bNkSs2bNKvQQgSIljIAhZ/bs2XH11VfH97///YiI2LJlS9xxxx3xmc98Jp566qkCjw4oZt5KA4aU119/PX70ox/Fl770pa51paWlkWVZPPTQQwUcGTAYCCNgSHnxxRcjIqKmpqZr3UsvvRQ33HBDfPSjHy3UsIBBQhgBQ0pra2uMHDmy6/Evf/nLeOSRR6KsrKyAowIGC2EEDCkf//jHo6OjIx555JE4ePBg3HHHHTFx4sR48cUX4xe/+EWhhwcUOWEEDCnXXnttrFq1Kh577LGYNWtWjB8/Pp577rmoqqqKW265pdDDA4qcT6UBACRmjAAAEmEEAJAIIwCARBgBACTCCAAgEUYAAIkwAgBIhBEAQCKMAAASYQQAkAgjAIDk/wAprAcnB72OkAAAAABJRU5ErkJggg==)
%% Cell type:markdown id: tags:
#### MPRK(4,3,$\alpha,\beta$) on the purple line of the original paper
%% Cell type:code id: tags:
``` julia
problem="system2"
folder="Simulations/searchingCFL/Inconsistency"
order=3
mkpath(folder)
folder = string(folder,"system2/")
mkpath(folder)
αs = range(0.89255,stop=10,length=100)
βs= max.(3*αs.*(1 .-αs),(3*αs.-2.)./(6*αs.-3.))
l1=length(αs)
AA=zeros(l1)
QQ=zeros(l1)
Threads.@threads for i1=1:l1
α=αs[i1]
print(i1)
AA[i1]=α
try
tout,uu=mPRK3(prod_dest, rhs_function, tt,u0, α,β)
QQ[i1]= overshootMeasure(uu[1,2])
if isnan(tmp)
QQ[i1]=1.0
end
catch e
QQ[i1]=1.0
end
end
```
%% Cell type:code id: tags:
``` julia
plt.plot(αs[QQ.>0.5],QQ[QQ.>0.5],"rx")
plt.plot(αs[QQ.<0.5],QQ[QQ.<0.5],"go")
plt.xlabel(L"\alpha")
plt.ylabel(L"Inconsistent")
plt.savefig(string(folder,"RK43purpleInconsistency.pdf"))
```
%%%% Output: display_data
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkEAAAGwCAYAAACuIrGMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAA9hAAAPYQGoP6dpAAApQUlEQVR4nO3df1yV9cH/8ffxgAfcgPljoiSgIhOXCQjN8EfN5TRNymz30pbh7nve0W0lsppSNksnGJrVZuq03Gr9sJbarOhO75X4s6Ek2pRJ3ingD26zH+coJipc3z/8ehZDDY7ncEGf1/PxOA+7Pnyu67wvj4+u9+P6cXBYlmUJAADAMG3sDgAAAGAHShAAADASJQgAABiJEgQAAIxECQIAAEaiBAEAACNRggAAgJGC7A7QUtXV1enw4cMKCwuTw+GwOw4AAGgEy7J0/PhxRUVFqU2bS5/roQRdxOHDhxUdHW13DAAA4IPKykp169btknMoQRcRFhYm6dxfYnh4uM1pAABAY3g8HkVHR3uP45dCCbqI85fAwsPDKUEAALQyjbmVhRujAQCAkShBAADASJQgAABgJEoQAAAwEiUIAAAYiRIEAACMRAkCAABGogQBAAAjUYIAAICRKEEAAMBIlCAAAGAkShAAADASJQgAABiJEgQAAIxECQ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RUVVdXN3pbJ06c0L59+yRJycnJWrBggYYOHaoOHTooJiZGOTk5OnTokJ5//nlJ0v79+9W3b1/dddddmjRpkrZu3arMzEy9/PLLuvXWWyVJW7Zs0bXXXqs5c+bo5ptv1l/+8hfNmDFDmzZt0oABAxqVy+PxKCIiQm63W+Hh4U38G7oAvieIjGQkIxnJSMaAf09Qk47fvpxqqqurs37zm99Y1157rTV//nzv+HPPPdfg8fWv895771lSwxuSMzIyLMuyrIyMDOu6666rt8769eut5ORkq23btlb37t2txYsXN9jun//8Z6t3795WcHCwlZCQYK1cubJJuQJyOQwAAARUU47fPp0Juph58+bp1KlTetiOm5v8zO9nggAAQMA15fjt09Nh27Zt0/Tp0/XJJ5+oV69eSkpKUlJSkm677TZ+gSoAAGgVfLoxesKECXI6ncrMzFTPnj1VWFion//85+revbs6duzo74wAAAB+59OZoMrKSr311luKi4urN15eXq6SkhJ/5AIAAAgon0pQWlqaDh482KAExcbGKjY21i/BAAAAAsmny2HZ2dmaPXu2PvvsM3/nAQAAaBY+nQkaPXq0HA6H4uPjlZ6errS0NCUnJysxMVEul8vfGQEAAPzOpxL00UcfaefOnd7X3LlzVV5erqCgICUkJGjXrl3+zgkAAOBXPpWguLg4xcXFaezYsd4xj8ejkpISChAAAGgV/Pplid8kfFkiAACtT1OO3z7dGH327FnNmTNHaWlp6t+/vzIyMrR27VqfwgIAANjBpxI0ffp0LVq0SCNGjNBPfvIT1dbW6qabblJGRoY4sQQAAFoDny6HRUVF6ZVXXtGQIUO8YxUVFRo1apQyMjL0wAMP+DWkHbgcBgBA6xPwy2HV1dW64oor6o3FxMTot7/9rZYuXerLJgEAAJqVTyVo8ODBeu655xqM9+jRQ0eOHLnsUAAAAIHm0yPyjz32mAYNGqTPP/9c9957r+Lj43XmzBn97ne/05VXXunvjAAAAH7n05mgvn37av369dq6dat69+6tkJAQtWvXTi+++KKeeuopf2cEAADwO5/OBElScnKytm3bpr1792r37t0KCwvTgAEDuIkYAAC0Cj6VoE2bNiksL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NnTpVp06dCtQuAACAVibI7gCvvPKKsrKytGjRIg0aNEi///3vNXLkSO3Zs0cxMTEN5i9evFg5OTlatmyZrr76ahUVFWnSpElq37690tPTJUkvvviipk+fruXLl2vgwIEqKyvTxIkTJUlPPPFEc+4eAABooRyWZVl2BhgwYID69++vxYsXe8f69OmjMWPGKC8vr8H8gQMHatCgQZo3b553LCsrS9u3b9emTZskSffcc49KS0v117/+1Tvnl7/8pYqKir72LNN5Ho9HERERcrvdCg8P93X3AABAM2rK8dvWy2GnT59WcXGxhg8fXm98+PDh2rJlywXXqampUUhISL2x0NBQFRUV6cyZM5KkwYMHq7i4WEVFRZKkjz/+WAUFBbrxxhsvmqWmpkYej6feCwAAfHPZWoKOHTum2tpaRUZG1huPjIxUVVXVBdcZMWKEnnnmGRUXF8uyLG3fvl3Lly/XmTNndOzYMUnSuHHjNHv2bA0ePFjBwcGKi4vT0KFDNX369ItmycvLU0REhPcVHR3tvx0FAAAtTou4MdrhcNRbtiyrwdh5Dz/8sEaOHKlrrrlGwcHBuvnmm733+zidTknS+vXrNWfOHC1atEgffPCBVq1apTfffFOzZ8++aIacnBy53W7vq7Ky0j87BwAAWiRbS1CnTp3kdDobnPU5evRog7ND54WGhmr58uU6efKkDhw4oIqKCnXv3l1hYWHq1KmTpHNFacKECfrFL36hq666Srfccotyc3OVl5enurq6C27X5XIpPDy83gsAAHxz2VqC2rZtq5SUFK1bt67e+Lp16zRw4MBLrhscHKxu3brJ6XRqxYoVGj16tNq0Obc7J0+e9P73eU6nU5Zlyeb7wAEAQAth+yPy2dnZmjBhglJTU5WWlqalS5eqoqJCmZmZks5dpjp06JD3u4DKyspUVFSkAQMG6PPPP9eCBQv097//Xc8995x3m+np6VqwYIGSk5M1YMAA7du3Tw8//LBuuukm7yUzAABgNttL0G233aZPP/1Us2bN0pEjR9S3b18VFBQoNjZWknTkyBFVVFR459fW1urxxx/X3r17FRwcrKFDh2rLli3q3r27d86MGTPkcDg0Y8YMHTp0SN/97neVnp6uO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QCMkJSUpNraWuXn5+sf//iHxo8fr9jYWJWWlqq8vNzueABsQAkCYIRevXpp1qxZeuqpp5ScnKyuXbtq7dq1io6O1rBhw+yOB8AGPB0GAACMxJkgAABgJEoQAAAwEiUIAAAYiRIEAACMRAkCAABGogQBAAAjUYIAAICRKEEAAMBIlCAAAGAkShAAADASJQgAABjp/wGrFjuD5u++FwAAAABJRU5ErkJggg==)
%% Cell type:markdown id: tags:
### Semi implicit RK methods 2 and 3 Chertok Cui Kurganov Wu
%% Cell type:code id: tags:
``` julia
tout,uu=SIRK2(SIf,SIg, tt,u0)
tmp= overshootMeasure(uu[1,2])
println(" SIRK2 inconsistency $(tmp)")
tout,uu=SIRK3(SIf,SIg, tt,u0)
tmp= overshootMeasure(uu[1,2])
println(" SIRK3 inconsistency $(tmp)")
```
using SymPy
function generate_poly(s, nodes,deg)
#Generates Lagrangian polynomial in symbolic
aux=[]
phi=[]
for k=1:deg+1
append!(aux, 1);
for j=1:deg+1
if j != k
aux[k]=aux[k].*(s-nodes[j]);
end
end
end
for j=1:deg+1
aux[j]= aux[j]/SymPy.N(subs(aux[j],s,nodes[j]));
end
return aux
end
function compute_theta(nodes)
# Compute the integral of lagrange polynomials from 0 to interpolation point theta[r,m]= \int_{t^0}^{t^m} \phi_r
s=Sym("s");
deg=length(nodes)-1;
poly=generate_poly(s,nodes,deg)
theta=zeros(deg+1, deg+1)
for r=1:deg+1
for m=1:deg+1
theta[r,m]=integrate(poly[r],(s,0,nodes[m]))
end
end
return theta