forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9261 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
bad59e0fca
commit
a6eb6e4f84
|
@ -679,7 +679,7 @@ void FixDeform::end_of_step()
|
|||
int i;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
// wrap variable evaluations with clear/add
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ void FixLangevin::post_force_no_tally()
|
|||
int nlocal = atom->nlocal;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
// set current t_target and t_sqrt
|
||||
// if variable temp, evaluate variable, wrap with clear/add
|
||||
|
@ -480,7 +480,7 @@ void FixLangevin::post_force_tally()
|
|||
int nlocal = atom->nlocal;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
// set current t_target and t_sqrt
|
||||
// if variable temp, evaluate variable, wrap with clear/add
|
||||
|
|
|
@ -2093,9 +2093,7 @@ void FixNH::compute_deviatoric()
|
|||
void FixNH::compute_temp_target()
|
||||
{
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
if (update->endstep > update->beginstep)
|
||||
delta /= update->endstep - update->beginstep;
|
||||
else delta = 0.0;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
t_target = t_start + delta * (t_stop-t_start);
|
||||
ke_target = tdof * boltz * t_target;
|
||||
|
@ -2108,9 +2106,7 @@ void FixNH::compute_temp_target()
|
|||
void FixNH::compute_press_target()
|
||||
{
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
if (update->endstep > update->beginstep)
|
||||
delta /= update->endstep - update->beginstep;
|
||||
else delta = 0.0;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
p_hydro = 0.0;
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
|
|
@ -357,7 +357,7 @@ void FixPressBerendsen::end_of_step()
|
|||
couple();
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (p_flag[i]) {
|
||||
|
|
|
@ -213,7 +213,7 @@ void FixRestrain::restrain_bond(int m)
|
|||
int newton_bond = force->newton_bond;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
double k = kstart[m] + delta * (kstop[m] - kstart[m]);
|
||||
|
||||
i1 = atom->map(ids[m][0]);
|
||||
|
@ -294,7 +294,7 @@ void FixRestrain::restrain_angle(int m)
|
|||
int newton_bond = force->newton_bond;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
double k = kstart[m] + delta * (kstop[m] - kstart[m]);
|
||||
|
||||
i1 = atom->map(ids[m][0]);
|
||||
|
@ -422,7 +422,7 @@ void FixRestrain::restrain_dihedral(int m)
|
|||
int newton_bond = force->newton_bond;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
double k = kstart[m] + delta * (kstop[m] - kstart[m]);
|
||||
|
||||
i1 = atom->map(ids[m][0]);
|
||||
|
|
|
@ -140,7 +140,7 @@ void FixTempBerendsen::end_of_step()
|
|||
"Computed temperature for fix temp/berendsen cannot be 0.0");
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
// set current t_target
|
||||
// if variable temp, evaluate variable, wrap with clear/add
|
||||
|
|
|
@ -137,7 +137,7 @@ void FixTempRescale::end_of_step()
|
|||
error->all(FLERR,"Computed temperature for fix temp/rescale cannot be 0.0");
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
|
||||
// set current t_target
|
||||
// if variable temp, evaluate variable, wrap with clear/add
|
||||
|
|
|
@ -192,7 +192,7 @@ void FixTMD::initial_integrate(int vflag)
|
|||
int nlocal = atom->nlocal;
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
double rho_target = rho_start + delta * (rho_stop - rho_start);
|
||||
|
||||
// compute the Lagrange multiplier
|
||||
|
|
|
@ -49,7 +49,7 @@ void PairDPDTstat::compute(int eflag, int vflag)
|
|||
|
||||
if (t_start != t_stop) {
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
temperature = t_start + delta * (t_stop-t_start);
|
||||
double boltz = force->boltz;
|
||||
for (i = 1; i <= atom->ntypes; i++)
|
||||
|
|
|
@ -1806,7 +1806,7 @@ double Variable::collapse_tree(Tree *tree)
|
|||
if (tree->left->type != VALUE || tree->right->type != VALUE) return 0.0;
|
||||
tree->type = VALUE;
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
tree->value = arg1 + delta*(arg2-arg1);
|
||||
return tree->value;
|
||||
}
|
||||
|
@ -2072,7 +2072,7 @@ double Variable::eval_tree(Tree *tree, int i)
|
|||
arg1 = eval_tree(tree->left,i);
|
||||
arg2 = eval_tree(tree->right,i);
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
arg = arg1 + delta*(arg2-arg1);
|
||||
return arg;
|
||||
}
|
||||
|
@ -2489,7 +2489,7 @@ int Variable::math_function(char *word, char *contents, Tree **tree,
|
|||
if (tree) newtree->type = RAMP;
|
||||
else {
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
if (delta != 0.0) delta /= update->endstep - update->beginstep;
|
||||
double value = value1 + delta*(value2-value1);
|
||||
argstack[nargstack++] = value;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue