Hi all,
I have spent a while looking at the issue involving the derived quantities and I have come up with a solution for some of them, but not all of them. I have pushed a couple changes to the PR that add a cell_volume and cell_mass field specific to YTDataContainerDatasets that makes use of their "dx", "dy", and "dz" fields. As of now, the following derived quantities work:
- min location
- max location
- extrema
- bulk velocity
- total mass
- weighted average quantity
- weighted variance
- total quantity
The ones that don't work are:
- spin parameter
- center of mass
- angular momentum vector
The final three all don't work for the same reason, which is that they require access to the "index" position fields. Unfortunately, these cannot be overridden for reasons that have to do with the _determine_fields function. I have made a point during this development process to alter as little as possible outside of the ytdata frontend. However, at this point, there is no more room to maneuver. The only solutions I can come up with are ugly and would make it very difficult to smoothly swap in a proper AMR hierarchy when we get around to creating one and doing this properly.
The last thing I can think of would be to swap in special derived quantity functions for this frontend only that use position fields appropriate for the frontend. The functions themselves would be simple to implement, but because the derived quantity collection is added onto data container objects and not dataset objects, I have no idea how one would do the swap. For a similar reason, I don't know how to simply not allow these problem cases to be called, or to fail in a clean way for them.
If anyone has any ideas, I would love to hear them.
Britton