use ev_init for fixes
This commit is contained in:
@ -239,8 +239,7 @@ void FixLatte::pre_reverse(int eflag, int /*vflag*/)
|
||||
void FixLatte::post_force(int vflag)
|
||||
{
|
||||
int eflag = eflag_caller;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = eflag_global = vflag_global = eflag_atom = vflag_atom = 0;
|
||||
ev_init(eflag,vflag);
|
||||
|
||||
// compute Coulombic potential = pe[i]/q[i]
|
||||
// invoke compute pe/atom
|
||||
|
||||
@ -341,8 +341,7 @@ void FixCMAP::post_force(int vflag)
|
||||
|
||||
ecmap = 0.0;
|
||||
int eflag = eflag_caller;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
ev_init(eflag,vflag);
|
||||
|
||||
for (n = 0; n < ncrosstermlist; n++) {
|
||||
i1 = crosstermlist[n][0];
|
||||
|
||||
@ -224,6 +224,10 @@ class Fix : protected Pointers {
|
||||
int dynamic; // recount atoms for temperature computes
|
||||
|
||||
void ev_setup(int, int);
|
||||
void ev_init(int eflag, int vflag) {
|
||||
if (eflag||vflag) ev_setup(eflag, vflag);
|
||||
else evflag = eflag_either = eflag_global = eflag_atom = vflag_either = vflag_global = vflag_atom = 0;
|
||||
}
|
||||
void ev_tally(int, int *, double, double, double *);
|
||||
void v_setup(int);
|
||||
void v_tally(int, int *, double, double *);
|
||||
|
||||
@ -141,8 +141,7 @@ void FixExternal::post_force(int vflag)
|
||||
bigint ntimestep = update->ntimestep;
|
||||
|
||||
int eflag = eflag_caller;
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else evflag = 0;
|
||||
ev_init(eflag,vflag);
|
||||
|
||||
// invoke the callback in driver program
|
||||
// it will fill fexternal with forces
|
||||
|
||||
Reference in New Issue
Block a user