forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12998 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
fdd6a493e1
commit
48cd742b52
|
@ -69,6 +69,7 @@ Fix::Fix(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
|||
|
||||
scalar_flag = vector_flag = array_flag = 0;
|
||||
peratom_flag = local_flag = 0;
|
||||
size_array_rows_variable = 0;
|
||||
|
||||
comm_forward = comm_reverse = comm_border = 0;
|
||||
restart_reset = 0;
|
||||
|
|
|
@ -57,6 +57,7 @@ class Fix : protected Pointers {
|
|||
int size_vector; // length of global vector
|
||||
int size_array_rows; // rows in global array
|
||||
int size_array_cols; // columns in global array
|
||||
int size_array_rows_variable; // 1 if row count is unknown in advance
|
||||
int global_freq; // frequency s/v data is available at
|
||||
|
||||
int peratom_flag; // 0/1 if per-atom data is stored
|
||||
|
|
|
@ -893,8 +893,11 @@ void Thermo::parse_fields(char *str)
|
|||
if (argindex1[nfield] > 0 && argindex2[nfield] > 0) {
|
||||
if (modify->fix[n]->array_flag == 0)
|
||||
error->all(FLERR,"Thermo fix does not compute array");
|
||||
if (argindex1[nfield] > modify->fix[n]->size_array_rows ||
|
||||
argindex2[nfield] > modify->fix[n]->size_array_cols)
|
||||
if (argindex1[nfield] > modify->fix[n]->size_array_rows) {
|
||||
if (modify->fix[n]->size_array_rows_variable == 0)
|
||||
error->all(FLERR,"Thermo fix array is accessed out-of-range");
|
||||
}
|
||||
if (argindex2[nfield] > modify->fix[n]->size_array_cols)
|
||||
error->all(FLERR,"Thermo fix array is accessed out-of-range");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue