Mercurial > repos > public > sbplib
diff +time/Cdiff.m @ 886:8894e9c49e40 feature/timesteppers
Merge with default for latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 16:36:21 -0800 |
parents | b5e5b195da1e 151ab2b5a686 |
children | f5e14e5986b5 |
line wrap: on
line diff
--- a/+time/Cdiff.m Mon Sep 10 16:19:16 2018 +0200 +++ b/+time/Cdiff.m Thu Nov 15 16:36:21 2018 -0800 @@ -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;