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

@ -5065,16 +5065,10 @@ VarReader::VarReader(LAMMPS *lmp, char *name, char *file, int flag) :
if (style == Variable::ATOMFILE) {
if (atom->map_style == Atom::MAP_NONE)
error->all(FLERR,"Cannot use atomfile-style "
"variable unless an atom map exists");
std::string cmd = name + std::string("_VARIABLE_STORE");
id_fix = utils::strdup(cmd);
cmd += " all STORE peratom 0 1";
modify->add_fix(cmd);
fixstore = (FixStore *) modify->fix[modify->nfix-1];
error->all(FLERR,"Cannot use atomfile-style variable unless an atom map exists");
id_fix = utils::strdup(std::string(name) + "_VARIABLE_STORE");
fixstore = (FixStore *) modify->add_fix(std::string(id_fix) + " all STORE peratom 0 1");
buffer = new char[CHUNK*MAXLINE];
}
}