Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d2_noneq_variable_8.m @ 1326:c2d716c4f1ed feature/D2_boundary_opt
Fix bug when using wide stencils
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 13 Feb 2022 20:58:35 +0100 |
parents | 1b0f2415237f |
children | 855871e0b852 |
comparison
equal
deleted
inserted
replaced
1325:1b0f2415237f | 1326:c2d716c4f1ed |
---|---|
219 R = (1/78400 / h) * transpose(DD_8) * C1 * DD_8 + (1/14700 / h) * transpose(DD_7) * C2 * DD_7 + (1/2520 / h) * transpose(DD_6) * C3 * DD_6; | 219 R = (1/78400 / h) * transpose(DD_8) * C1 * DD_8 + (1/14700 / h) * transpose(DD_7) * C2 * DD_7 + (1/2520 / h) * transpose(DD_6) * C3 * DD_6; |
220 D2 = D1 * C1 * D1 - H \ R; | 220 D2 = D1 * C1 * D1 - H \ R; |
221 end | 221 end |
222 | 222 |
223 % Wide stencil | 223 % Wide stencil |
224 function D2 = D2_wide(c) | 224 function D2 = D2_fun_wide(c) |
225 % Here we add variable diffusion | 225 % Here we add variable diffusion |
226 C1 = sparse(diag(c)); | 226 C1 = sparse(diag(c)); |
227 D2 = D1 * C1 * D1; | 227 D2 = D1 * C1 * D1; |
228 end | 228 end |
229 | 229 |