must not forget to generate compute ids and store them.

This commit is contained in:
Axel Kohlmeyer
2020-06-26 15:42:37 -04:00
parent 1ea0eca2a5
commit a5651acb49
8 changed files with 52 additions and 75 deletions

View File

@ -55,17 +55,12 @@ FixNumDiff::FixNumDiff(LAMMPS *lmp, int narg, char **arg) :
if (nevery <= 0 || delta <= 0.0)
error->all(FLERR,"Illegal fix numdiff command");
int n = strlen(id) + 6;
id_pe = new char[n];
strcpy(id_pe,id);
strcat(id_pe,"_pe");
std::string cmd = id + std::string("_pe");
id_pe = new char[cmd.size()+1];
strcpy(id_pe,cmd.c_str());
char **newarg = new char*[3];
newarg[0] = id_pe;
newarg[1] = (char *) "all";
newarg[2] = (char *) "pe";
modify->add_compute(3,newarg);
delete [] newarg;
cmd += " all pe";
modify->add_compute(cmd);
maxatom = 0;