Mercurial > repos > public > sbplib
comparison +scheme/Beam.m @ 242:f4306afd6849 feature/beams
Beam: improvements.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 30 Aug 2016 10:43:58 +0200 |
parents | 46256fffa329 |
children | 369c643b60c3 |
comparison
equal
deleted
inserted
replaced
241:09d964b850ee | 242:f4306afd6849 |
---|---|
4 grid | 4 grid |
5 | 5 |
6 D % non-stabalized scheme operator | 6 D % non-stabalized scheme operator |
7 alpha | 7 alpha |
8 | 8 |
9 h | |
9 H % Discrete norm | 10 H % Discrete norm |
10 Hi | 11 Hi |
11 | 12 |
12 e_l, e_r | 13 e_l, e_r |
13 d1_l, d1_r | 14 d1_l, d1_r |
14 d2_l, d2_r | 15 d2_l, d2_r |
15 d3_l, d3_r | 16 d3_l, d3_r |
16 gamm | 17 gamm |
17 delt | 18 delt |
19 alphaII | |
20 alphaIII | |
18 | 21 |
19 opt | 22 opt |
20 end | 23 end |
21 | 24 |
22 methods | 25 methods |
68 alphaII = ops.borrowing.N.S2/2; | 71 alphaII = ops.borrowing.N.S2/2; |
69 alphaIII = ops.borrowing.N.S3/2; | 72 alphaIII = ops.borrowing.N.S3/2; |
70 | 73 |
71 obj.gamm = h*alphaII; | 74 obj.gamm = h*alphaII; |
72 obj.delt = h^3*alphaIII; | 75 obj.delt = h^3*alphaIII; |
76 obj.alphaII = alphaII; | |
77 obj.alphaIII = alphaIII; | |
78 obj.h = h; | |
73 obj.opt = opt; | 79 obj.opt = opt; |
74 end | 80 end |
75 | 81 |
76 | 82 |
77 % Closure functions return the opertors applied to the own doamin to close the boundary | 83 % Closure functions return the opertors applied to the own doamin to close the boundary |
121 | 127 |
122 | 128 |
123 alpha_u = obj.alpha; | 129 alpha_u = obj.alpha; |
124 alpha_v = neighbour_scheme.alpha; | 130 alpha_v = neighbour_scheme.alpha; |
125 | 131 |
132 | |
126 switch boundary | 133 switch boundary |
127 case 'l' | 134 case 'l' |
128 interface_opt = obj.opt.interface_l; | 135 interface_opt = obj.opt.interface_l; |
129 case 'r' | 136 case 'r' |
130 interface_opt = obj.opt.interface_r; | 137 interface_opt = obj.opt.interface_r; |
141 tuning = interface_opt.tuning; | 148 tuning = interface_opt.tuning; |
142 | 149 |
143 tau1 = ((alpha_u/2)/delt_u + (alpha_v/2)/delt_v)/2*tuning; | 150 tau1 = ((alpha_u/2)/delt_u + (alpha_v/2)/delt_v)/2*tuning; |
144 sig2 = ((alpha_u/2)/gamm_u + (alpha_v/2)/gamm_v)/2*tuning; | 151 sig2 = ((alpha_u/2)/gamm_u + (alpha_v/2)/gamm_v)/2*tuning; |
145 else | 152 else |
146 tau1 = interface_opt.tau; | 153 h_u = obj.h; |
147 sig2 = interface_opt.sig; | 154 h_v = neighbour_scheme.h; |
155 | |
156 switch neighbour_boundary | |
157 case 'l' | |
158 neighbour_interface_opt = neighbour_scheme.opt.interface_l; | |
159 case 'r' | |
160 neighbour_interface_opt = neighbour_scheme.opt.interface_r; | |
161 end | |
162 | |
163 tau_u = interface_opt.tau; | |
164 sig_u = interface_opt.sig; | |
165 tau_v = neighbour_interface_opt.tau; | |
166 sig_v = neighbour_interface_opt.sig; | |
167 | |
168 tau1 = tau_u/h_u^3 + tau_v/h_v^3; | |
169 sig2 = sig_u/h_u + sig_v/h_v; | |
148 end | 170 end |
149 | 171 |
150 tau4 = s_u*alpha_u/2; | 172 tau4 = s_u*alpha_u/2; |
151 sig3 = -s_u*alpha_u/2; | 173 sig3 = -s_u*alpha_u/2; |
152 phi2 = s_u*1/2; | 174 phi2 = s_u*1/2; |