comparison +sbp/+implementations/d1_noneq_minimal_8.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
24 x3 = 2.4051531374839e+00; 24 x3 = 2.4051531374839e+00;
25 x4 = 3.4051531374839e+00; 25 x4 = 3.4051531374839e+00;
26 x5 = 4.4051531374839e+00; 26 x5 = 4.4051531374839e+00;
27 x6 = 5.4051531374839e+00; 27 x6 = 5.4051531374839e+00;
28 28
29 xb = zeros(m+1,1); 29 xb = sparse(m+1,1);
30 for i = 0:m 30 for i = 0:m
31 xb(i+1) = eval(['x' num2str(i)]); 31 xb(i+1) = eval(['x' num2str(i)]);
32 end 32 end
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 34
39 %%%% Define grid %%%%%%%% 39 %%%% Define grid %%%%%%%%
40 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ]; 40 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ];
41 %%%%%%%%%%%%%%%%%%%%%%%%% 41 %%%%%%%%%%%%%%%%%%%%%%%%%
42 42
43 %%%% Norm matrix %%%%%%%% 43 %%%% Norm matrix %%%%%%%%
44 P = zeros(BP,1); 44 P = sparse(BP,1);
45 %#ok<*NASGU> 45 %#ok<*NASGU>
46 P0 = 1.4523997892351e-01; 46 P0 = 1.4523997892351e-01;
47 P1 = 7.6864793350174e-01; 47 P1 = 7.6864793350174e-01;
48 P2 = 9.9116487068535e-01; 48 P2 = 9.9116487068535e-01;
49 P3 = 9.9992473335107e-01; 49 P3 = 9.9992473335107e-01;