git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7924 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2012-03-07 15:51:43 +00:00
parent b26635580a
commit 6c836ed0e4
8 changed files with 281 additions and 13 deletions

View File

@ -993,9 +993,12 @@ void PPPM::set_grid()
double h_x,h_y,h_z;
bigint natoms = atom->natoms;
if (!gewaldflag)
g_ewald = sqrt(-log(accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) /
(2.0*q2))) / cutoff;
if (!gewaldflag) {
g_ewald = accuracy*sqrt(natoms*cutoff*xprd*yprd*zprd) / (2.0*q2);
if (g_ewald >= 1.0)
error->all(FLERR,"KSpace accuracy too large to estimate G vector");
g_ewald = sqrt(-log(g_ewald)) / cutoff;
}
// set optimal nx_pppm,ny_pppm,nz_pppm based on order and accuracy
// nz_pppm uses extended zprd_slab instead of zprd