git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3114 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
13
src/min.cpp
13
src/min.cpp
@ -301,10 +301,6 @@ void Min::run()
|
|||||||
|
|
||||||
timer->barrier_stop(TIME_LOOP);
|
timer->barrier_stop(TIME_LOOP);
|
||||||
|
|
||||||
// delete fix_minimize at end of run
|
|
||||||
|
|
||||||
modify->delete_fix("MINIMIZE");
|
|
||||||
|
|
||||||
// reset reneighboring criteria
|
// reset reneighboring criteria
|
||||||
|
|
||||||
neighbor->every = neigh_every;
|
neighbor->every = neigh_every;
|
||||||
@ -318,6 +314,15 @@ void Min::run()
|
|||||||
fnorminf_final = fnorm_inf();
|
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
|
evaluate potential energy and forces
|
||||||
may migrate atoms due to reneighboring
|
may migrate atoms due to reneighboring
|
||||||
|
|||||||
@ -31,16 +31,16 @@ class Min : protected Pointers {
|
|||||||
void init();
|
void init();
|
||||||
void setup();
|
void setup();
|
||||||
void run();
|
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 init_style() {}
|
||||||
virtual void setup_style() = 0;
|
virtual void setup_style() = 0;
|
||||||
virtual void reset_vectors() = 0;
|
virtual void reset_vectors() = 0;
|
||||||
virtual int iterate(int) = 0;
|
virtual int iterate(int) = 0;
|
||||||
|
|
||||||
void request(class Pair *, int, double);
|
|
||||||
double memory_usage() {return 0.0;}
|
|
||||||
void modify_params(int, char **);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int eflag,vflag; // flags for energy/virial computation
|
int eflag,vflag; // flags for energy/virial computation
|
||||||
int virial_style; // compute virial explicitly or implicitly
|
int virial_style; // compute virial explicitly or implicitly
|
||||||
|
|||||||
@ -42,14 +42,14 @@ void Minimize::command(int narg, char **arg)
|
|||||||
if (update->etol < 0.0 || update->ftol < 0.0)
|
if (update->etol < 0.0 || update->ftol < 0.0)
|
||||||
error->all("Illegal minimize command");
|
error->all("Illegal minimize command");
|
||||||
|
|
||||||
|
update->whichflag = 2;
|
||||||
update->beginstep = update->firststep = update->ntimestep;
|
update->beginstep = update->firststep = update->ntimestep;
|
||||||
update->endstep = update->laststep = update->firststep + update->nsteps;
|
update->endstep = update->laststep = update->firststep + update->nsteps;
|
||||||
|
|
||||||
update->whichflag = 2;
|
|
||||||
|
|
||||||
lmp->init();
|
lmp->init();
|
||||||
update->minimize->setup();
|
update->minimize->setup();
|
||||||
update->minimize->run();
|
update->minimize->run();
|
||||||
|
update->minimize->cleanup();
|
||||||
|
|
||||||
Finish finish(lmp);
|
Finish finish(lmp);
|
||||||
finish.end(1);
|
finish.end(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user