Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d2_noneq_variable_12.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 |
---|---|
362 R = (1/30735936 / h) * transpose(DD_12) * C1 * DD_12 + (1/6403320 / h) * transpose(DD_11) * C2 * DD_11 + (1/1293600 / h) * transpose(DD_10) * C3 * DD_10 + (1/249480 / h) * transpose(DD_9) * C4 * DD_9 + (1/44352 / h) * transpose(DD_8) * C5 * DD_8; | 362 R = (1/30735936 / h) * transpose(DD_12) * C1 * DD_12 + (1/6403320 / h) * transpose(DD_11) * C2 * DD_11 + (1/1293600 / h) * transpose(DD_10) * C3 * DD_10 + (1/249480 / h) * transpose(DD_9) * C4 * DD_9 + (1/44352 / h) * transpose(DD_8) * C5 * DD_8; |
363 D2 = D1 * C1 * D1 - H \ R; | 363 D2 = D1 * C1 * D1 - H \ R; |
364 end | 364 end |
365 | 365 |
366 % Wide stencil | 366 % Wide stencil |
367 function D2 = D2_wide(c) | 367 function D2 = D2_fun_wide(c) |
368 % Here we add variable diffusion | 368 % Here we add variable diffusion |
369 C1 = sparse(diag(c)); | 369 C1 = sparse(diag(c)); |
370 D2 = D1 * C1 * D1; | 370 D2 = D1 * C1 * D1; |
371 end | 371 end |
372 | 372 |