Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d2_noneq_variable_4.m @ 1332:8e9df030a0a5 feature/D2_boundary_opt
Clarify comments
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 04 May 2022 08:42:13 +0200 |
parents | 855871e0b852 |
children | b4e5e45bd239 |
comparison
equal
deleted
inserted
replaced
1331:60c875c18de3 | 1332:8e9df030a0a5 |
---|---|
113 % point narrow stencil. | 113 % point narrow stencil. |
114 R = (1/144 / h) * transpose(DD_4) * C1 * DD_4 + (1/18 / h) * transpose(DD_3) * C2 * DD_3; | 114 R = (1/144 / h) * transpose(DD_4) * C1 * DD_4 + (1/18 / h) * transpose(DD_3) * C2 * DD_3; |
115 D2 = D1 * C1 * D1 - H \ R; | 115 D2 = D1 * C1 * D1 - H \ R; |
116 end | 116 end |
117 | 117 |
118 % Few additional grid point in interior stencil cmp. to minimal | 118 % Non-minimal 7 point stencil width |
119 function D2 = D2_fun_nonminimal(c) | 119 function D2 = D2_fun_nonminimal(c) |
120 % Here we add variable diffusion | 120 % Here we add variable diffusion |
121 C1 = sparse(diag(c)); | 121 C1 = sparse(diag(c)); |
122 | 122 |
123 % Remainder term added to wide second derivative operator | 123 % Remainder term added to wide second derivative operator |