Closed Martin-Rey closed 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.
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:
First, this function is mostly a repetition of the functions in grafic mask, which themselves are very similar in purpose to the grid upscale and downscale flag methods. There should be unifying framework to do these propagations of flagged or masked cells through a hierarchy.
Second, due to the relationship and implementation of virtual subsampled grids at the core of grafic hierarchies, the logic of the propagation is really ambiguous.
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.