Mercurial > repos > public > sbplib
diff +time/+rkparameters/rk4.m @ 856:ee4cfb37534d feature/poroelastic
Merge with feature/d1_staggered to get RK timestepper for discrete data.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 02 Oct 2018 13:39:10 -0700 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+time/+rkparameters/rk4.m Tue Oct 02 13:39:10 2018 -0700 @@ -0,0 +1,12 @@ +function [a,b,c,s] = rk4() + +% Butcher tableau for classical RK$ +s = 4; +a = sparse(s,s); +a(2,1) = 1/2; +a(3,2) = 1/2; +a(4,3) = 1; +b = 1/6*[1; 2; 2; 1]; +c = [0; 1/2; 1/2; 1]; + +end \ No newline at end of file