[aspect-devel] temperature anomaly postprocessor
Wolfgang Bangerth
bangerth at colostate.edu
Tue Jul 10 07:59:25 PDT 2018
Hi Max,
> Alternatively, how about this approach, which would avoid modifying all of the
> other postprocessor classes.
You don't need to change all of them. All you would need to do is add an
'update()' function to the viz postprocessor Interface class with an empty
default implementation. Classes that don't want to do anything then don't have
to overload it.
> I could add a private variable to the temperature anomaly class that checked
> the current timestep number, and if it was not the current step, update the
> depth average values. I think that this could be done within the simpler
> interface to DataPostprocessorScalar.
That's more complicated because the evaluate() function can be called multiple
times in parallel on different threads. So you'd have to synchronize the call
to update the depart average values.
There is also a potential for deadlocks if there is a processor that has no
cells (and that consequently may never get to the place where it would want to
call the update function). If the function to update the depth averages
requires MPI communication, you will have to ensure that *all* processors call
it, or you'll get a hang.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at colostate.edu
www: http://www.math.colostate.edu/~bangerth/
More information about the Aspect-devel
mailing list