Skip to content

Commit ec3ddff

Browse files
yzengclaude
andcommitted
Remove incorrect Vcell factor from RKPM Euler force spreading
The force spreading in ForceSpreadingRKPM_cir should use rkpm.weight only, not rkpm.weight * rkpm.Vcell. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7f771a1 commit ec3ddff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Source/DiffusedIB_Parallel.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,9 @@ void ForceSpreadingRKPM_cir(
858858
for (int jj = -1; jj < 2; jj++) {
859859
for (int kk = -1; kk < 2; kk++) {
860860
auto rkpm = rkpm_data[cell_index++];
861-
// Include Vcell for adjoint consistency with interpolation
862-
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex ), Real(rkpm.weight * rkpm.Vcell * fxP));
863-
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex + 1), Real(rkpm.weight * rkpm.Vcell * fyP));
864-
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex + 2), Real(rkpm.weight * rkpm.Vcell * fzP));
861+
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex ), Real(rkpm.weight * fxP));
862+
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex + 1), Real(rkpm.weight * fyP));
863+
HostDevice::Atomic::Add(&E(i + ii, j + jj, k + kk, EulerForceIndex + 2), Real(rkpm.weight * fzP));
865864
}
866865
}
867866
}

0 commit comments

Comments
 (0)