forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15413 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
26622f2826
commit
6ff87be849
|
@ -489,7 +489,7 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) :
|
|||
maxatom = 0;
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
|
@ -1048,10 +1048,10 @@ void FixAveHisto::options(int narg, char **arg)
|
|||
|
||||
void FixAveHisto::allocate_values(int n)
|
||||
{
|
||||
memory->grow(which,n,"ave/time:which");
|
||||
memory->grow(argindex,n,"ave/time:argindex");
|
||||
memory->grow(value2index,n,"ave/time:value2index");
|
||||
ids = (char **) memory->srealloc(ids,n*sizeof(char *),"ave/time:ids");
|
||||
memory->grow(which,n,"ave/hsito:which");
|
||||
memory->grow(argindex,n,"ave/histo:argindex");
|
||||
memory->grow(value2index,n,"ave/histo:value2index");
|
||||
ids = (char **) memory->srealloc(ids,n*sizeof(char *),"ave/histo:ids");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -153,7 +153,9 @@ void FixAveHistoWeight::end_of_step()
|
|||
// invoke compute if not previously invoked
|
||||
|
||||
if (which[i] == COMPUTE) {
|
||||
|
||||
Compute *compute = modify->compute[m];
|
||||
|
||||
if (kind == GLOBAL && mode == SCALAR) {
|
||||
if (j == 0) {
|
||||
if (!(compute->invoked_flag & INVOKED_SCALAR)) {
|
||||
|
@ -219,11 +221,9 @@ void FixAveHistoWeight::end_of_step()
|
|||
if (kind == GLOBAL && mode == SCALAR) {
|
||||
if (j == 0) weight = fix->compute_scalar();
|
||||
else weight = fix->compute_vector(j-1);
|
||||
|
||||
} else if (kind == GLOBAL && mode == VECTOR) {
|
||||
|
||||
error->all(FLERR,"Illegal fix ave/spatial command");
|
||||
|
||||
error->all(FLERR,"Fix ave/histo/weight option not yet supported");
|
||||
// NOTE: need to allocate local storage
|
||||
if (j == 0) {
|
||||
int n = fix->size_vector;
|
||||
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;
|
||||
for (i = 0; i < n; i++) weights[n] = fix->compute_array(i,j-1);
|
||||
}
|
||||
|
||||
} else if (kind == PERATOM) {
|
||||
if (j == 0) {
|
||||
weights = fix->vector_atom;
|
||||
|
|
Loading…
Reference in New Issue