-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I'm having a bit of trouble with container reductions when attempting to switch from EagerDGDisc to op namespace.
This pattern is consistently used in grudge for container reductions:
Line 255 in 6c9e7b2
| if not isinstance(vec, DOFArray): |
One problem is that this pattern is never what one wants when the array container components are each independent physical quantities. For example, when using a CV object in mirgecom, one would never want this: max(cv.mass, cv.energy, cv.momentum[0], cv.momentum[1], .... ), however that is what these grudge reductions are wont to do.
@inducer says: (Snipped part about empty reductions, see #266.)
Discussing with @majosm , he suggested maybe we should add a flag to indicate whether we want to reduce across components of an array container. We don't want that in the vast majority of cases. Such a flag would help with the first problem. Maybe switching to a map_array_container approach would address the second part and then perform a 2nd reduction across components when the flag is set.
Just wanting to start a discussion with this. Any ideas @inducer?