must not forget to generate compute ids and store them.
This commit is contained in:
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user