pynbody / genetIC

The GM initial conditions generator
GNU General Public License v3.0
21 stars 8 forks source link

Implementating some flags propagation #36

Closed Martin-Rey closed 6 years ago

Martin-Rey commented 6 years ago

This tries to address #35, it is mostly posted as food for thoughts. It implements basic upward propagation from zoomed pixels to coarse pixels.

However, there are a number of conceptual problems with this:

The current implementation is such that flagging coarse cells on the virtual subsampled grid will also flag all fine cells encompassed by these coarse cells on the real grid (effectively downward propagation). However, this step is only done between a virtual and real grid, not between two real grids, which yields conceptual caveats and weird use cases.

This requires a lot more refactoring work: cleaning of the repeated code and making the logic self-consistent. In the mean time, this basic fix should be sufficient to run simulations in simple use-case in which the flags are purely high-res particles.

Martin-Rey commented 6 years ago

The last commits conclude the propagation of ids in grafic mapper. They have implemented a switch to pick intermediate virtual grids and avoid the conceptual problems listed above.

The behaviour is still poorly defined if flagging directly virtual grids but this is unlikely to be the case for most applications. A warning is issued in this case.

A test for pure upward propagation has been added and the existing grafic test was updated to account for the new feature.

The refactoring of ID propagation is left for later.