diff --git a/src/MEAM/pair_meam.cpp b/src/MEAM/pair_meam.cpp index 212b3a42f9..d8031edf6e 100644 --- a/src/MEAM/pair_meam.cpp +++ b/src/MEAM/pair_meam.cpp @@ -120,7 +120,7 @@ void PairMEAM::compute(int eflag, int vflag) { int i,j,ii,n,inum_half,itype,jtype,errorflag; int *ilist_half,*jlist_half,*numneigh_half,**firstneigh_half; - int *numneigh_full,*firstneigh_full; + int *numneigh_full,**firstneigh_full; // grow local arrays if necessary @@ -227,7 +227,7 @@ void PairMEAM::compute(int eflag, int vflag) errorflag = 0; for (ii = 0; ii < inum_half; ii++) { - i = ilist[ii]; + i = ilist_half[ii]; ifort = i+1; meam_dens_init_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0], &numneigh_half[i],firstneigh_half[i], @@ -240,7 +240,7 @@ void PairMEAM::compute(int eflag, int vflag) sprintf(str,"MEAM library error %d",errorflag); error->one(str); } - offset += numneigh[i]; + offset += numneigh_half[i]; } reverse_flag = 0; @@ -261,7 +261,7 @@ void PairMEAM::compute(int eflag, int vflag) offset = 0; for (ii = 0; ii < inum_half; ii++) { - i = ilist[ii]; + i = ilist_half[ii]; ifort = i+1; meam_force_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0], &numneigh_half[i],firstneigh_half[i], @@ -275,7 +275,7 @@ void PairMEAM::compute(int eflag, int vflag) sprintf(str,"MEAM library error %d",errorflag); error->one(str); } - offset += numneigh[i]; + offset += numneigh_half[i]; } reverse_flag = 1; @@ -904,26 +904,26 @@ double PairMEAM::memory_usage() needed for access by MEAM Fortran library ------------------------------------------------------------------------- */ -void PairMEAM::neigh_f2c(int inum, int *nlist, int *numneigh, int **firstneigh) +void PairMEAM::neigh_f2c(int inum, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jnum; int *jlist; for (ii = 0; ii < inum; ii++) { - i = list[ii]; + i = ilist[ii]; jlist = firstneigh[i]; jnum = numneigh[i]; for (j = 0; j < jnum; j++) jlist[j]--; } } -void PairMEAM::neigh_c2f(int inum, int *nlist, int *numneigh, int **firstneigh) +void PairMEAM::neigh_c2f(int inum, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jnum; int *jlist; for (ii = 0; ii < inum; ii++) { - i = list[ii]; + i = ilist[ii]; jlist = firstneigh[i]; jnum = numneigh[i]; for (j = 0; j < jnum; j++) jlist[j]++; diff --git a/src/MEAM/pair_meam.h b/src/MEAM/pair_meam.h index f700cabf0b..0d8f552bd5 100644 --- a/src/MEAM/pair_meam.h +++ b/src/MEAM/pair_meam.h @@ -87,8 +87,8 @@ class PairMEAM : public Pair { void allocate(); void read_files(char *, char *); - void neigh_f2c(int *, int **); - void neigh_c2f(int *, int **); + void neigh_f2c(int, int *, int *, int **); + void neigh_c2f(int, int *, int *, int **); }; } diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 48cc7705d1..3eea14e71d 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -1543,7 +1543,7 @@ void FixPOEMS::copy_arrays(int i, int j) double FixPOEMS::memory_usage() { int nmax = atom->nmax; - int double = nmax * sizeof(int); + double bytes = nmax * sizeof(int); bytes += nmax*MAXBODY * sizeof(int); bytes += nmax*3 * sizeof(double); return bytes; diff --git a/src/pair_table.cpp b/src/pair_table.cpp index 0d54ae33be..f0f1a13515 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -982,5 +982,5 @@ void *PairTable::extract(char *str) for (int m = 1; m < ntables; m++) if (tables[m].cut != cut_coul) error->all("Pair table cutoffs must all be equal to use with KSpace"); - return &cut_coul; + return &tables[0].cut; } diff --git a/src/style_meam.h b/src/style_meam.h index e69de29bb2..221a363f11 100644 --- a/src/style_meam.h +++ b/src/style_meam.h @@ -0,0 +1,20 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PairInclude +#include "pair_meam.h" +#endif + +#ifdef PairClass +PairStyle(meam,PairMEAM) +#endif diff --git a/src/style_poems.h b/src/style_poems.h index e69de29bb2..0434d02bf8 100644 --- a/src/style_poems.h +++ b/src/style_poems.h @@ -0,0 +1,20 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef FixInclude +#include "fix_poems.h" +#endif + +#ifdef FixClass +FixStyle(poems,FixPOEMS) +#endif