diff +sbp/D2Variable.m @ 362:ded4156e53e2

Added 2nd order accurate 2nd derivative with variable coefficents in a separate implementation file, used by the class D2Variable.
author Martin Almquist <martin.almquist@it.uu.se>
date Tue, 20 Dec 2016 15:04:02 +0100
parents 4b9310edcdf8
children 359861563866
line wrap: on
line diff
--- a/+sbp/D2Variable.m	Thu Oct 13 09:34:42 2016 +0200
+++ b/+sbp/D2Variable.m	Tue Dec 20 15:04:02 2016 +0100
@@ -31,6 +31,13 @@
                         obj.e_r, obj.d1_l, obj.d1_r] = ...
                         sbp.implementations.d2_variable_4(m,obj.h);
                     obj.borrowing.M.S = 0.2505765857;
+                case 2
+                    [obj.H, obj.HI, obj.D1, obj.D2, obj.e_l,...
+                        obj.e_r, obj.d1_l, obj.d1_r] = ...
+                        sbp.implementations.d2_variable_2(m,obj.h);
+                    obj.borrowing.M.S = 0.3636363636; 
+                    % Borrowing const taken from Virta 2014
+                    
                 otherwise
                     error('Invalid operator order %d.',order);
             end