Mercurial > repos > public > sbplib
comparison +time/Cdiff.m @ 13:b18d3d201a71
Fixed initialization of step counter in timesteppers.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 22 Sep 2015 08:41:28 +0200 |
parents | 5ae4f23d9130 |
children | 484b48e95c83 |
comparison
equal
deleted
inserted
replaced
12:c71095442c57 | 13:b18d3d201a71 |
---|---|
10 n | 10 n |
11 end | 11 end |
12 | 12 |
13 | 13 |
14 methods | 14 methods |
15 function obj = Cdiff(D, E, S, k, t0, v, v_prev) | 15 function obj = Cdiff(D, E, S, k, t0, n0, v, v_prev) |
16 m = size(D,1); | 16 m = size(D,1); |
17 default_arg('E',sparse(m,m)); | 17 default_arg('E',sparse(m,m)); |
18 default_arg('S',sparse(m,1)); | 18 default_arg('S',sparse(m,1)); |
19 | 19 |
20 if ~(issparse(D) && issparse(E) && issparse(S)) | 20 if ~(issparse(D) && issparse(E) && issparse(S)) |
27 obj.D = D; | 27 obj.D = D; |
28 obj.E = E; | 28 obj.E = E; |
29 obj.S = S; | 29 obj.S = S; |
30 obj.k = k; | 30 obj.k = k; |
31 obj.t = t0; | 31 obj.t = t0; |
32 obj.n = n0; | |
32 obj.v = v; | 33 obj.v = v; |
33 obj.v_prev = v_prev; | 34 obj.v_prev = v_prev; |
34 end | 35 end |
35 | 36 |
36 function [v,t] = getV(obj) | 37 function [v,t] = getV(obj) |