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

View File

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

View File

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