git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8136 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Contributing authors: Roy Pollock (LLNL), Paul Crozier (SNL)
|
Contributing authors: Roy Pollock (LLNL), Paul Crozier (SNL)
|
||||||
per-atom energy/virial, group/group energy/force added by Stan Moore (BYU)
|
per-atom energy/virial & group/group energy/force added by Stan Moore (BYU)
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#include "lmptype.h"
|
#include "lmptype.h"
|
||||||
@ -137,9 +137,9 @@ void PPPM::init()
|
|||||||
error->all(FLERR,"Incorrect boundaries with slab PPPM");
|
error->all(FLERR,"Incorrect boundaries with slab PPPM");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (order > MAXORDER) {
|
if (order < 2 || order > MAXORDER) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str,"PPPM order cannot be greater than %d",MAXORDER);
|
sprintf(str,"PPPM order cannot be < 2 or > than %d",MAXORDER);
|
||||||
error->all(FLERR,str);
|
error->all(FLERR,str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ void PPPM::init()
|
|||||||
|
|
||||||
int iteration = 0;
|
int iteration = 0;
|
||||||
|
|
||||||
while (order > 0) {
|
while (order > 1) {
|
||||||
if (iteration && me == 0)
|
if (iteration && me == 0)
|
||||||
error->warning(FLERR,"Reducing PPPM order b/c stencil extends "
|
error->warning(FLERR,"Reducing PPPM order b/c stencil extends "
|
||||||
"beyond neighbor processor");
|
"beyond neighbor processor");
|
||||||
@ -1015,12 +1015,12 @@ void PPPM::set_grid()
|
|||||||
|
|
||||||
if (!gridflag) {
|
if (!gridflag) {
|
||||||
double err;
|
double err;
|
||||||
h_x = h_y = h_z = 1/g_ewald;
|
h_x = h_y = h_z = 1.0/g_ewald;
|
||||||
|
|
||||||
nx_pppm = static_cast<int> (xprd/h_x + 1);
|
|
||||||
ny_pppm = static_cast<int> (yprd/h_y + 1);
|
|
||||||
nz_pppm = static_cast<int> (zprd_slab/h_z + 1);
|
|
||||||
|
|
||||||
|
nx_pppm = static_cast<int> (xprd/h_x) + 1;
|
||||||
|
ny_pppm = static_cast<int> (yprd/h_y) + 1;
|
||||||
|
nz_pppm = static_cast<int> (zprd_slab/h_z) + 1;
|
||||||
|
|
||||||
err = rms(h_x,xprd,natoms,q2,acons);
|
err = rms(h_x,xprd,natoms,q2,acons);
|
||||||
while (err > accuracy) {
|
while (err > accuracy) {
|
||||||
err = rms(h_x,xprd,natoms,q2,acons);
|
err = rms(h_x,xprd,natoms,q2,acons);
|
||||||
@ -1064,7 +1064,7 @@ void PPPM::set_grid()
|
|||||||
f = diffpr(h_x,h_y,h_z,q2,acons);
|
f = diffpr(h_x,h_y,h_z,q2,acons);
|
||||||
|
|
||||||
hmin = MIN(h_x,MIN(h_y,h_z));
|
hmin = MIN(h_x,MIN(h_y,h_z));
|
||||||
gew2 = 10/hmin;
|
gew2 = 10.0/hmin;
|
||||||
g_ewald = gew2;
|
g_ewald = gew2;
|
||||||
fmid = diffpr(h_x,h_y,h_z,q2,acons);
|
fmid = diffpr(h_x,h_y,h_z,q2,acons);
|
||||||
|
|
||||||
|
|||||||
@ -221,9 +221,9 @@ void PPPMCuda::init()
|
|||||||
error->all(FLERR,"Incorrect boundaries with slab PPPMCuda");
|
error->all(FLERR,"Incorrect boundaries with slab PPPMCuda");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (order > MAXORDER) {
|
if (order < 2 || order > MAXORDER) {
|
||||||
char str[128];
|
char str[128];
|
||||||
sprintf(str,"PPPMCuda order cannot be greater than %d",MAXORDER);
|
sprintf(str,"PPPMCuda order cannot be smaller than 2 or greater than %d",MAXORDER);
|
||||||
error->all(FLERR,str);
|
error->all(FLERR,str);
|
||||||
}
|
}
|
||||||
// free all arrays previously allocated
|
// free all arrays previously allocated
|
||||||
@ -302,8 +302,7 @@ void PPPMCuda::init()
|
|||||||
|
|
||||||
int iteration = 0;
|
int iteration = 0;
|
||||||
|
|
||||||
while (order > 0) {
|
while (order > 1) {
|
||||||
|
|
||||||
if (iteration && me == 0)
|
if (iteration && me == 0)
|
||||||
error->warning(FLERR,"Reducing PPPMCuda order b/c stencil extends "
|
error->warning(FLERR,"Reducing PPPMCuda order b/c stencil extends "
|
||||||
"beyond neighbor processor");
|
"beyond neighbor processor");
|
||||||
|
|||||||
Reference in New Issue
Block a user