git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@956 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -120,7 +120,7 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||||||
{
|
{
|
||||||
int i,j,ii,n,inum_half,itype,jtype,errorflag;
|
int i,j,ii,n,inum_half,itype,jtype,errorflag;
|
||||||
int *ilist_half,*jlist_half,*numneigh_half,**firstneigh_half;
|
int *ilist_half,*jlist_half,*numneigh_half,**firstneigh_half;
|
||||||
int *numneigh_full,*firstneigh_full;
|
int *numneigh_full,**firstneigh_full;
|
||||||
|
|
||||||
// grow local arrays if necessary
|
// grow local arrays if necessary
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||||||
errorflag = 0;
|
errorflag = 0;
|
||||||
|
|
||||||
for (ii = 0; ii < inum_half; ii++) {
|
for (ii = 0; ii < inum_half; ii++) {
|
||||||
i = ilist[ii];
|
i = ilist_half[ii];
|
||||||
ifort = i+1;
|
ifort = i+1;
|
||||||
meam_dens_init_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0],
|
meam_dens_init_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0],
|
||||||
&numneigh_half[i],firstneigh_half[i],
|
&numneigh_half[i],firstneigh_half[i],
|
||||||
@ -240,7 +240,7 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||||||
sprintf(str,"MEAM library error %d",errorflag);
|
sprintf(str,"MEAM library error %d",errorflag);
|
||||||
error->one(str);
|
error->one(str);
|
||||||
}
|
}
|
||||||
offset += numneigh[i];
|
offset += numneigh_half[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse_flag = 0;
|
reverse_flag = 0;
|
||||||
@ -261,7 +261,7 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
for (ii = 0; ii < inum_half; ii++) {
|
for (ii = 0; ii < inum_half; ii++) {
|
||||||
i = ilist[ii];
|
i = ilist_half[ii];
|
||||||
ifort = i+1;
|
ifort = i+1;
|
||||||
meam_force_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0],
|
meam_force_(&ifort,&nmax,&eflag,&eng_vdwl,&ntype,type,fmap,&x[0][0],
|
||||||
&numneigh_half[i],firstneigh_half[i],
|
&numneigh_half[i],firstneigh_half[i],
|
||||||
@ -275,7 +275,7 @@ void PairMEAM::compute(int eflag, int vflag)
|
|||||||
sprintf(str,"MEAM library error %d",errorflag);
|
sprintf(str,"MEAM library error %d",errorflag);
|
||||||
error->one(str);
|
error->one(str);
|
||||||
}
|
}
|
||||||
offset += numneigh[i];
|
offset += numneigh_half[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
reverse_flag = 1;
|
reverse_flag = 1;
|
||||||
@ -904,26 +904,26 @@ double PairMEAM::memory_usage()
|
|||||||
needed for access by MEAM Fortran library
|
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 i,j,ii,jnum;
|
||||||
int *jlist;
|
int *jlist;
|
||||||
|
|
||||||
for (ii = 0; ii < inum; ii++) {
|
for (ii = 0; ii < inum; ii++) {
|
||||||
i = list[ii];
|
i = ilist[ii];
|
||||||
jlist = firstneigh[i];
|
jlist = firstneigh[i];
|
||||||
jnum = numneigh[i];
|
jnum = numneigh[i];
|
||||||
for (j = 0; j < jnum; j++) jlist[j]--;
|
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 i,j,ii,jnum;
|
||||||
int *jlist;
|
int *jlist;
|
||||||
|
|
||||||
for (ii = 0; ii < inum; ii++) {
|
for (ii = 0; ii < inum; ii++) {
|
||||||
i = list[ii];
|
i = ilist[ii];
|
||||||
jlist = firstneigh[i];
|
jlist = firstneigh[i];
|
||||||
jnum = numneigh[i];
|
jnum = numneigh[i];
|
||||||
for (j = 0; j < jnum; j++) jlist[j]++;
|
for (j = 0; j < jnum; j++) jlist[j]++;
|
||||||
|
|||||||
@ -87,8 +87,8 @@ class PairMEAM : public Pair {
|
|||||||
|
|
||||||
void allocate();
|
void allocate();
|
||||||
void read_files(char *, char *);
|
void read_files(char *, char *);
|
||||||
void neigh_f2c(int *, int **);
|
void neigh_f2c(int, int *, int *, int **);
|
||||||
void neigh_c2f(int *, int **);
|
void neigh_c2f(int, int *, int *, int **);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1543,7 +1543,7 @@ void FixPOEMS::copy_arrays(int i, int j)
|
|||||||
double FixPOEMS::memory_usage()
|
double FixPOEMS::memory_usage()
|
||||||
{
|
{
|
||||||
int nmax = atom->nmax;
|
int nmax = atom->nmax;
|
||||||
int double = nmax * sizeof(int);
|
double bytes = nmax * sizeof(int);
|
||||||
bytes += nmax*MAXBODY * sizeof(int);
|
bytes += nmax*MAXBODY * sizeof(int);
|
||||||
bytes += nmax*3 * sizeof(double);
|
bytes += nmax*3 * sizeof(double);
|
||||||
return bytes;
|
return bytes;
|
||||||
|
|||||||
@ -982,5 +982,5 @@ void *PairTable::extract(char *str)
|
|||||||
for (int m = 1; m < ntables; m++)
|
for (int m = 1; m < ntables; m++)
|
||||||
if (tables[m].cut != cut_coul)
|
if (tables[m].cut != cut_coul)
|
||||||
error->all("Pair table cutoffs must all be equal to use with KSpace");
|
error->all("Pair table cutoffs must all be equal to use with KSpace");
|
||||||
return &cut_coul;
|
return &tables[0].cut;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user