print more meaningful error message when trying to access individual data from a local array produced by a compute */local

This commit is contained in:
Axel Kohlmeyer 2019-04-04 12:42:54 -04:00
parent f73ccc3025
commit 81dd96f970
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 0 deletions

View File

@ -1578,6 +1578,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar)
newtree->nextra = 0;
treestack[ntreestack++] = newtree;
} else if (nbracket == 1 && compute->local_flag) {
print_var_error(FLERR,"Cannot access local data via indexing",ivar);
} else print_var_error(FLERR,
"Mismatched compute in variable formula",ivar);