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

This commit is contained in:
sjplimp 2016-08-10 14:59:04 +00:00
parent b3364ae943
commit 639ea6c396
13 changed files with 42 additions and 21 deletions

View File

@ -438,6 +438,8 @@ void PairLubricateUPoly::compute_Fh(double **x)
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
@ -709,6 +711,8 @@ void PairLubricateUPoly::compute_RU(double **x)
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
@ -947,6 +951,8 @@ void PairLubricateUPoly::compute_RE(double **x)
// No contribution from isotropic terms due to E
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];

View File

@ -226,6 +226,8 @@ void PairLubricatePoly::compute(int eflag, int vflag)
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];

View File

@ -101,9 +101,9 @@ void DumpCustomGZ::write_header(bigint ndump)
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",ndump);
gzprintf(gzFp,"ITEM: BOX BOUNDS %s\n",boundstr);
gzprintf(gzFp,"%g %g\n",boxxlo,boxxhi);
gzprintf(gzFp,"%g %g\n",boxylo,boxyhi);
gzprintf(gzFp,"%g %g\n",boxzlo,boxzhi);
gzprintf(gzFp,"%-1.16g %-1.16g\n",boxxlo,boxxhi);
gzprintf(gzFp,"%-1.16g %-1.16g\n",boxylo,boxyhi);
gzprintf(gzFp,"%-1.16g %-1.16g\n",boxzlo,boxzhi);
gzprintf(gzFp,"ITEM: ATOMS %s\n",columns);
} else {
gzprintf(gzFp,"ITEM: TIMESTEP\n");
@ -111,9 +111,9 @@ void DumpCustomGZ::write_header(bigint ndump)
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",ndump);
gzprintf(gzFp,"ITEM: BOX BOUNDS xy xz yz %s\n",boundstr);
gzprintf(gzFp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
gzprintf(gzFp,"%g %g %g\n",boxylo,boxyhi,boxxz);
gzprintf(gzFp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
gzprintf(gzFp,"%-1.16g %-1.16g %-1.16g\n",boxxlo,boxxhi,boxxy);
gzprintf(gzFp,"%-1.16g %-1.16g %-1.16g\n",boxylo,boxyhi,boxxz);
gzprintf(gzFp,"%-1.16g %-1.16g %-1.16g\n",boxzlo,boxzhi,boxyz);
gzprintf(gzFp,"ITEM: ATOMS %s\n",columns);
}
}

View File

@ -236,7 +236,7 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr)
sync_threads();
}
// loop over neighbors of my atoms
// R0 adjustment has already been done in this->compute()
for (ii = iifrom; ii < iito; ++ii) {
i = ilist[ii];
@ -364,9 +364,15 @@ void PairLubricatePolyOMP::eval(int iifrom, int iito, ThrData * const thr)
16.0*pow(beta0,4.0))/375.0/pow(beta1,4.0) *
h_sep*log(1.0/h_sep);
a_sh *= 6.0*MY_PI*mu*radi;
a_pu = beta0*(4.0+beta0)/10.0/beta1/beta1*log(1.0/h_sep);
a_pu += (32.0-33.0*beta0+83.0*beta0*beta0+43.0 *
pow(beta0,3.0))/250.0/pow(beta1,3.0)*h_sep*log(1.0/h_sep);
// old invalid eq for pumping term
// changed 29Jul16 from eq 9.25 -> 9.27 in Kim and Karilla
// a_pu = beta0*(4.0+beta0)/10.0/beta1/beta1*log(1.0/h_sep);
// a_pu += (32.0-33.0*beta0+83.0*beta0*beta0+43.0 *
// pow(beta0,3.0))/250.0/pow(beta1,3.0)*h_sep*log(1.0/h_sep);
// a_pu *= 8.0*MY_PI*mu*pow(radi,3.0);
a_pu = 2.0*beta0/5.0/beta1*log(1.0/h_sep);
a_pu += 2.0*(8.0+6.0*beta0+33.0*beta0*beta0)/125.0/beta1/beta1*
h_sep*log(1.0/h_sep);
a_pu *= 8.0*MY_PI*mu*pow(radi,3.0);
} else a_sq = 6.0*MY_PI*mu*radi*(beta0*beta0/beta1/beta1/h_sep);

View File

