fix incorrect extvector setting bug for using fix vector with fixes

This commit is contained in:
Axel Kohlmeyer
2024-12-14 23:11:48 -05:00
parent 861b1fb16f
commit a6d53d8d13

View File

@ -114,9 +114,11 @@ FixVector::FixVector(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR, "Fix for fix {} vector not computed at compatible time", val.id); error->all(FLERR, "Fix for fix {} vector not computed at compatible time", val.id);
if (val.argindex == 0) if (val.argindex == 0)
value = ifix->extscalar;
else if (ifix->extvector >= 0)
value = ifix->extvector; value = ifix->extvector;
else else
value = ifix->extarray; value = ifix->extlist[val.argindex - 1];
val.val.f = ifix; val.val.f = ifix;
} else if (val.which == ArgInfo::VARIABLE) { } else if (val.which == ArgInfo::VARIABLE) {