we may not use "suffix on" before a suffix is defined. switching back to a non-hybrid suffix must set suffix2 to NULL
This commit is contained in:
@ -1904,8 +1904,11 @@ void Input::suffix()
|
||||
if (narg < 1) error->all(FLERR,"Illegal suffix command");
|
||||
|
||||
if (strcmp(arg[0],"off") == 0) lmp->suffix_enable = 0;
|
||||
else if (strcmp(arg[0],"on") == 0) lmp->suffix_enable = 1;
|
||||
else {
|
||||
else if (strcmp(arg[0],"on") == 0) {
|
||||
if (!lmp->suffix)
|
||||
error->all(FLERR,"May only enable suffixes after defining one");
|
||||
lmp->suffix_enable = 1;
|
||||
} else {
|
||||
lmp->suffix_enable = 1;
|
||||
|
||||
delete [] lmp->suffix;
|
||||
@ -1924,6 +1927,7 @@ void Input::suffix()
|
||||
int n = strlen(arg[0]) + 1;
|
||||
lmp->suffix = new char[n];
|
||||
strcpy(lmp->suffix,arg[0]);
|
||||
lmp->suffix2 = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user