annotate +sbp/+implementations/intOpMC_orders_6to6_ratio2to1.m @ 1301:8978521b0f06 default

Fix incorrect package name.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 08 Jul 2020 19:11:04 +0200
parents c923fe6197ff
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
608
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
1 % Marks New interpolation operators
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
2 % 6th order accurate (diagonal norm)
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
3 % M=19 is the minimum amount of points on the coarse mesh
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
4
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
5 function [IC2F,IF2C] = intOpMC_orders_6to6_ratio2to1(M_C)
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
6
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
7 M_F=M_C*2-1;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
8
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
9 % Coarse to fine
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
10 I1=zeros(M_F,M_C);
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
11
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
12 t1= [6854313/6988288 , 401925/6988288 , -401925/6988288 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
13 , 133975/6988288 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
14 560547/1537664 , 1201479/1537664 , -240439/1537664 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
15 , 16077/1537664 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
16 203385/5552128 , 1225647/1388032 , 364155/2776064 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
17 , -80385/1388032 , 39385/5552128 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
18 -145919/2743808 , 721527/1371904 , 105687/171488 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
19 -25/256 , 23631/2743808 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
20 -178863/4033024 , 1178085/8066048 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
21 1658587/2016512 , 401925/4033024 , -15/512 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
22 43801/8066048 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
23 -1668147/11213056 , 4193225/11213056 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
24 375675/2803264 , 2009625/2803264 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
25 -984625/11213056 , 3/256 , 0 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
26 -561187/2949120 , 831521/1474560 , -788801/1474560 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
27 , 412643/368640 , 39385/589824 , -43801/1474560 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
28 , 5/1024 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
29 23/1024 , 23/147456 , -43435/221184 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
30 26795/36864 , 39385/73728 , -43801/442368 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
31 3/256 , 0 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
32 79379/368640 , -1664707/2949120 , 284431/737280 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
33 26795/294912 , 606529/737280 , 43801/589824 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
34 -15/512 , 5/1024 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
35 3589/27648 , -2225/6144 , 22939/73728 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
36 -26795/221184 , 39385/73728 , 43801/73728 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
37 -25/256 , 3/256 , 0 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
38 -720623/14745600 , 10637/92160 , -89513/1474560 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
39 -5359/147456 , 39385/589824 , 3372677/3686400 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
40 75/1024 , -15/512 , 5/1024 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
41 -6357/81920 , 55219/276480 , -8707/61440 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
42 5359/368640 , -39385/442368 , 43801/73728 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
43 75/128 , -25/256 , 3/256 , 0 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
44 -13315/884736 , 2589/65536 , -479/16384 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
45 5359/884736 , -7877/294912 , 43801/589824 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
46 231/256 , 75/1024 , -15/512 , 5/1024 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
47 8299/737280 , -7043/245760 , 5473/276480 , 0 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
48 7877/737280 , -43801/442368 , 75/128 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
49 75/128 , -25/256 , 3/256 , 0 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
50 11027/2949120 , -8461/884736 , 655/98304 , 0 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
51 7877/1769472 , -43801/1474560 , 75/1024 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
52 231/256 , 75/1024 , -15/512 , 5/1024 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
53 -601/614400 , 601/245760 , -601/368640 , 0 , 0 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
54 43801/3686400 , -25/256 , 75/128 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
55 75/128 , -25/256 , 3/256 , 0 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
56 -601/1474560 , 601/589824 , -601/884736 , 0 , 0 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
57 43801/8847360 , -15/512 , 75/1024 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
58 231/256 , 75/1024 , -15/512 , 5/1024 ] ;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
59
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
60 t2= [5/1024 , -15/512 , 75/1024, 231/256 , 75/1024 , -15/512 , 5/1024];
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
61
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
62 t3= [3/256 , -25/256 , 75/128 , 75/128 , -25/256 , 3/256];
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
63
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
64 I1(1:17,1:12)=t1;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
65 I1(M_F-16:M_F,M_C-11:M_C)=fliplr(flipud(t1));
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
66 I1(18,7:12)=t3;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
67 for i=19:2:M_F-18
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
68 j=(i-3)/2;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
69 I1(i,j-1:j+5)=t2;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
70 I1(i+1,j:j+5)=t3;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
71 end
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
72
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
73 % Fine to coarse
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
74 I2=zeros(M_C,M_F);
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
75
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
76 t1=[6854313/13976576 , 2802735/3494144 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
77 1016925/27953152 , -729595/6988288 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
78 -894315/13976576 , -1668147/6988288 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
79 -8417805/27953152 , 15525/436768 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
80 1190685/3494144 , 89725/436768 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
81 -2161869/27953152 , -858195/6988288 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
82 -332875/13976576 , 124485/6988288 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
83 165405/27953152 , -5409/3494144 , -9015/13976576; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
84 80385/12301312 , 1201479/3075328 , 1225647/6150656 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
85 , 721527/3075328 , 1178085/24602624 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
86 838645/6150656 , 60843/300032 , 345/6150656 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
87 -4994121/24602624 , -100125/768832 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
88 31911/768832 , 55219/768832 , 349515/24602624 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
89 -63387/6150656 , -42305/12301312 , 5409/6150656 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
90 , 9015/24602624 ; ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
91 -80385/5552128 , -240439/1388032 , 364155/5552128 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
92 , 105687/173504 , 1658587/2776064 , 75135/694016 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
93 , -2366403/5552128 , -217175/1388032 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
94 853293/2776064 , 344085/1388032 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
95 -268539/5552128 , -78363/694016 , -64665/2776064 ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
96 , 5473/347008 , 29475/5552128 , -1803/1388032 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
97 -3005/5552128];
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
98
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
99
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
100
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
101 t2=[ 5/2048 , 3/512 , -15/1024 , -25/512 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
102 75/2048 , 75/256 , 231/512 , 75/256 , ...
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
103 75/2048 , -25/512 , -15/1024 , 3/512 , 5/2048];
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
104
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
105 I2(1:3,1:17)=t1;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
106
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
107 I2(M_C-2:M_C,M_F-16:M_F)=fliplr(flipud(t1));
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
108
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
109 for i=4:M_C-3
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
110 j=2*(i-4)+1;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
111 I2(i,j:j+12)=t2;
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
112 end
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
113 IC2F = sparse(I1);
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
114 IF2C = sparse(I2);
c923fe6197ff Add inerpolation operator classes and implementations for MC and AWW.
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
115