apply new utility function to most places creating new styles
This commit is contained in:
@ -893,11 +893,8 @@ void Modify::add_fix(int narg, char **arg, int trysuffix)
|
||||
fix[ifix] = fix_creator(lmp,narg,arg);
|
||||
}
|
||||
|
||||
if (fix[ifix] == NULL) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Unknown fix style %s",arg[2]);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
if (fix[ifix] == NULL)
|
||||
error->all(FLERR,utils::check_packages_for_style("fix",arg[2],lmp).c_str());
|
||||
|
||||
// check if Fix is in restart_global list
|
||||
// if yes, pass state info to the Fix so it can reset itself
|
||||
@ -1195,11 +1192,8 @@ void Modify::add_compute(int narg, char **arg, int trysuffix)
|
||||
compute[ncompute] = compute_creator(lmp,narg,arg);
|
||||
}
|
||||
|
||||
if (compute[ncompute] == NULL) {
|
||||
char str[128];
|
||||
snprintf(str,128,"Unknown compute style %s",arg[2]);
|
||||
error->all(FLERR,str);
|
||||
}
|
||||
if (compute[ncompute] == NULL)
|
||||
error->all(FLERR,utils::check_packages_for_style("compute",arg[2],lmp).c_str());
|
||||
|
||||
ncompute++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user