git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1119 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user