git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15413 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2016-07-30 21:24:55 +00:00
parent 26622f2826
commit 6ff87be849
2 changed files with 9 additions and 10 deletions

View File

@ -489,7 +489,7 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
maxatom = 0; maxatom = 0;
if (ave == WINDOW) { if (ave == WINDOW) {
memory->create(stats_list,nwindow,4,"histo:stats_list"); memory->create(stats_list,nwindow,4,"ave/histo:stats_list");
memory->create(bin_list,nwindow,nbins,"ave/histo:bin_list"); memory->create(bin_list,nwindow,nbins,"ave/histo:bin_list");
} }
@ -1048,10 +1048,10 @@ void FixAveHisto::options(int narg, char **arg)
void FixAveHisto::allocate_values(int n) void FixAveHisto::allocate_values(int n)
{ {
memory->grow(which,n,"ave/time:which"); memory->grow(which,n,"ave/hsito:which");
memory->grow(argindex,n,"ave/time:argindex"); memory->grow(argindex,n,"ave/histo:argindex");
memory->grow(value2index,n,"ave/time:value2index"); memory->grow(value2index,n,"ave/histo:value2index");
ids = (char **) memory->srealloc(ids,n*sizeof(char *),"ave/time:ids"); ids = (char **) memory->srealloc(ids,n*sizeof(char *),"ave/histo:ids");
} }
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------

View File

@ -153,7 +153,9 @@ void FixAveHistoWeight::end_of_step()
// invoke compute if not previously invoked // invoke compute if not previously invoked
if (which[i] == COMPUTE) { if (which[i] == COMPUTE) {
Compute *compute = modify->compute[m]; Compute *compute = modify->compute[m];
if (kind == GLOBAL && mode == SCALAR) { if (kind == GLOBAL && mode == SCALAR) {
if (j == 0) { if (j == 0) {
if (!(compute->invoked_flag & INVOKED_SCALAR)) { if (!(compute->invoked_flag & INVOKED_SCALAR)) {
@ -219,11 +221,9 @@ void FixAveHistoWeight::end_of_step()
if (kind == GLOBAL && mode == SCALAR) { if (kind == GLOBAL && mode == SCALAR) {
if (j == 0) weight = fix->compute_scalar(); if (j == 0) weight = fix->compute_scalar();
else weight = fix->compute_vector(j-1); else weight = fix->compute_vector(j-1);
} else if (kind == GLOBAL && mode == VECTOR) { } else if (kind == GLOBAL && mode == VECTOR) {
error->all(FLERR,"Fix ave/histo/weight option not yet supported");
error->all(FLERR,"Illegal fix ave/spatial command"); // NOTE: need to allocate local storage
if (j == 0) { if (j == 0) {
int n = fix->size_vector; int n = fix->size_vector;
for (i = 0; i < n; i++) weights[n] = fix->compute_vector(i); for (i = 0; i < n; i++) weights[n] = fix->compute_vector(i);
@ -231,7 +231,6 @@ void FixAveHistoWeight::end_of_step()
int n = fix->size_vector; int n = fix->size_vector;
for (i = 0; i < n; i++) weights[n] = fix->compute_array(i,j-1); for (i = 0; i < n; i++) weights[n] = fix->compute_array(i,j-1);
} }
} else if (kind == PERATOM) { } else if (kind == PERATOM) {
if (j == 0) { if (j == 0) {
weights = fix->vector_atom; weights = fix->vector_atom;