comparison +time/ExplicitRungeKuttaDiscreteData.m @ 1120:7963a9cab637 feature/poroelastic

In RungeKuttaDiscreteData, make K and U non-sparse to improve performance by roughly a factor of 3.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 07 May 2019 11:41:15 -0700
parents 4c7532db42cd
children 0aefcb30cab4
comparison
equal deleted inserted replaced
1119:8984b12feba6 1120:7963a9cab637
37 [obj.a, obj.b, obj.c, obj.s] = time.rkparameters.rk4(); 37 [obj.a, obj.b, obj.c, obj.s] = time.rkparameters.rk4();
38 otherwise 38 otherwise
39 error('That RK method is not available'); 39 error('That RK method is not available');
40 end 40 end
41 41
42 obj.K = sparse(obj.m, obj.s); 42 obj.K = zeros(obj.m, obj.s);
43 obj.U = sparse(obj.m, obj.s); 43 obj.U = zeros(obj.m, obj.s);
44 44
45 end 45 end
46 46
47 function [v,t,U,T,K] = getV(obj) 47 function [v,t,U,T,K] = getV(obj)
48 v = obj.v; 48 v = obj.v;