Mercurial > repos > public > sbplib
comparison +scheme/LaplaceCurvilinear.m @ 557:2a856a589510 feature/grids/laplace_refactor
Add creation of physical boundary normal derivatives
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 29 Aug 2017 12:32:57 +0200 |
parents | 6e71d4f8b155 |
children | 54c775c3348a e3f587bfd7f8 |
comparison
equal
deleted
inserted
replaced
556:2eb1ccef26cd | 557:2a856a589510 |
---|---|
168 obj.e_w = e_w; | 168 obj.e_w = e_w; |
169 obj.e_e = e_e; | 169 obj.e_e = e_e; |
170 obj.e_s = e_s; | 170 obj.e_s = e_s; |
171 obj.e_n = e_n; | 171 obj.e_n = e_n; |
172 | 172 |
173 %% normal derivatives | |
174 I_w = ind(1,:); | |
175 I_e = ind(end,:); | |
176 I_s = ind(:,1); | |
177 I_n = ind(:,end); | |
178 | |
179 a11_w = spdiag(a11(I_w)); | |
180 a12_w = spdiag(a12(I_w)); | |
181 a11_e = spdiag(a11(I_e)); | |
182 a12_e = spdiag(a12(I_e)); | |
183 a22_s = spdiag(a22(I_s)); | |
184 a12_s = spdiag(a12(I_s)); | |
185 a22_n = spdiag(a22(I_n)); | |
186 a12_n = spdiag(a12(I_n)); | |
187 | |
188 d_w = -1*(a11_w*obj.du_w' + a12_w*obj.dv_w')'; | |
189 d_e = (a11_e*obj.du_e' + a12_e*obj.dv_e')'; | |
190 d_s = -1*(a22_s*obj.dv_s' + a12_s*obj.du_s')'; | |
191 d_n = (a22_n*obj.dv_n' + a12_n*obj.du_n')'; | |
173 | 192 |
174 obj.Dx = spdiag( y_v./J)*Du + spdiag(-y_u./J)*Dv; | 193 obj.Dx = spdiag( y_v./J)*Du + spdiag(-y_u./J)*Dv; |
175 obj.Dy = spdiag(-x_v./J)*Du + spdiag( x_u./J)*Dv; | 194 obj.Dy = spdiag(-x_v./J)*Du + spdiag( x_u./J)*Dv; |
176 | 195 |
177 | 196 |