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

@ -562,13 +562,9 @@ void ComputeChunkAtom::init()
// fixstore initializes all values to 0.0
if ((idsflag == ONCE || lockcount) && !fixstore) {
std::string cmd = id + std::string("_COMPUTE_STORE");
id_fix = new char[cmd.size()+1];
strcpy(id_fix,cmd.c_str());
cmd += fmt::format(" {} STORE peratom 1 1", group->names[igroup]);
modify->add_fix(cmd);
fixstore = (FixStore *) modify->fix[modify->nfix-1];
id_fix = utils::strdup(id + std::string("_COMPUTE_STORE"));
fixstore = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 1",
id_fix, group->names[igroup]));
}
if ((idsflag != ONCE && !lockcount) && fixstore) {