Merge pull request #4144 from Bibobu/ave_histo_vector_bug

Fix for fix_ave_histo bug with vector style variables
This commit is contained in:
Stan Moore
2024-04-22 09:42:24 -06:00
committed by GitHub

View File

@ -207,7 +207,8 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
if (val.val.v < 0) if (val.val.v < 0)
error->all(FLERR,"Variable name {} for {} does not exist", val.id, mycmd); error->all(FLERR,"Variable name {} for {} does not exist", val.id, mycmd);
// variables only produce one kind of output // variables only produce one kind of output
if (input->variable->equalstyle(val.val.v)) kindglobal = 1; if (input->variable->equalstyle(val.val.v) || input->variable->vectorstyle(val.val.v))
kindglobal = 1;
else if (input->variable->atomstyle(val.val.v)) kindperatom = 1; else if (input->variable->atomstyle(val.val.v)) kindperatom = 1;
else error->all(FLERR,"{} variable {} is incompatible style", mycmd, val.id); else error->all(FLERR,"{} variable {} is incompatible style", mycmd, val.id);
} }