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

This commit is contained in:
sjplimp
2014-08-08 14:25:15 +00:00
parent 1ff3afc54c
commit 9026afed5c
11 changed files with 36 additions and 1 deletions

View File

@ -1428,6 +1428,9 @@ void MSM::particle_map()
int flag = 0; int flag = 0;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
// (nx,ny,nz) = global coords of grid pt to "lower left" of charge // (nx,ny,nz) = global coords of grid pt to "lower left" of charge

View File

@ -309,6 +309,9 @@ void MSMCG::particle_map()
int flag = 0; int flag = 0;
int i; int i;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
for (int j = 0; j < num_charged; j++) { for (int j = 0; j < num_charged; j++) {
i = is_charged[j]; i = is_charged[j];

View File

@ -1875,6 +1875,10 @@ void PPPM::particle_map()
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
int flag = 0; int flag = 0;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
// (nx,ny,nz) = global coords of grid pt to "lower left" of charge // (nx,ny,nz) = global coords of grid pt to "lower left" of charge
@ -1893,8 +1897,9 @@ void PPPM::particle_map()
if (nx+nlower < nxlo_out || nx+nupper > nxhi_out || if (nx+nlower < nxlo_out || nx+nupper > nxhi_out ||
ny+nlower < nylo_out || ny+nupper > nyhi_out || ny+nlower < nylo_out || ny+nupper > nyhi_out ||
nz+nlower < nzlo_out || nz+nupper > nzhi_out) nz+nlower < nzlo_out || nz+nupper > nzhi_out) {
flag = 1; flag = 1;
}
} }
if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM"); if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM");

View File

@ -282,6 +282,9 @@ void PPPMCG::particle_map()
double **x = atom->x; double **x = atom->x;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int flag = 0; int flag = 0;
for (int j = 0; j < num_charged; j++) { for (int j = 0; j < num_charged; j++) {
int i = is_charged[j]; int i = is_charged[j];

View File

@ -4209,6 +4209,9 @@ void PPPMDisp::particle_map(double delx, double dely, double delz,
double **x = atom->x; double **x = atom->x;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int flag = 0; int flag = 0;
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {

View File

@ -78,6 +78,9 @@ void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz,
double **x = atom->x; double **x = atom->x;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int flag = 0; int flag = 0;
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
if (type[i] == typeO) { if (type[i] == typeO) {

View File

@ -679,6 +679,9 @@ void PPPMStagger::particle_map()
double **x = atom->x; double **x = atom->x;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int flag = 0; int flag = 0;
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {

View File

@ -73,6 +73,9 @@ void PPPMTIP4P::particle_map()
double **x = atom->x; double **x = atom->x;
int nlocal = atom->nlocal; int nlocal = atom->nlocal;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int flag = 0; int flag = 0;
for (int i = 0; i < nlocal; i++) { for (int i = 0; i < nlocal; i++) {
if (type[i] == typeO) { if (type[i] == typeO) {

View File

@ -324,6 +324,9 @@ void MSMCGOMP::particle_map()
int flag = 0; int flag = 0;
int i; int i;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
// XXX: O(N). is it worth to add OpenMP here? // XXX: O(N). is it worth to add OpenMP here?
for (int j = 0; j < num_charged; j++) { for (int j = 0; j < num_charged; j++) {
i = is_charged[j]; i = is_charged[j];

View File

@ -359,6 +359,9 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv,
const int nyhi_out = nyhi_o; const int nyhi_out = nyhi_o;
const int nzhi_out = nzhi_o; const int nzhi_out = nzhi_o;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int i, flag = 0; int i, flag = 0;
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel for private(i) default(none) reduction(+:flag) schedule(static) #pragma omp parallel for private(i) default(none) reduction(+:flag) schedule(static)

View File

@ -343,6 +343,9 @@ void PPPMTIP4POMP::particle_map()
const double boxloz = boxlo[2]; const double boxloz = boxlo[2];
const int nlocal = atom->nlocal; const int nlocal = atom->nlocal;
if (!isfinite(boxlo[0]) || !isfinite(boxlo[1]) || !isfinite(boxlo[2]))
error->one(FLERR,"Non-numeric box dimensions - simulation unstable");
int i, flag = 0; int i, flag = 0;
#if defined(_OPENMP) #if defined(_OPENMP)
#pragma omp parallel for private(i) default(none) reduction(+:flag) schedule(static) #pragma omp parallel for private(i) default(none) reduction(+:flag) schedule(static)