implement restart_reset flag for fixes in restart_global list
This commit is contained in:
@ -51,9 +51,6 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL)
|
||||
dynamic_group_allow = 1;
|
||||
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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user