comparison +sbp/+implementations/d1_noneq_minimal_12.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
28 x7 = 7.0000000000000e+00; 28 x7 = 7.0000000000000e+00;
29 x8 = 8.0000000000000e+00; 29 x8 = 8.0000000000000e+00;
30 x9 = 9.0000000000000e+00; 30 x9 = 9.0000000000000e+00;
31 x10 = 1.0000000000000e+01; 31 x10 = 1.0000000000000e+01;
32 32
33 xb = zeros(m+1,1); 33 xb = sparse(m+1,1);
34 for i = 0:m 34 for i = 0:m
35 xb(i+1) = eval(['x' num2str(i)]); 35 xb(i+1) = eval(['x' num2str(i)]);
36 end 36 end
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38 38
43 %%%% Define grid %%%%%%%% 43 %%%% Define grid %%%%%%%%
44 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ]; 44 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ];
45 %%%%%%%%%%%%%%%%%%%%%%%%% 45 %%%%%%%%%%%%%%%%%%%%%%%%%
46 46
47 %%%% Norm matrix %%%%%%%% 47 %%%% Norm matrix %%%%%%%%
48 P = zeros(BP,1); 48 P = sparse(BP,1);
49 %#ok<*NASGU> 49 %#ok<*NASGU>
50 P0 = 1.3013597111750e-01; 50 P0 = 1.3013597111750e-01;
51 P1 = 7.6146045079020e-01; 51 P1 = 7.6146045079020e-01;
52 P2 = 1.1984222247012e+00; 52 P2 = 1.1984222247012e+00;
53 P3 = 1.3340123109301e+00; 53 P3 = 1.3340123109301e+00;