Fix fourth-order C lopsided and KO stencil indexing

This commit is contained in:
2026-05-14 15:19:36 +08:00
parent c6e1a125b8
commit a628b8e2ff
3 changed files with 12 additions and 12 deletions

View File

@@ -127,11 +127,11 @@ void kodis(const int ex[3],
if (!(i0_lo > i0_hi || j0_lo > j0_hi || k0_lo > k0_hi)) {
for (int k0 = k0_lo; k0 <= k0_hi; ++k0) {
const int kF = k0 + 2;
const int kF = k0 + 1;
for (int j0 = j0_lo; j0 <= j0_hi; ++j0) {
const int jF = j0 + 2;
const int jF = j0 + 1;
for (int i0 = i0_lo; i0 <= i0_hi; ++i0) {
const int iF = i0 + 2;
const int iF = i0 + 1;
const size_t p = idx_ex(i0, j0, k0, ex);
const double Dx = (