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

This commit is contained in:
sjplimp 2007-10-05 00:32:35 +00:00
parent 69e283e0cc
commit 0eb55ec7ac
6 changed files with 53 additions and 13 deletions

View File

@ -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]++;

View File

@ -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 **);
};
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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

View File

@ -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