fix wrong column size assignment bug when using optional arguments in some local computes
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user