From 029a4d2df25702235bc2479186a79ac3953c894f Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 24 Aug 2011 14:11:14 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6780 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/DIPOLE/atom_vec_dipole.cpp | 4 ++-- src/KSPACE/pair_coul_long.h | 14 +++++++------- src/MOLECULE/atom_vec_angle.cpp | 4 ++-- src/MOLECULE/atom_vec_bond.cpp | 4 ++-- src/MOLECULE/atom_vec_full.cpp | 4 ++-- src/MOLECULE/atom_vec_molecular.cpp | 4 ++-- src/PERI/atom_vec_peri.cpp | 4 ++-- src/USER-AWPMD/atom_vec_wavepacket.cpp | 4 ++-- src/USER-EFF/atom_vec_electron.cpp | 4 ++-- src/atom_vec_atomic.cpp | 4 ++-- src/atom_vec_charge.cpp | 4 ++-- src/atom_vec_ellipsoid.cpp | 4 ++-- src/atom_vec_sphere.cpp | 4 ++-- 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 8d75db578a..cde9b0c806 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -68,7 +68,7 @@ void AtomVecDipole::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); mu = memory->grow(atom->mu,nmax,4,"atom:mu"); @@ -822,7 +822,7 @@ bigint AtomVecDipole::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("mu")) bytes += memory->usage(mu,nmax,4); diff --git a/src/KSPACE/pair_coul_long.h b/src/KSPACE/pair_coul_long.h index 59e2c7609d..2de7fa9d14 100644 --- a/src/KSPACE/pair_coul_long.h +++ b/src/KSPACE/pair_coul_long.h @@ -28,19 +28,19 @@ class PairCoulLong : public Pair { public: PairCoulLong(class LAMMPS *); ~PairCoulLong(); - virtual void compute(int, int); - virtual void settings(int, char **); + void compute(int, int); + void settings(int, char **); void coeff(int, char **); - virtual void init_style(); + void init_style(); double init_one(int, int); void write_restart(FILE *); void read_restart(FILE *); - virtual void write_restart_settings(FILE *); - virtual void read_restart_settings(FILE *); - virtual double single(int, int, int, int, double, double, double, double &); + void write_restart_settings(FILE *); + void read_restart_settings(FILE *); + double single(int, int, int, int, double, double, double, double &); void *extract(char *, int &); - protected: + private: double cut_coul,cut_coulsq; double *cut_respa; double g_ewald; diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index ee601d7b81..72afefb8d1 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -69,7 +69,7 @@ void AtomVecAngle::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -816,7 +816,7 @@ bigint AtomVecAngle::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 842a28f4b7..fb0a3e0583 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -70,7 +70,7 @@ void AtomVecBond::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -774,7 +774,7 @@ bigint AtomVecBond::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 8987986a04..15b3c3a84d 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -70,7 +70,7 @@ void AtomVecFull::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -986,7 +986,7 @@ bigint AtomVecFull::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index f85822722f..75c7df86cb 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -70,7 +70,7 @@ void AtomVecMolecular::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); @@ -966,7 +966,7 @@ bigint AtomVecMolecular::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); if (atom->memcheck("nspecial")) bytes += memory->usage(nspecial,nmax,3); diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index f42f1d1f4a..95a72d10fd 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -72,7 +72,7 @@ void AtomVecPeri::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); vfrac = memory->grow(atom->vfrac,nmax,"atom:vfrac"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); @@ -824,7 +824,7 @@ bigint AtomVecPeri::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("vfrac")) bytes += memory->usage(vfrac,nmax); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index 8af7049746..dd4a0657f8 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -78,7 +78,7 @@ void AtomVecWavepacket::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); spin = memory->grow(atom->spin,nmax,"atom:spin"); @@ -991,7 +991,7 @@ bigint AtomVecWavepacket::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 55dd7f5c20..c7affbc384 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -72,7 +72,7 @@ void AtomVecElectron::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); spin = memory->grow(atom->spin,nmax,"atom:spin"); @@ -839,7 +839,7 @@ bigint AtomVecElectron::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); if (atom->memcheck("spin")) bytes += memory->usage(spin,nmax); diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index 9f991eb289..a0bf79a127 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -64,7 +64,7 @@ void AtomVecAtomic::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -630,7 +630,7 @@ bigint AtomVecAtomic::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); return bytes; } diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index 1b9159c33d..5def3bd99f 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -66,7 +66,7 @@ void AtomVecCharge::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); q = memory->grow(atom->q,nmax,"atom:q"); @@ -695,7 +695,7 @@ bigint AtomVecCharge::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("q")) bytes += memory->usage(q,nmax); diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 80776fedd1..2ccb91a6ca 100755 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -86,7 +86,7 @@ void AtomVecEllipsoid::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); angmom = memory->grow(atom->angmom,nmax,3,"atom:angmom"); @@ -1246,7 +1246,7 @@ bigint AtomVecEllipsoid::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax); if (atom->memcheck("angmom")) bytes += memory->usage(angmom,nmax,3); diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 77b33cc816..b17817412e 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -97,7 +97,7 @@ void AtomVecSphere::grow(int n) image = memory->grow(atom->image,nmax,"atom:image"); x = memory->grow(atom->x,nmax,3,"atom:x"); v = memory->grow(atom->v,nmax,3,"atom:v"); - f = memory->grow(atom->f,nmax,3*comm->nthreads,"atom:f"); + f = memory->grow(atom->f,nmax*comm->nthreads,3,"atom:f"); radius = memory->grow(atom->radius,nmax,"atom:radius"); rmass = memory->grow(atom->rmass,nmax,"atom:rmass"); @@ -1048,7 +1048,7 @@ bigint AtomVecSphere::memory_usage() if (atom->memcheck("image")) bytes += memory->usage(image,nmax); if (atom->memcheck("x")) bytes += memory->usage(x,nmax,3); if (atom->memcheck("v")) bytes += memory->usage(v,nmax,3); - if (atom->memcheck("f")) bytes += memory->usage(f,nmax,3*comm->nthreads); + if (atom->memcheck("f")) bytes += memory->usage(f,nmax*comm->nthreads,3); if (atom->memcheck("radius")) bytes += memory->usage(radius,nmax); if (atom->memcheck("rmass")) bytes += memory->usage(rmass,nmax);