comparison +sbp/+implementations/d1_noneq_minimal_4.m @ 267:f7ac3cd6eeaa operator_remake

Sparsified all implementation files, removed all matlab warnings, fixed small bugs on minimum grid points.
author Martin Almquist <martin.almquist@it.uu.se>
date Fri, 09 Sep 2016 14:53:41 +0200
parents bfa130b7abf6
children 4cb627c7fb90
comparison
equal deleted inserted replaced
266:bfa130b7abf6 267:f7ac3cd6eeaa
21 x0 = 0.0000000000000e+00; 21 x0 = 0.0000000000000e+00;
22 x1 = 7.7122987842562e-01; 22 x1 = 7.7122987842562e-01;
23 x2 = 1.7712298784256e+00; 23 x2 = 1.7712298784256e+00;
24 x3 = 2.7712298784256e+00; 24 x3 = 2.7712298784256e+00;
25 25
26 xb = zeros(m+1,1); 26 xb = sparse(m+1,1);
27 for i = 0:m 27 for i = 0:m
28 xb(i+1) = eval(['x' num2str(i)]); 28 xb(i+1) = eval(['x' num2str(i)]);
29 end 29 end
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 31
36 %%%% Define grid %%%%%%%% 36 %%%% Define grid %%%%%%%%
37 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ]; 37 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ];
38 %%%%%%%%%%%%%%%%%%%%%%%%% 38 %%%%%%%%%%%%%%%%%%%%%%%%%
39 39
40 %%%% Norm matrix %%%%%%%% 40 %%%% Norm matrix %%%%%%%%
41 P = zeros(BP,1); 41 P = sparse(BP,1);
42 %#ok<*NASGU> 42 %#ok<*NASGU>
43 P0 = 2.6864248295847e-01; 43 P0 = 2.6864248295847e-01;
44 P1 = 1.0094667153500e+00; 44 P1 = 1.0094667153500e+00;
45 P2 = 9.9312068011715e-01; 45 P2 = 9.9312068011715e-01;
46 46