grinsfem/grins — pull request #167 by pbauman (2014-11-19 20:11:07+00:00)
Title: Postprocessing refactor

This PR refactors how GRINS will handle post processing interior quantities.

From a user perspective, the main difference is that each Physics now handles its own post processing quantities. This is done in the new `register_postprocessing_vars` and `compute_postprocessed_quantity` methods that are implemented in each Physics. Then, each physics in the input will read its own output_vars. Having tried the one-class-to-rule-them-all strategy (thinking that Physics was getting to heavy), I think that was the wrong approach and this is better.

This has also made obsolete the `compute_element_cache` method and that has been removed everywhere.

Within GRINS, what's happening is that each variable that gets registered gets its own index (that the Physics should store). Then, when it's time to evaluate the post processing quantities, each Physics is called and, if it has that index, it returns the value at the point being queried. This is different from the caching strategy before. I abandoned that (for now) because 1. The CachedValues implementation is terrible and 2. This code is much leaner. If the post processing starts popping up in timings, we can reexamine the caching strategy, but my main goal with this PR was to lower the barrier to adding new post processing variables.

I believe I altered all the Physics that had post processing quantities, but let me know if I missed any. I'll let this sit for a bit to give people time to comment.