fix wrong column size assignment bug when using optional arguments in some local computes

This commit is contained in:
Axel Kohlmeyer
2019-04-03 15:15:40 -04:00
parent f73ccc3025
commit 8820467a8b
4 changed files with 13 additions and 11 deletions

View File

@ -46,9 +46,6 @@ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
local_flag = 1;
nvalues = narg - 3;
if (nvalues == 1) size_local_cols = 0;
else size_local_cols = nvalues;
cflag = -1;
nvalues = 0;
@ -57,6 +54,9 @@ ComputeImproperLocal::ComputeImproperLocal(LAMMPS *lmp, int narg, char **arg) :
else error->all(FLERR,"Invalid keyword in compute improper/local command");
}
if (nvalues == 1) size_local_cols = 0;
else size_local_cols = nvalues;
nmax = 0;
vlocal = NULL;
alocal = NULL;