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

This commit is contained in:
sjplimp 2014-04-04 16:40:30 +00:00
parent 0de9e4252b
commit ce9b5d2f3f
3 changed files with 30 additions and 15 deletions

View File

@ -27,6 +27,7 @@
#include "domain.h" #include "domain.h"
#include "error.h" #include "error.h"
#include "force.h" #include "force.h"
#include "neighbor.h"
#include "memory.h" #include "memory.h"
#include "msm_cg.h" #include "msm_cg.h"
@ -155,12 +156,16 @@ void MSMCG::compute(int eflag, int vflag)
} }
} }
num_charged = 0; // only need to rebuild this list after a neighbor list update
for (i = 0; i < nlocal; ++i) if (neighbor->ago == 0) {
if (fabs(q[i]) > smallq) { num_charged = 0;
is_charged[num_charged] = i; for (i = 0; i < nlocal; ++i) {
++num_charged; if (fabs(q[i]) > smallq) {
is_charged[num_charged] = i;
++num_charged;
}
} }
}
// find grid points for all my particles // find grid points for all my particles
// map my particle charge onto my local 3d density grid (aninterpolation) // map my particle charge onto my local 3d density grid (aninterpolation)

View File

@ -26,6 +26,7 @@
#include "domain.h" #include "domain.h"
#include "error.h" #include "error.h"
#include "force.h" #include "force.h"
#include "neighbor.h"
#include "memory.h" #include "memory.h"
#include "pppm_cg.h" #include "pppm_cg.h"
@ -153,12 +154,16 @@ void PPPMCG::compute(int eflag, int vflag)
} }
} }
num_charged = 0; // only need to rebuild this list after a neighbor list update
for (int i = 0; i < atom->nlocal; ++i) if (neighbor->ago == 0) {
if (fabs(atom->q[i]) > smallq) { num_charged = 0;
is_charged[num_charged] = i; for (int i = 0; i < atom->nlocal; ++i) {
++num_charged; if (fabs(atom->q[i]) > smallq) {
is_charged[num_charged] = i;
++num_charged;
}
} }
}
// find grid points for all my particles // find grid points for all my particles
// map my particle charge onto my local 3d density grid // map my particle charge onto my local 3d density grid

View File

@ -28,6 +28,7 @@
#include "domain.h" #include "domain.h"
#include "error.h" #include "error.h"
#include "force.h" #include "force.h"
#include "neighbor.h"
#include "memory.h" #include "memory.h"
#include "msm_cg_omp.h" #include "msm_cg_omp.h"
@ -156,12 +157,16 @@ void MSMCGOMP::compute(int eflag, int vflag)
} }
} }
num_charged = 0; // only need to rebuild this list after a neighbor list update
for (i = 0; i < nlocal; ++i) if (neighbor->ago == 0) {
if (fabs(q[i]) > smallq) { num_charged = 0;
is_charged[num_charged] = i; for (i = 0; i < nlocal; ++i) {
++num_charged; if (fabs(q[i]) > smallq) {
is_charged[num_charged] = i;
++num_charged;
}
} }
}
// find grid points for all my particles // find grid points for all my particles
// map my particle charge onto my local 3d density grid (aninterpolation) // map my particle charge onto my local 3d density grid (aninterpolation)