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

This commit is contained in:
sjplimp
2007-11-02 20:25:11 +00:00
parent f12471d507
commit 6de4e59a38
28 changed files with 610 additions and 280 deletions

View File

@ -154,8 +154,12 @@ void Modify::init()
list_init(MIN_ENERGY,n_min_energy,list_min_energy);
// init each compute
// notify relevant computes they may be called on this timestep
for (i = 0; i < ncompute; i++) compute[i]->init();
for (i = 0; i < ncompute; i++) {
compute[i]->init();
if (compute[i]->timeflag) compute[i]->add_step(update->ntimestep);
}
}
/* ----------------------------------------------------------------------
@ -568,6 +572,28 @@ int Modify::find_compute(char *id)
return icompute;
}
/* ----------------------------------------------------------------------
clear the invoked flag of computes that stores their next invocation
called by classes that are invoking computes
------------------------------------------------------------------------- */
void Modify::clearstep_compute()
{
for (int icompute = 0; icompute < ncompute; icompute++)
if (compute[icompute]->timeflag) compute[icompute]->invoked = 0;
}
/* ----------------------------------------------------------------------
schedule the next invocation of computes that were invoked
called by classes that invoked computes to schedule the next invocation
------------------------------------------------------------------------- */
void Modify::addstep_compute(int ntimestep)
{
for (int icompute = 0; icompute < ncompute; icompute++)
if (compute[icompute]->invoked) compute[icompute]->add_step(ntimestep);
}
/* ----------------------------------------------------------------------
write to restart file for all Fixes with restart info
(1) fixes that have global state