Skip to content

Commit f3af271

Browse files
committed
removed convergence diagram
1 parent f1270db commit f3af271

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

diagrams.jl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Plots, LaTeXStrings, Distributions
2+
using CellMLToolkit, DifferentialEquations, ModelingToolkit, SymbolicIndexingInterface
23

34
plotParams = (linewidth=2., dpi=300)
45
l = @layout [a b]
@@ -68,23 +69,5 @@ plot(plotA, plotB, layout=l, size=(539,250), dpi=300, margin=5Plots.mm, left_mar
6869
title=["A" "B"], titlelocation=:left)
6970
savefig("results/diagrams/possibleProblems.pdf")
7071

71-
# Convergence figure
72-
frequency = 790.0
7372

74-
x = 0:0.0001:1
75-
y = @. 0.9*exp(-4.8x)+0.1+0.003*sin(frequency*x)
76-
plot(x, y, ylim=(0,1), xlim=(0,1), legend=false, yticks=nothing, xticks=nothing, xlabel="Time",
77-
ylabel="Slow Variable", left_margin=5Plots.mm; dpi=plotParams.dpi, size=(255,250), linewidth=1.25)
7873

79-
lens!([0.95, 1.0], [0.10, 0.125], inset = (1, bbox(0.4, 0.1, 0.5, 0.5)), xticks=nothing,
80-
yticks=nothing, label="", title="Converged", titlefontcolor=:darkgreen, titlefontsize=10,
81-
foreground_color_legend=nothing, framestyle=:box)
82-
# Alignment on the period isn't done in the actual convergence check, but we include many more oscillations than we can show in this figure
83-
period = 2*pi/frequency
84-
m = minimum(y[1-2*period.<=x.<=1.0])
85-
plot!([1-2*period, 1.0], [m, m], subplot=2, color=:purple, label=" Range"; plotParams...)
86-
m = maximum(y[1-2*period.<=x.<=1.0])
87-
plot!([1-2*period, 1.0], [m, m], subplot=2, color=:purple, label=""; plotParams...)
88-
m = mean(y[0.95.<=x.<=0.95+2*period])
89-
plot!([0.95, 0.95+2*period], [m, m], subplot=2, color=:red, label=" Average"; plotParams...)
90-
savefig("results/diagrams/convergenceDiagram.pdf")
-51.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)