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.
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\"/compute/dtorlo/julia/JuliaVEnv/bin/python3\""
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ENV[\"PYCALL_JL_RUNTIME_PYTHON\"]=\"/compute/dtorlo/julia/JuliaVEnv/bin/python3\""
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"overshootMeasure (generic function with 1 method)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"using PyPlot; plt=PyPlot\n",
"using PyCall\n",
"using FastGaussQuadrature, Compat\n",
"using LinearAlgebra\n",
"\n",
"# line cyclers adapted to colourblind people\n",
"cycler = pyimport(\"cycler\").cycler\n",
"line_cycler = (cycler(color=[\"#E69F00\", \"#56B4E9\", \"#009E73\", \"#0072B2\", \"#D55E00\", \"#CC79A7\", \"#F0E442\",\"#E69F00\", \"#56B4E9\", \"#009E73\", \"#0072B2\", \"#D55E00\", \"#CC79A7\", \"#F0E442\"]) +\n",
" cycler(linestyle=[\"-\", \"--\", \"-.\", \":\", \"-\", \"--\", \"-.\", \":\",\"-\", \"--\", \"-.\", \":\", \"-\", \"--\"]))\n",
"marker_cycler = (cycler(color=[\"#E69F00\", \"#56B4E9\", \"#009E73\", \"#0072B2\", \"#D55E00\", \"#CC79A7\", \"#F0E442\"]) +\n",
" cycler(linestyle=[\"none\", \"none\", \"none\", \"none\", \"none\", \"none\", \"none\"]) +\n",
" cycler(marker=[\"4\", \"2\", \"3\", \"1\", \"+\", \"x\", \".\"]))\n",
"\n",
"# matplotlib's standard cycler\n",
"standard_cycler = cycler(\"color\", [\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\", \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"])\n",
"\n",
"plt.rc(\"axes\", prop_cycle=line_cycler)\n",
"\n",
"include(\"mPDeC.jl\")\n",
"include(\"mPRK.jl\")\n",
"\n",
"function overshootMeasure(u1)\n",
" if u1>0.9\n",
" return 1.\n",
" else\n",
" return 0.\n",
" end\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Fix a 2x2 linear system\n",
"$$\n",
"\\begin{cases}\n",
"u_1'= -\\theta u_1 + (1-\\theta) u_2\\\\\n",
"u_1'= +\\theta u_1 - (1-\\theta) u_2\n",
"\\end{cases}\n",
"$$\n",
"with $\\theta = 0.9$.\n",
"\n",
"\n",
"A general initial condition is\n",
"$$\n",
"\\begin{pmatrix}\n",
"u_1^0\\\\u_2^0\n",
"\\end{pmatrix}\n",
"=\\begin{pmatrix}\n",
"1-\\varepsilon\\\\\\varepsilon\n",
"\\end{pmatrix}\n",
"$$\n",
"with $\\varepsilon = 10^{-300}$.\n",
"\n",
"Fix the timestep to $\\Delta t =1$.\n",
"\n",
"The method is inconsistent if $u^1_2 \\approx \\varepsilon$ instead of the exact solution $u_2(\\Delta t) \\approx 0.43$\n"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2-element Array{Float64,1}:\n",
" 0.2218017549129514\n",
" 0.7781982450870486"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"θ=0.9\n",
"\n",
"param_a,param_b= (1-θ),θ #10^2, 10^2 # 1, 1 # \n",
"function prod_dest(c)\n",
" d= length(c)\n",
" p=zeros(d,d)\n",
" d=zeros(d,d)\n",
" p[1,2]=param_a*c[2]\n",
" d[2,1]=param_a*c[2]\n",
" p[2,1]=param_b*c[1]\n",
" d[1,2]=param_b*c[1]\n",
" return p, d\n",
"end\n",
"\n",
"uInf=[param_a param_b]\n",
"\n",
"function exact_solution(c0,time)\n",
" c_exact=zeros(size(c0)[1],size(time)[1])\n",
" a=param_a\n",
" b=param_b\n",
" A= [ -b a; b -a]\n",
" for it=1:length(time)\n",
" t=time[it]\n",
" c_exact[:,it] = c0+(1- exp(-(a+b)*t))/(a+b).*(A*c0)\n",
" end\n",
" return c_exact\n",
"end\n",
"function rhs_function(u)\n",
" return zeros(length(u))\n",
"end\n",
"\n",
"function SIf(c)\n",
" #Production terms\n",
" d=length(c)\n",
" f=zeros(d)\n",
" f[1]=param_a*c[2]\n",
" f[2]=param_b*c[1]\n",
" return f\n",
"end\n",
"function SIg(c)\n",
" #Destruction terms divided by c\n",
" d=length(c)\n",
" g=zeros(d)\n",
" g[1]=param_b\n",
" g[2]=param_a\n",
" return -g\n",
"end\n",
"ep=1e-300\n",
"u0=[1-ep; ep]\n",
"dt=2\n",
"tt=0:dt:dt\n",
"\n",
" a=param_a\n",
" b=param_b\n",
" A= [ -b a; b -a]\n",
"u_exact = u0+(1- exp(-(a+b)*dt))/(a+b).*(A*u0)\n",
"u_exact"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### MPRK22($\\alpha$) method for this system"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"291633212511612223032331244325262728171218192013141534735368910"
]
}
],
"source": [
"problem=\"system2\"\n",
"folder=\"Simulations/searchingCFL/Inconsistency\"\n",
"order=2\n",
"mkpath(folder)\n",
"folder = string(folder,\"system2/\")\n",
"mkpath(folder)\n",
"\n",
"αs = range(0.5,stop=4,length=36)\n",
"\n",
"l1=length(αs)\n",
"\n",
"AA=zeros(l1)\n",
"QQ=zeros(l1)\n",
"Threads.@threads for i1=1:l1\n",
" α=αs[i1]\n",
" print(i1)\n",
" AA[i1]=α\n",
"\n",
" try\n",
" tout,uu=mPRK22(prod_dest, rhs_function, tt,u0, α)\n",
" QQ[i1]= overshootMeasure(uu[1,2])\n",
" if isnan(tmp)\n",
" QQ[i1]=1.0\n",
" end\n",
" catch e\n",
" QQ[i1]=1.0\n",
" end\n",
"end\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkEAAAGwCAYAAACuIrGMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIH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pz1OX36dJOzQ9d07NhReXl5On/+vI4dO6bKykr17NlTnTp1Urdu3SRdDUqTJk3Sj370I33jG9/Qt7/9bS1cuFC5ubm6cuVKs9sNCwtTREREowcAAAhcPg1BoaGhSk1NVX5+fqPx/Px8DR069Ia1ISEh6tGjh4KCgrRhwwaNGzdOHTpcXc758+dd//uaoKAgGWPk4/vAAQCAn/D5V+Rnz56tSZMmadCgQUpLS9PatWtVWVmp7OxsSVcvU504ccL1W0CHDx9WUVGRBg8erM8++0zLli3TBx98oBdffNG1zczMTC1btkwpKSkaPHiwjh49qqeeekr33Xef65IZAACwm89D0P33369PPvlE8+bN06lTp9SvXz9t3bpVcXFxkqRTp06psrLSNb+hoUHPPvusysrKFBISohEjRmjPnj3q2bOna86TTz4ph8OhJ598UidOnNDNN9+szMxMLViwoK2XBwAA/JTPfyfIX/E7QQAAtD/t5neCAAAAfIUQBAAArEQIAgAAViIEAQAAKxGCAACAlQhBAADASoQgAABgJUIQAACwEiEIAABYiRAEAACsRAgCAABWIgQBAAArEYIAAICVCEEAAMBKhCAAAGAlQhAAALASIQgAAFiJEAQAAKxECAIAAFYiBAEAACsRggAAgJUIQQAAwEqEIAAAYCVCEAAAsBIhCAAAWIkQBAAArEQIAgAAViIEAQAAKxGCAACAlQhBAADASoQgAABgJUIQAACwEiEIAABYiRAEAACsRAgCAABWIgQBAAArEYIAAICVCEEAAMBKhCAAAGAlQhAAALASIQgAAFiJEAQAAKxECAIAAFYiBAEAACsRggAAgJUIQQAAwEqEIAAAYCVCEAAAsBIhCAAAWIkQBAAArEQIAgAAViIEAQAAKxGCAACAlQhBAADASoQgAABgJUIQAACwEiEIAABYyS9C0KpVq9SrVy+Fh4crNTVVu3btuuH8lStXqm/fvurYsaMSExP10ksvNZlz9uxZTZs2Td27d1d4eLj69u2rrVu3emsJAACgnQn2dQOvvvqqZs6cqVWrVmnYsGH61a9+pTFjxujgwYOKjY1tMn/16tXKycnRunXrdMcdd6ioqEhTpkxR586dlZmZKUm6eP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AABJRU5ErkJggg==",
"text/plain": [
"Figure(PyObject <Figure size 640x480 with 1 Axes>)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"\n",
"plt.plot(αs[QQ.>0.5],QQ[QQ.>0.5],\"rx\")\n",
"plt.plot(αs[QQ.<0.5],QQ[QQ.<0.5],\"go\")\n",
"plt.xlabel(L\"\\alpha\")\n",
"plt.ylabel(L\"Inconsistent\")\n",
"\n",
"plt.savefig(string(folder,\"RK2Inconsistency.pdf\"))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### DeC equispaced all orders"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(0:2:2, [1.0 1.0000000000000009; 1.0e-300 5.170604644494139e-293])"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"tout,uu=dec_correction(prod_dest, rhs_function, tt,u0, 11,12,\"equispaced\")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"equispacedOrder 1 Order 1 Inconsistency 0.0\n",
"Order 2 Order 2 Inconsistency 0.0\n",
"Order 3 Order 3 Inconsistency 0.0\n",
"Order 4 Order 4 Inconsistency 0.0\n",
"Order 5 Order 5 Inconsistency 0.0\n",
"Order 6 Order 6 Inconsistency 0.0\n",
"Order 7 Order 7 Inconsistency 0.0\n",
"Order 8 Order 8 Inconsistency 0.0\n",
"Order 9 Order 9 Inconsistency 1.0\n",
"Order 10 Order 10 Inconsistency 0.0\n",
"Order 11 Order 11 Inconsistency 1.0\n",
"Order 12 Order 12 Inconsistency 1.0\n",
"Order 13 Order 13 Inconsistency 1.0\n",
"Order 14 Order 14 Inconsistency 1.0\n",
"Order 15 Order 15 Inconsistency 1.0\n",
"Order 16 Order 16 Inconsistency 1.0\n",
"Order 17 Order 17 Inconsistency 1.0\n",
"Order 18 Order 18 Inconsistency 1.0\n",
"Order 19 Order 19 Inconsistency 1.0\n",
"Order 20 Order 20 Inconsistency 1.0\n",
"Order 21 Order 21 Inconsistency 1.0\n",
"Order 22 Order 22 Inconsistency 1.0\n",
"Order 23 Order 23 Inconsistency 1.0\n",
"Order 24 Order 24 Inconsistency 1.0\n",
"Order 25 Order 25 Inconsistency 1.0\n",
"Order 26 Order 26 Inconsistency 1.0\n",
"Order 27 Order 27 Inconsistency 1.0\n",
"Order 28 Order 28 Inconsistency 1.0\n",
"Order 29 Order 29 Inconsistency 1.0\n",
"Order 30 Order 30 Inconsistency 1.0\n",
"gaussLobattoOrder 1 Order 1 Inconsistency 0.0\n",
"Order 2 Order 2 Inconsistency 0.0\n",
"Order 3 Order 3 Inconsistency 0.0\n",
"Order 4 Order 4 Inconsistency 0.0\n",
"Order 5 Order 5 Inconsistency 0.0\n",
"Order 6 Order 6 Inconsistency 0.0\n",
"Order 7 Order 7 Inconsistency 0.0\n",
"Order 8 Order 8 Inconsistency 0.0\n",
"Order 9 Order 9 Inconsistency 0.0\n",
"Order 10 Order 10 Inconsistency 0.0\n",
"Order 11 Order 11 Inconsistency 0.0\n",
"Order 12 Order 12 Inconsistency 0.0\n",
"Order 13 Order 13 Inconsistency 0.0\n",
"Order 14 Order 14 Inconsistency 0.0\n",
"Order 15 Order 15 Inconsistency 0.0\n",
"Order 16 Order 16 Inconsistency 0.0\n",
"Order 17 Order 17 Inconsistency 0.0\n",
"Order 18 Order 18 Inconsistency 0.0\n",
"Order 19 Order 19 Inconsistency 0.0\n",
"Order 20 Order 20 Inconsistency 0.0\n",
"Order 21 Order 21 Inconsistency 0.0\n",
"Order 22 Order 22 Inconsistency 0.0\n",
"Order 23 Order 23 Inconsistency 0.0\n",
"Order 24 Order 24 Inconsistency 0.0\n",
"Order 25 Order 25 Inconsistency 0.0\n",
"Order 26 Order 26 Inconsistency 0.0\n",
"Order 27 Order 27 Inconsistency 0.0\n",
"Order 28 Order 28 Inconsistency 0.0\n",
"Order 29 Order 29 Inconsistency 0.0\n",
"Order 30 Order 30 Inconsistency 0.0\n"
]
}
],
"source": [
"distributions=[\"equispaced\",\"gaussLobatto\"]\n",
"distrShort=[\"eq\",\"glb\"]\n",
"\n",
"for (idist, dist) in enumerate(distributions)\n",
" incons=zeros(30)\n",
" print(dist)\n",
" open(string(folder,\"InconsistencyDeC$(distrShort[idist])AllSystems.tex\"), \"w\") do io\n",
" write(io,\"Order & Inconsistency \\\\\\\\ \\\\hline \\n\")\n",
"\n",
" for order=1:30\n",
" print(\"Order $(order) \")\n",
" try\n",
" tout,uu=dec_correction(prod_dest, rhs_function, tt,u0, max(order-1,1),order,dist)\n",
" incons[order]= overshootMeasure(uu[1,2])\n",
" if isnan(incons[order])\n",
" incons[order]=1.0\n",
" end\n",
" catch e\n",
" incons[order]=1.0\n",
" end\n",
"\n",
" println(\"Order $(order) Inconsistency $(incons[order])\")\n",
" write(io, \" $(order) & $(incons[order]) \\\\\\\\ \\n\")\n",
" end\n",
" end\n",
"end"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### MPRKSO(4,3)"
]
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0"
]
}
],
"source": [
"tout,uu=mPRKSO3(prod_dest, rhs_function, tt,u0)\n",
"tmp= overshootMeasure(uu[1,2])\n",
"print(tmp)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## MPRK(3,2) inspired from a SSPRK(3,3) "
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.0\n"
]
}
],
"source": [
"tout,uu=mPRK32(prod_dest, rhs_function, tt,u0)\n",
"tmp= overshootMeasure(uu[1,2])\n",
"println(tmp)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### MPRKSO22($\\alpha$,$\\beta$)"
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"117727127102771525223456787879910801112138114151617188219178202122238324252617984128851801031298618110487130282930153313210533182881313453353637154543810689391325540183414256431559010744571334518446589147156108594892134496018510950157936151135186110629415863136111187649515911213765961881606611397138671891616898114139691901629911514070116163191100711411171647210119214273118165143193741191667514412019476167145121195146168122196169123147170197124148125171198149126172199150173151200174201175176"
]
}
],
"source": [
"\n",
"l1=201\n",
"l2=201\n",
"\n",
"as=range(0.,stop=0.5,length=l1)\n",
"bs=range(0.,stop=10,length=l2)\n",
"AA=zeros(l1,l2)\n",
"BB=zeros(l1,l2)\n",
"QQ=zeros(l1,l2)\n",
"Threads.@threads for k=1:l1\n",
" print(k)\n",
" for j= 1:l2\n",
" AA[k,j]=as[k]\n",
" BB[k,j]=bs[j]\n",
" try\n",
" tout,uu=mPRKSO2(prod_dest,rhs_function, tt,u0, as[k],bs[j])\n",
" QQ[k,j]= overshootMeasure(uu[1,2])\n",
" if isnan(QQ[k,j])\n",
" QQ[k,j]=1.0\n",
" end\n",
" catch e\n",
" QQ[k,j]=1.0\n",
" end\n",
" end\n",
"end\n"
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAG2CAYAAACTTOmSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAiCklEQVR4nO3dfZBV5X3A8d/ytoB1aSQVYeTNxILxJa7QGCANGg2Z1qRi697UlwxOY0ciNRCnVZikBUwig0kJbYymMKmxcTDe2ypxxqSR6QQDRRtfIJP4RpNYpRmJNdHFl3QVPP3D7JaFXdy7e+8959zz+czcP/Zw7+6jR+TLc57nnJYkSZIAACigYWkPAAAgLUIIACgsIQQAFJYQAgAKSwgBAIUlhACAwhJCAEBhCSEAoLCEEABQWEIIACisTIXQ97///fjIRz4SkyZNipaWlti8eXOvX0+SJFatWhWTJk2KMWPGxFlnnRWPPvpoOoMFAHIvUyH0yiuvxLvf/e648cYb+/z1G264IdatWxc33nhjPPjgg3HcccfFBz/4wXjppZcaPFIAoBm0ZPWhqy0tLXHXXXfFwoULI+LN2aBJkybFsmXL4tprr42IiK6urpgwYUKsXbs2rrjiihRHCwDk0Yi0BzBQTz31VOzduzcWLFjQc6y1tTXmz58fO3bs6DeEurq6oqurq+frN954I371q1/F+PHjo6Wlpe7jBgCGLkmSeOmll2LSpEkxbFjtLmjlJoT27t0bERETJkzodXzChAnx9NNP9/u5NWvWxOrVq+s6NgCgMfbs2RPHH398zb5fbkKo26GzOEmSHHFmZ8WKFXH11Vf3fN3Z2RlTpkyJm887L8aMHFm3cdbD5lgYm2+9IO1hDNrCRXfFwtic9jAAyKFfv/56fOKee+Loo4+u6ffNTQgdd9xxEfHmzNDEiRN7jj/33HOHzRIdrLW1NVpbWw87PmbkyBibsxAaGWMj2trSHsagjRw5NsZGvv6dA5AttV7WkqldY0cyffr0OO6442LLli09x1577bW47777Yu7cuSmOrHE6opL2EACgqWRqRujll1+On/zkJz1fP/XUU7Fr16445phjYsqUKbFs2bK4/vrr48QTT4wTTzwxrr/++hg7dmxcfPHFKY66scqlUlSiIyrljrSHAgC5l6kQeuihh+Lss8/u+bp7bc+iRYvi61//elxzzTXx61//Oq688sp44YUX4swzz4x777235tcLs64jKhGlEEMAMESZCqGzzjorjnRbo5aWlli1alWsWrWqcYMCAJpWbtYIAQDUmhACAApLCAEAhSWEaJhKuSMqYYE3ANkhhGgoMQRAlgghGs62fwCyQggBAIUlhACAwhJCAEBhCSEAoLCEEABQWEIIACgsIUQq3EsIgCwQQqSiUu6IUrmc9jAAKDghRKrMDAGQJiGUUx1RiY5SJe1hAECuCaEcE0MAMDRCCAAoLCEEABSWEAIACksIAQCFJYQAgMISQqSq+8aK7icEQBqEEJlQKQshABpPCAEAhSWEAIDCEkI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/477778/PvGJT/QcGzVqVCRJEqtXr05xZEAeCCEg1x5//PGIiJg9e3bPsSeffDLe8573xKmnnprWsICcEEJArnV2dsbw4cN7vv7Vr34VN9xwQ7S2tqY4KiAvhBCQa6effnocOHAgbrjhhnjiiSfioosuiqlTp8bjjz8eTz/9dNrDAzJOCAG59s53vjOuu+66+Lu/+7tob2+PiRMnxr333huTJ0+Oc889N+3hARln1xgAUFhmhACAwhJCAEBhCSEAoLCEEABQWEIIACgsIQQAFJYQAgAKSwgBAIUlhACAwhJCAEBhCSEAoLCEEABQWP8Hqg5BwbESdIEAAAAASUVORK5CYII=",
"text/plain": [
"Figure(PyObject <Figure size 640x480 with 1 Axes>)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"nLevels=4\n",
"colls=zeros(nLevels,3)\n",
"colls[:,1]=[x for x in range(0,stop=1,length=nLevels)]\n",
"colls[:,2]=[1-sqrt.(2*x*(1-x)) for x in range(0,stop=1,length=nLevels)]\n",
"colls[:,3]=[1-x for x in range(0,stop=1,length=nLevels)]\n",
"\n",
"levels=[0 \n",
" 0.2\n",
" 0.5\n",
" 1.1]\n",
"#levels=[0 \n",
"# 0.0005\n",
"# 0.001\n",
"# range(6,stop=11,length=13)\n",
"# 16]\n",
"PyPlot.contourf(AA,BB,QQ,levels, colors=colls)\n",
"#PyPlot.colorbar()\n",
"PyPlot.xlabel(L\"\\alpha\")\n",
"PyPlot.ylabel(L\"$\\beta$\")\n",
"#PyPlot.title(\"log10 Variation Lyapunov mPRK3\")\n",
"PyPlot.savefig(string(folder,\"InconsistencyRKSO2.pdf\"))\n",
"PyPlot.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### MPRK43($\\alpha,\\beta$)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"521522717717710212723281531031781285378541291041547917929554105801555613018010681156305713151811075813282157108182596833113315860109841341831593261110785184135160621113386136185631611128876413718634113162886591381871148916366351156790188139101643691681161401651896992111173716619014170118931671219138711421199416872391921314395120731694019396144121417417014429719414512275431714498195157612314645172461249919614747161734810012519714849174101126175019814951175181501991761512001920120212223242526"
]
}
],
"source": [
"l1=201\n",
"l2=201\n",
"\n",
"as=range(1/3,stop=3,length=l1)\n",
"bs=range(0.28,stop=0.75,length=l2)\n",
"AA=zeros(l1,l2)\n",
"BB=zeros(l1,l2)\n",
"QQ=zeros(l1,l2)\n",
"Threads.@threads for k=1:l1\n",
" print(k)\n",
" for j= 1:l2\n",
" AA[k,j]=as[k]\n",
" BB[k,j]=bs[j]\n",
" \n",
" \n",
" try\n",