fix_ave_histo invokes same compute multiple times

Hi,

I just observed the problem that the "already-invoked" capabilities of fix_ave_histo don't seem to work. For example, I added a printf statement in compute_temp.cpp at (after having included comm.h):

Does anybody have a clue what’s wrong in fix_ave_histo.cpp?

That’s not the way the logic to avoid re-invoking is designed to work.

You have 2 different fixes which both happen to need the compute on the same
timestep.

The logic in fix ave/histo (and all the other commands that use computes,
like fix ave/time, dump, fix print with a variable, etc), clears
the invocation flag then checks/sets the invocation flag.

So it avoids re-invocation within a single command - e.g. if you histogram
several values from one compute (e.g. the 6 vector values that compute
temp produces)

But it doesn’t avoid it across multiple commands.

That would be more tricky to do, b/c you’d have to worry
about when in the timestep the compute was invoked. E.g. which
velocities did compute temp use, since velocities change at 2 places
within the timestep.

I’d say your use case is a rare one, so I don’t think its worth
worrying about the double invocation …

Steve