changeset 406:9fd9b1bea3d2 feature/SBPInTimeGauss

Added D1Gauss to SBPInTime
author Martin Almquist <martin.almquist@it.uu.se>
date Thu, 02 Feb 2017 17:18:51 +0100
parents 4d9d8064e58b
children e1db62d14835
files +time/SBPInTime.m
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/+time/SBPInTime.m	Thu Feb 02 17:05:43 2017 +0100
+++ b/+time/SBPInTime.m	Thu Feb 02 17:18:51 2017 +0100
@@ -24,9 +24,16 @@
 
     methods
         function obj = SBPInTime(A, f, k, t0, v0, TYPE, order, blockSize)
-            default_arg('TYPE','minimal');
-            default_arg('order', 8);
-            default_arg('blockSize',time.SBPInTime.smallestBlockSize(order,TYPE));
+
+            default_arg('TYPE','gauss');
+
+            if(strcmp(TYPE,'gauss'))
+                default_arg('order',4)
+                default_arg('blockSize',4)
+            else
+                default_arg('order', 8);
+                default_arg('blockSize',time.SBPInTime.smallestBlockSize(order,TYPE));
+            end
 
             obj.A = A;
             obj.f = f;
@@ -45,6 +52,8 @@
                     ops = sbp.D1Nonequidistant(blockSize,{0,obj.k},order);
                 case 'minimal'
                     ops = sbp.D1Nonequidistant(blockSize,{0,obj.k},order,'minimal');
+                case 'gauss'
+                    ops = sbp.D1Gauss(blockSize,{0,obj.k});
             end
 
             D1 = ops.D1;
@@ -152,6 +161,8 @@
                         otherwise
                             error('Operator does not exist');
                     end
+                case 'gauss'
+                    N = 4;
             end
         end
     end