comparison +time/CdiffImplicit.m @ 707:0de70ec8bf60 feature/quantumTriangles

merge with feature/optim
author Ylva Rydin <ylva.rydin@telia.com>
date Fri, 10 Nov 2017 14:22:56 +0100
parents d5bce13ece23
children d6ede7f5cbf9
comparison
equal deleted inserted replaced
696:7c16b5af8d98 707:0de70ec8bf60
61 obj.BB = BB; 61 obj.BB = BB;
62 obj.CC = CC; 62 obj.CC = CC;
63 63
64 v_prev = f1; 64 v_prev = f1;
65 I = speye(m); 65 I = speye(m);
66 v = (1/k^2*A)\((1/k^2*A - 1/2*B)*f1 + (1/k*I - 1/2*C)*f2 + 1/2*G(0)); 66 % v = (1/k^2*A)\((1/k^2*A - 1/2*B)*f1 + (1/k*I - 1/2*C)*f2 + 1/2*G(0));
67 v = f1 + k*f2;
68
67 69
68 if ~issparse(A) || ~issparse(B) || ~issparse(C) 70 if ~issparse(A) || ~issparse(B) || ~issparse(C)
69 error('LU factorization with full pivoting only works for sparse matrices.') 71 error('LU factorization with full pivoting only works for sparse matrices.')
70 end 72 end
71 73