Commit a6d2ae2e authored by Jibril B. Coulibaly's avatar Jibril B. Coulibaly
Browse files

implement restart_reset flag for fixes in restart_global list

parent 6d11515a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -52,9 +52,6 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL)
  create_attribute = 1;
  restart_global = 1;

  diam_scale = 1.0; // If default in the constructor, not overwritten each fresh run
  chg_scale = 1.0; // If default in the constructor, not overwritten each fresh run

  // count # of adaptations

  nadapt = 0;
@@ -439,10 +436,12 @@ void FixAdapt::init()
          error->all(FLERR,"Fix adapt requires atom attribute mass");
        if (discflag && domain->dimension!=2)
          error->all(FLERR,"Fix adapt requires 2d simulation");
        if (!restart_reset) diam_scale = 1.0;
      }
      if (ad->aparam == CHARGE) {
        if (!atom->q_flag)
          error->all(FLERR,"Fix adapt requires atom attribute charge");
        if(!restart_reset) chg_scale = 1.0;
      }
    }
  }
+1 −0
Original line number Diff line number Diff line
@@ -914,6 +914,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
        strcmp(style_restart_global[i],fix[ifix]->style) == 0) {
      fix[ifix]->restart(state_restart_global[i]);
      used_restart_global[i] = 1;
      fix[ifix]->restart_reset = 1;
      if (comm->me == 0) {
        if (screen)
          fprintf(screen,"Resetting global fix info from restart file:\n");