Commit 17c81295 authored by Sebastian Hütter's avatar Sebastian Hütter
Browse files

use ev_init for fixes

parent 06a57dd6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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
+1 −2
Original line number Diff line number Diff line
@@ -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];
+4 −0
Original line number Diff line number Diff line
@@ -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 *);
+1 −2
Original line number Diff line number Diff line
@@ -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