Mercurial > repos > public > sbplib
view stencilEquation.m @ 1014:e547794a9407 feature/advectionRV
Add boot-strapping to RungeKuttaExteriorRV
- Higher order BDF approximations are successively used as increasing number of time levels are obtained.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 06 Dec 2018 11:30:47 +0100 |
parents | 184833fe4c0e |
children |
line wrap: on
line source
% Find the equation for the stencil for d^k/dx^k function [A,b] = stencilEquation(k, offsets, order) q = sym('q', [1, length(offsets)]); p = 0:(order-1+k); v = vandermonde(offsets, p); vdiff = vandermonde( 0, p-k); eq = q*v == vdiff; [A,b] = equationsToMatrix(eq, q); end