forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14519 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
ce471ffcdb
commit
dd2d454fc4
|
@ -696,7 +696,7 @@ void PairPolymorphic::read_file(char *file)
|
|||
p.P = new tabularFunction(nr,-cutmax,cutmax);
|
||||
(p.P)->set_values(nr,-cutmax,cutmax,singletable,epsilon);
|
||||
}
|
||||
delete singletable;
|
||||
delete[] singletable;
|
||||
singletable = new double[ng];
|
||||
for (int i = 0; i < ntriple; i++) { // G
|
||||
TripletParameters & p = tripletParameters[i];
|
||||
|
@ -707,7 +707,7 @@ void PairPolymorphic::read_file(char *file)
|
|||
p.G = new tabularFunction(ng,-1.0,1.0);
|
||||
(p.G)->set_values(ng,-1.0,1.0,singletable,epsilon);
|
||||
}
|
||||
delete singletable;
|
||||
delete[] singletable;
|
||||
singletable = new double[nx];
|
||||
for (int i = 0; i < npair; i++) { // F
|
||||
PairParameters & p = pairParameters[i];
|
||||
|
@ -718,7 +718,7 @@ void PairPolymorphic::read_file(char *file)
|
|||
p.F = new tabularFunction(nx,0.0,maxX);
|
||||
(p.F)->set_values(nx,0.0,maxX,singletable,epsilon);
|
||||
}
|
||||
delete singletable;
|
||||
delete[] singletable;
|
||||
if (comm->me == 0) {
|
||||
fclose(fp);
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ style_minimize.h
|
|||
style_pair.h
|
||||
style_region.h
|
||||
# deleted on 15 Jan 2016
|
||||
pair_line_lj.cpp
|
||||
pair_line_lj.h
|
||||
pair_tri_lj.cpp
|
||||
pair_tri_lj.h
|
||||
pair_line_lj_omp.cpp
|
||||
pair_line_lj_omp.h
|
||||
pair_tri_lj_omp.cpp
|
||||
pair_tri_lj_omp.h
|
||||
# deleted on 13 May 14
|
||||
commgrid.cpp
|
||||
commgrid.h
|
||||
|
|
|
@ -314,7 +314,7 @@ double FixQEqFire::compute_eneg()
|
|||
int FixQEqFire::pack_forward_comm(int n, int *list, double *buf,
|
||||
int pbc_flag, int *pbc)
|
||||
{
|
||||
int m;
|
||||
int m = 0;
|
||||
|
||||
if( pack_flag == 1 )
|
||||
for(m = 0; m < n; m++) buf[m] = atom->q[list[m]];
|
||||
|
|
|
@ -1350,8 +1350,7 @@ void PairSMTBQ::tabqeq()
|
|||
// ofstream fichier("tabqeq.txt", ios::out | ios::trunc) ;
|
||||
// -------------------
|
||||
|
||||
double pi,mu;
|
||||
pi = 4.0*atan(1.0);
|
||||
double mu;
|
||||
|
||||
mu = erfc(alf*rc)/rc ;
|
||||
|
||||
|
@ -1366,10 +1365,10 @@ void PairSMTBQ::tabqeq()
|
|||
potqn[k] = 14.4*(erfc(alf*r)/r - mu) ;
|
||||
|
||||
// $$$ Here is (1/r)*dE/dr
|
||||
dpotqn[k] = -14.4*( (erfc(alf*r)/(r*r) + 2.0*alf/sqrt(pi)/r*exp(-alf*alf*r*r))/r ) ;
|
||||
dpotqn[k] = -14.4*( (erfc(alf*r)/(r*r) + 2.0*alf/MY_PIS/r*exp(-alf*alf*r*r))/r ) ;
|
||||
}
|
||||
|
||||
Vself = -14.4*(alf/sqrt(pi) + mu*0.5) ;
|
||||
Vself = -14.4*(alf/MY_PIS + mu*0.5) ;
|
||||
|
||||
// --------------------
|
||||
// default arrays to zero
|
||||
|
@ -1424,7 +1423,7 @@ void PairSMTBQ::tabqeq()
|
|||
{
|
||||
gam = dgam = dza = dzb = d2zaa = d2zab =
|
||||
d2zbb = d2zra = d2zrb = d2gamr2 = 0.0 ;
|
||||
dij = 0.0 ;
|
||||
aCoeff = bCoeff = dij = 0.0 ;
|
||||
|
||||
s = static_cast<double>(k)*ds ; r = sqrt(s) ;
|
||||
if (k==0) r=10e-30;
|
||||
|
@ -2316,7 +2315,7 @@ void PairSMTBQ::QForce_charge(int loop)
|
|||
double rsq;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
double iq,jq,fqi,fqj,fqij,fqij2,fqjj;
|
||||
int eflag;
|
||||
int eflag = 0;
|
||||
|
||||
|
||||
double **x = atom->x;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
using namespace LAMMPS_NS;
|
||||
using namespace FixConst;
|
||||
|
||||
enum{GLOBAL,PERATOM};
|
||||
enum{UNKNOWN,GLOBAL,PERATOM};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
@ -35,9 +35,12 @@ FixStore::FixStore(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||
// syntax: id group style global nrow ncol
|
||||
// Nrow by Ncol array of global values
|
||||
// Ncol = 1 is vector, Nrow > 1 is array
|
||||
// syntax: id group style peratom 0/1 nvalue
|
||||
// syntax: id group style peratom 0/1 nvalues
|
||||
// 0/1 flag = not-store or store peratom values in restart file
|
||||
// nvalue = # of peratom values, N = 1 is vector, N > 1 is array
|
||||
// nvalues = # of peratom values, N = 1 is vector, N > 1 is array
|
||||
|
||||
nvalues = vecflag = 0;
|
||||
flavor = UNKNOWN;
|
||||
|
||||
if (strcmp(arg[3],"global") == 0) flavor = GLOBAL;
|
||||
else if (strcmp(arg[3],"peratom") == 0) flavor = PERATOM;
|
||||
|
@ -102,7 +105,6 @@ FixStore::FixStore(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
|
|||
for (int j = 0; j < nvalues; j++)
|
||||
astore[i][j] = 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
@ -317,7 +319,7 @@ int FixStore::size_restart(int nlocal)
|
|||
|
||||
double FixStore::memory_usage()
|
||||
{
|
||||
double bytes;
|
||||
double bytes = 0.0;
|
||||
if (flavor == GLOBAL) bytes += nrow*ncol * sizeof(double);
|
||||
if (flavor == PERATOM) bytes += atom->nmax*nvalues * sizeof(double);
|
||||
return bytes;
|
||||
|
|
Loading…
Reference in New Issue