Merge pull request #3826 from srtee/patch-3

debug fix_modify press for press/berendsen
This commit is contained in:
Axel Kohlmeyer
2023-06-19 14:25:49 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ ComputeChunkSpreadAtom(LAMMPS *lmp, int narg, char **arg) :
} else if (val.which == ArgInfo::FIX) {
auto ifix = modify->get_fix_by_id(val.id);
if (ifix)
if (!ifix)
error->all(FLERR,"Fix ID {} for compute chunk/spread/atom does not exist", val.id);
if (val.argindex == 0) {
if (!ifix->vector_flag)

View File

@ -491,7 +491,7 @@ int FixPressBerendsen::modify_param(int narg, char **arg)
id_press = utils::strdup(arg[1]);
pressure = modify->get_compute_by_id(arg[1]);
if (pressure) error->all(FLERR,"Could not find fix_modify pressure compute ID: {}", arg[1]);
if (!pressure) error->all(FLERR,"Could not find fix_modify pressure compute ID: {}", arg[1]);
if (pressure->pressflag == 0)
error->all(FLERR,"Fix_modify pressure compute {} does not compute pressure", arg[1]);
return 2;