simplify by using utils::strdup() and reorder includes

This commit is contained in:
Axel Kohlmeyer
2021-03-28 17:02:49 -04:00
parent 31726f56e6
commit b32570c15e
70 changed files with 447 additions and 1009 deletions

View File

@ -72,10 +72,8 @@ FixTempBerendsen::FixTempBerendsen(LAMMPS *lmp, int narg, char **arg) :
// create a new compute temp style
// id = fix-ID + temp, compute group = fix group
std::string cmd = id + std::string("_temp");
id_temp = utils::strdup(cmd);
cmd += fmt::format(" {} temp",group->names[igroup]);
modify->add_compute(cmd);
id_temp = utils::strdup(std::string(id) + "_temp");
modify->add_compute(fmt::format("{} {} temp",id_temp,group->names[igroup]));
tflag = 1;
energy = 0;