@ -40,10 +40,6 @@ enum {QMMM_TAG_OTHER=0, QMMM_TAG_SIZE=1, QMMM_TAG_COORD=2,
using namespace LAMMPS_NS;
using namespace FixConst;
// prototypes for local helper functions
static int match_element(double mass, int search_isotopes, double &delta);
/****************************************************************************/
/* re-usable integer hash table code with static linkage. */

View File

@ -1966,7 +1966,7 @@ void Atom::update_callback(int ifix)
return -1 if not found
------------------------------------------------------------------------- */
int Atom::find_custom(char *name, int &flag)
int Atom::find_custom(const char *name, int &flag)
{
for (int i = 0; i < nivector; i++)
if (iname[i] && strcmp(iname[i],name) == 0) {
@ -1989,7 +1989,7 @@ int Atom::find_custom(char *name, int &flag)
return index in ivector or dvector of its location
------------------------------------------------------------------------- */
int Atom::add_custom(char *name, int flag)
int Atom::add_custom(const char *name, int flag)
{
int index;

View File

@ -252,8 +252,8 @@ class Atom : protected Pointers {
void delete_callback(const char *, int);
void update_callback(int);
int find_custom(char *, int &);
int add_custom(char *, int);
int find_custom(const char *, int &);
int add_custom(const char *, int);
void remove_custom(int, int);
virtual void sync_modify(ExecutionSpace, unsigned int, unsigned int) {}

View File

@ -497,7 +497,7 @@ void ComputeTempProfile::bin_assign()
{
// reallocate bin array if necessary
if (atom->nlocal > maxatom) {
if (atom->nmax > maxatom) {
maxatom = atom->nmax;
memory->destroy(bin);
memory->create(bin,maxatom,"temp/profile:bin");

View File

@ -1013,12 +1013,18 @@ void FixNH::couple()
p_current[2] = tensor[2];
}
if (!ISFINITE(p_current[0]) || !ISFINITE(p_current[1]) || !ISFINITE(p_current[2]))
error->all(FLERR,"Non-numeric pressure - simulation unstable");
// switch order from xy-xz-yz to Voigt
if (pstyle == TRICLINIC) {
p_current[3] = tensor[5];
p_current[4] = tensor[4];
p_current[5] = tensor[3];
if (!ISFINITE(p_current[3]) || !ISFINITE(p_current[4]) || !ISFINITE(p_current[5]))
error->all(FLERR,"Non-numeric pressure - simulation unstable");
}
}

View File

@ -594,7 +594,7 @@ void Input::substitute(char *&str, char *&str2, int &max, int &max2, int flag)
int Input::expand_args(int narg, char **arg, int mode, char **&earg)
{
int n,iarg,index,nlo,nhi,nmax,which,expandflag,icompute,ifix;
int n,iarg,index,nlo,nhi,nmax,expandflag,icompute,ifix;
char *ptr1,*ptr2,*str;
ptr1 = NULL;

View File

@ -138,8 +138,11 @@ void MinHFTN::setup_style()
//---- ALLOCATE MEMORY FOR EXTRA GLOBAL DEGREES OF FREEDOM.
//---- THE FIX MODULE TAKES CARE OF THE FIRST VECTOR, X0 (XK).
if (nextra_global) {
for (int i = 1; i < NUM_HFTN_ATOM_BASED_VECTORS; i++)
for (int i = 1; i < NUM_HFTN_ATOM_BASED_VECTORS; i++) {
_daExtraGlobal[i] = new double[nextra_global];
for (int j = 0; j < nextra_global; j++)
_daExtraGlobal[i][j] = 0.0;
}
}
//---- ALLOCATE MEMORY FOR EXTRA PER-ATOM DEGREES OF FREEDOM.

View File

@ -83,6 +83,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
build_once = 0;
cluster_check = 0;
binatomflag = 1;
ago = -1;
cutneighmax = 0.0;
cutneighsq = NULL;

View File

@ -994,6 +994,7 @@ void Thermo::parse_fields(char *str)
void Thermo::addfield(const char *key, FnPtr func, int typeflag)
{
int n = strlen(key) + 1;
delete[] keyword[nfield];
keyword[nfield] = new char[n];
strcpy(keyword[nfield],key);
vfunc[nfield] = func;