Mercurial > repos > public > sbplib
view stripeMatrixPeriodic.m @ 851:ab2e5a24ddde feature/burgers1d
- Fix bug when constructing closure for narrow stencils
- Update the residual outside of the RK time steps. At least for the inner convergence rate, updating the residual inside does not seem to be required.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 21 Sep 2018 15:33:15 +0200 |
parents | bbf303c1f0cf |
children |
line wrap: on
line source
% Creates a periodic discretization matrix of size n x n % with the values of val on the diagonals diag. % A = stripeMatrix(val,diags,n) function A = stripeMatrixPeriodic(val,diags,n) D = ones(n,1)*val; A = spdiagsPeriodic(D,diags); end