refactor/simplify code due to changes in Modify

This commit is contained in:
Axel Kohlmeyer
2021-08-06 21:30:32 -04:00
parent f23b04f9b6
commit 68c15ebf04
11 changed files with 43 additions and 79 deletions

View File

@ -74,10 +74,8 @@ ComputeDisplaceAtom::ComputeDisplaceAtom(LAMMPS *lmp, int narg, char **arg) :
// id = compute-ID + COMPUTE_STORE, fix group = compute group
id_fix = utils::strdup(std::string(id) + "_COMPUTE_STORE");
std::string cmd = id_fix + fmt::format(" {} STORE peratom 1 3",
group->names[igroup]);
modify->add_fix(cmd);
fix = (FixStore *) modify->fix[modify->nfix-1];
fix = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 3",
id_fix, group->names[igroup]));
// calculate xu,yu,zu for fix store array
// skip if reset from restart file