Mercurial > repos > public > sbplib
diff +time/Cdiff.m @ 832:5573913a0949 feature/burgers1d
Merged with default, and updated +scheme/Burgers1D accordingly
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 11 Sep 2018 15:58:35 +0200 |
parents | 151ab2b5a686 |
children | 8894e9c49e40 c9009d5a3101 |
line wrap: on
line diff
--- a/+time/Cdiff.m Tue Sep 11 13:24:08 2018 +0200 +++ b/+time/Cdiff.m Tue Sep 11 15:58:35 2018 +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;