# Custom styling, borrowed from https://github.com/ellisonbg/talk-2013-scipy
from IPython import display
# Make plots centered. H/T to http://stackoverflow.com/a/27168595/1068170
STYLE = """\
<style>
div.output_area, .ui-wrapper {
margin-left: auto !important;
margin-right: auto !important;
}
</style>
"""
SLIDES_STYLE = """
<style>
h1.bigtitle {
margin: 4cm 1cm 4cm 1cm;
font-size: 300%;
}
h1.title {
font-size: 250%;
}
.rendered_html h1 {
margin: 0.25em 0em 0.5em;
color: #015C9C;
text-align: center;
line-height: 1.2;
page-break-before: always;
}
</style>
"""
STYLE = STYLE + '\n' + SLIDES_STYLE
display.display(display.HTML(STYLE))
WENO interpolation ... [is] used ... to transfer information from one domain to another in a high order, nonoscillatory fashion
Define $h(x)$ implicitly via $$\frac{1}{\Delta x} \int_{x - \Delta x / 2}^{x + \Delta x / 2} h(s) \, ds = f(u(x))$$
%matplotlib inline
import seaborn
import sympy
import weno_computations
seaborn.set_palette('husl')
weno_computations.make_intro_plots(0)
weno_computations.make_intro_plots(1)
weno_computations.make_intro_plots(2)
weno_computations.make_intro_plots(3)
weno_computations.make_intro_plots(4)
weno_computations.make_intro_plots(5)
weno_computations.make_intro_plots(6)
weno_computations.make_intro_plots(7)
weno_computations.make_intro_plots(8)
weno_computations.make_intro_plots(9)
weno_computations.make_intro_plots(10)
weno_computations.make_intro_plots(11)
weno_computations.make_intro_plots(12)
# The slide below can be produced with the following:
(approx_minus2, approx_minus1,
approx_zero, approx_all) = weno_computations.interp_simple_stencils()
approx_minus2 = approx_minus2.replace('=', '&=')
approx_minus1 = approx_minus1.replace('=', '&=')
approx_zero = approx_zero.replace('=', '&=')
approx_all = approx_all.replace('=', '&=')
all_math = r"""\begin{align*}
%s \\ %s \\ %s \\ %s \end{align*}
""" % (approx_minus2, approx_minus1, approx_zero, approx_all)
Putting the W in WENO: $$u^{{(\ast)}}_{{j + \frac{1}{2}}} = \frac{1}{10} u^{{(1)}}_{{j + \frac{1}{2}}} + \frac{6}{10} u^{{(2)}}_{{j + \frac{1}{2}}} + \frac{3}{10} u^{{(3)}}_{{j + \frac{1}{2}}}$$
What about the other letters?
What about shocks?
weno_computations.discontinuity_to_volume_single_cell(0)
weno_computations.discontinuity_to_volume_single_cell(1)
weno_computations.make_shock_plot_single_cell()
weno_computations.discontinuity_to_volume()
weno_computations.make_shock_plot()
Smoothness indicator when approximating a point in the interval $I = \left(x_j - \frac{\Delta x}{2}, x_j + \frac{\Delta x}{2}\right]$
Large $\beta$ indicates that the approximation $p(x)$ is not smooth nearby our point.
Recall the W in WENO: $$u^{{(\ast)}}_{{j + \frac{1}{2}}} = \frac{1}{10} u^{{(1)}}_{{j + \frac{1}{2}}} + \frac{6}{10} u^{{(2)}}_{{j + \frac{1}{2}}} + \frac{3}{10} u^{{(3)}}_{{j + \frac{1}{2}}}$$
Rather than using these directly, incorporate a penalty for each polynomial approximation's (lack of) smoothness: $\beta^{(1)}$, $\beta^{(2)}$, $\beta^{(3)}$.
TV-diminishing / strong stability preserving RK scheme
$$\begin{array}{c | c c c} 0 & & & \\ 1 & 1 & & \\ 1/2 & 1/4 & 1/4 & \\ \hline & 1/6 & 1/6 & 2/3 \end{array}$$