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

This commit is contained in:
sjplimp 2010-09-29 23:38:32 +00:00
parent 5af333b06e
commit 7e51f7cb0c
5 changed files with 9 additions and 8 deletions

View File

@ -77,7 +77,7 @@ void FixNVE::initial_integrate(int vflag)
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
if (rmass) {
for (int i = 0; i < nlocal; i++) {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
dtfm = dtf / rmass[i];
v[i][0] += dtfm * f[i][0];
@ -87,10 +87,9 @@ void FixNVE::initial_integrate(int vflag)
x[i][1] += dtv * v[i][1];
x[i][2] += dtv * v[i][2];
}
}
} else {
for (int i = 0; i < nlocal; i++) {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
dtfm = dtf / mass[type[i]];
v[i][0] += dtfm * f[i][0];
@ -100,7 +99,6 @@ void FixNVE::initial_integrate(int vflag)
x[i][1] += dtv * v[i][1];
x[i][2] += dtv * v[i][2];
}
}
}
}
@ -122,24 +120,22 @@ void FixNVE::final_integrate()
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
if (rmass) {
for (int i = 0; i < nlocal; i++) {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
dtfm = dtf / rmass[i];
v[i][0] += dtfm * f[i][0];
v[i][1] += dtfm * f[i][1];
v[i][2] += dtfm * f[i][2];
}
}
} else {
for (int i = 0; i < nlocal; i++) {
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit) {
dtfm = dtf / mass[type[i]];
v[i][0] += dtfm * f[i][0];
v[i][1] += dtfm * f[i][1];
v[i][2] += dtfm * f[i][2];
}
}
}
}

View File

@ -54,6 +54,7 @@ using namespace LAMMPS_NS;
Min::Min(LAMMPS *lmp) : Pointers(lmp)
{
dmax = 0.1;
searchflag = 0;
linestyle = 0;
elist_global = elist_atom = NULL;

View File

@ -26,6 +26,7 @@ class Min : protected Pointers {
int niter,neval;
int stop_condition;
char *stopstr;
int searchflag; // 0 if damped dynamics, 1 if sub-cycles on local search
Min(class LAMMPS *);
virtual ~Min();

View File

@ -78,6 +78,8 @@ static const double MIN_ETOL_MAG = 1.0e-8;
MinHFTN::MinHFTN(LAMMPS *lmp) : Min(lmp)
{
searchflag = 1;
for (int i = 1; i < NUM_HFTN_ATOM_BASED_VECTORS; i++)
_daExtraGlobal[i] = NULL;
for (int i = 0; i < NUM_HFTN_ATOM_BASED_VECTORS; i++)

View File

@ -60,6 +60,7 @@ enum{MAXITER,MAXEVAL,ETOL,FTOL,DOWNHILL,ZEROALPHA,ZEROFORCE,ZEROQUAD};
MinLineSearch::MinLineSearch(LAMMPS *lmp) : Min(lmp)
{
searchflag = 1;
gextra = hextra = NULL;
x0extra_atom = gextra_atom = hextra_atom = NULL;
}