comparison +sbp/+implementations/d1_noneq_minimal_10.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
26 x5 = 5.0000000000000e+00; 26 x5 = 5.0000000000000e+00;
27 x6 = 6.0000000000000e+00; 27 x6 = 6.0000000000000e+00;
28 x7 = 7.0000000000000e+00; 28 x7 = 7.0000000000000e+00;
29 x8 = 8.0000000000000e+00; 29 x8 = 8.0000000000000e+00;
30 30
31 xb = zeros(m+1,1); 31 xb = sparse(m+1,1);
32 for i = 0:m 32 for i = 0:m
33 xb(i+1) = eval(['x' num2str(i)]); 33 xb(i+1) = eval(['x' num2str(i)]);
34 end 34 end
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 36
41 %%%% Define grid %%%%%%%% 41 %%%% Define grid %%%%%%%%
42 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ]; 42 x = h*[xb; linspace(xb(end)+1,L/h-xb(end)-1,N-2*(m+1))'; L/h-flip(xb) ];
43 %%%%%%%%%%%%%%%%%%%%%%%%% 43 %%%%%%%%%%%%%%%%%%%%%%%%%
44 44
45 %%%% Norm matrix %%%%%%%% 45 %%%% Norm matrix %%%%%%%%
46 P = zeros(BP,1); 46 P = sparse(BP,1);
47 %#ok<*NASGU> 47 %#ok<*NASGU>
48 P0 = 1.6717213975289e-01; 48 P0 = 1.6717213975289e-01;
49 P1 = 9.3675739171278e-01; 49 P1 = 9.3675739171278e-01;
50 P2 = 1.3035532379753e+00; 50 P2 = 1.3035532379753e+00;
51 P3 = 1.1188461804303e+00; 51 P3 = 1.1188461804303e+00;