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

This commit is contained in:
sjplimp 2009-08-18 21:52:42 +00:00
parent b16daa15d8
commit f785919592
3 changed files with 15 additions and 10 deletions

View File

@ -301,10 +301,6 @@ void Min::run()
timer->barrier_stop(TIME_LOOP);
// delete fix_minimize at end of run
modify->delete_fix("MINIMIZE");
// reset reneighboring criteria
neighbor->every = neigh_every;
@ -318,6 +314,15 @@ void Min::run()
fnorminf_final = fnorm_inf();
}
/* ----------------------------------------------------------------------
delete fix at end of run, so its atom arrays won't persist
------------------------------------------------------------------------- */
void Min::cleanup()
{
modify->delete_fix("MINIMIZE");
}
/* ----------------------------------------------------------------------
evaluate potential energy and forces
may migrate atoms due to reneighboring

View File

@ -31,16 +31,16 @@ class Min : protected Pointers {
void init();
void setup();
void run();
void cleanup();
void request(class Pair *, int, double);
double memory_usage() {return 0.0;}
void modify_params(int, char **);
virtual void init_style() {}
virtual void setup_style() = 0;
virtual void reset_vectors() = 0;
virtual int iterate(int) = 0;
void request(class Pair *, int, double);
double memory_usage() {return 0.0;}
void modify_params(int, char **);
protected:
int eflag,vflag; // flags for energy/virial computation
int virial_style; // compute virial explicitly or implicitly

View File

@ -42,14 +42,14 @@ void Minimize::command(int narg, char **arg)
if (update->etol < 0.0 || update->ftol < 0.0)
error->all("Illegal minimize command");
update->whichflag = 2;
update->beginstep = update->firststep = update->ntimestep;
update->endstep = update->laststep = update->firststep + update->nsteps;
update->whichflag = 2;
lmp->init();
update->minimize->setup();
update->minimize->run();
update->minimize->cleanup();
Finish finish(lmp);
finish.end(1);