annotate scaleAxisLim.m @ 1031:2ef20d00b386 feature/advectionRV

For easier comparison, return both the first order and residual viscosity when evaluating the residual. Add the first order and residual viscosity to the state of the RungekuttaRV time steppers
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Jan 2019 10:25:06 +0100
parents 0976e579a6f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
373
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
1 function scaleAxisLim(ah, s)
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 x = ah.XLim;
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 y = ah.YLim;
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
5 xl = x(2) - x(1);
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
6 yl = y(2) - y(1);
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
7
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
8 dx = xl*(s-1);
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
9 dy = yl*(s-1);
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
10
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
11 ah.XLim = x + [-dx/2 dx/2];
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
12 ah.YLim = y + [-dy/2 dy/2];
0976e579a6f0 Add functions for scaling figure windows and axes.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
13 end