diff +time/Cdiff.m @ 227:151ab2b5a686 feature/beams

Added a timedependent version of Cdiff.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 30 Jun 2016 14:43:43 +0200
parents 484b48e95c83
children 8894e9c49e40 c9009d5a3101
line wrap: on
line diff
--- a/+time/Cdiff.m	Thu Jun 30 14:10:26 2016 +0200
+++ b/+time/Cdiff.m	Thu Jun 30 14:43:43 2016 +0200
@@ -12,22 +12,20 @@
 
 
     methods
+        % Solves u_tt = Du + Eu_t + S
+        % D, E, S can either all be constants or all be function handles,
+        % They can also be omitted by setting them equal to the empty matrix.
+        % Cdiff(D, E, S, k, t0, n0, v, v_prev)
         function obj = Cdiff(D, E, S, k, t0, n0, v, v_prev)
-            % Cdiff(D, E, S, k, t0, n0, v, v_prev)
-            m = size(D,1);
+            m = length(v);
             default_arg('E',sparse(m,m));
             default_arg('S',sparse(m,1));
 
-            if ~(issparse(D) && issparse(E) && issparse(S))
-                warning('One of the matrices D, E, S is not sparse!')
-                print_issparse(D)
-                print_issparse(E)
-                print_issparse(S)
-            end
-
             obj.D = D;
             obj.E = E;
             obj.S = S;
+
+
             obj.k = k;
             obj.t = t0;
             obj.n = n0;