diff +time/+rk/butcherTableau.m @ 1011:e0560bc4fb7d feature/advectionRV

Add todo:s for time stepping with RV
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 15 Nov 2018 13:49:11 -0800
parents c6fcee3fcf1b
children
line wrap: on
line diff
--- a/+time/+rk/butcherTableau.m	Wed Nov 07 10:03:35 2018 -0800
+++ b/+time/+rk/butcherTableau.m	Thu Nov 15 13:49:11 2018 -0800
@@ -1,5 +1,5 @@
 function [s,a,b,c] = butcherTableau(order)
-
+% TODO: Change order from a double to string.
 switch order
   
     case 3
@@ -19,6 +19,15 @@
         a(4,1) = 0; a(4,2) = 0; a(4,3) = 1;
         b = [1/6 1/3 1/3 1/6];
         c = [0, 1/2, 1/2, 1];
+    % case 4-3/8
+    %     % 3/8 RK4 (Kuttas method). Lower truncation error, more flops
+    %     s = 4;
+    %     a = zeros(s,s-1);
+    %     a(2,1) = 1/3; 
+    %     a(3,1) = -1/3; a(3,2) = 1;
+    %     a(4,1) = 1; a(4,2) = -1; a(4,3) = 1;
+    %     b = [1/8 3/8 3/8 1/8];
+    %     c = [0, 1/3, 2/3, 1];
     case 6
         % Runge-Kutta 6 from Alshina07 
         s = 7;