Skip to content

Commit b2c8a89

Browse files
authored
Merge pull request brucefan1983#1184 from brucefan1983/fix_bec_transpose
use VASP convention for BEC
2 parents 03a6f97 + 0b70703 commit b2c8a89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main_gpumd/add_efield.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ static void __global__ add_efield_bec(
7777
g_bec[atom_id + 7 * num_atoms],
7878
g_bec[atom_id + 8 * num_atoms]
7979
};
80-
g_fx[atom_id] += bec[0] * Ex + bec[1] * Ey + bec[2] * Ez;
81-
g_fy[atom_id] += bec[3] * Ex + bec[4] * Ey + bec[5] * Ez;
82-
g_fz[atom_id] += bec[6] * Ex + bec[7] * Ey + bec[8] * Ez;
80+
g_fx[atom_id] += bec[0] * Ex + bec[3] * Ey + bec[6] * Ez;
81+
g_fy[atom_id] += bec[1] * Ex + bec[4] * Ey + bec[7] * Ez;
82+
g_fz[atom_id] += bec[2] * Ex + bec[5] * Ey + bec[8] * Ez;
8383
}
8484
}
8585

0 commit comments

Comments
 (0)