fix 2 bugs caught in review

This commit is contained in:
Steve Plimpton
2025-05-28 08:53:55 -06:00
parent 6a5ed2af4b
commit 1668bcffcf
2 changed files with 2 additions and 3 deletions

View File

@ -33,7 +33,7 @@ FixSet::FixSet(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg)
if (nevery <= 0) error->all(FLERR, "Fix {} Nevery must be > 0", style);
reneighbor = utils::inumeric(FLERR, arg[4], false, lmp);
if (reneighbor = 0 || reneighbor > 1)
if (reneighbor < 0 || reneighbor > 1)
error->all(FLERR, "Fix {} rnflag must be 0/1", style);
// create instance of Set class
@ -83,4 +83,3 @@ void FixSet::end_of_step()
if (reneighbor) next_reneighbor = update->ntimestep + 1;
}

View File

@ -303,7 +303,7 @@ void Set::process_args(int caller_flag, int narg, char **arg)
} else if (strcmp(arg[iarg],"smd/mass/density") == 0) {
action->keyword = SMD_MASS_DENSITY;
process_smd_mass_density(iarg,narg,arg,action);
invoke_choice[naction++] = &Set::invoke_density;
invoke_choice[naction++] = &Set::invoke_smd_mass_density;
} else if (strcmp(arg[iarg],"sph/cv") == 0) {
action->keyword = SPH_CV;
process_sph_cv(iarg,narg,arg,action);