Fix CUDA AMR symmetry drift

This commit is contained in:
2026-05-17 23:46:15 +08:00
parent a0b43bae04
commit f2264989d8
5 changed files with 37 additions and 18 deletions

View File

@@ -7693,15 +7693,15 @@ __device__ __forceinline__ double load_comm_state_cell_sym(const double * __rest
{
double s = 1.0;
if (x < 0) {
x = -x;
x = -x - 1;
s *= d_comm_state_soa[3 * state_index + 0];
}
if (y < 0) {
y = -y;
y = -y - 1;
s *= d_comm_state_soa[3 * state_index + 1];
}
if (z < 0) {
z = -z;
z = -z - 1;
s *= d_comm_state_soa[3 * state_index + 2];
}
const int src = x + y * nx + z * nx * ny;