pynbody / genetIC

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

Fix windowing for quadratic algorithm #34

Closed Martin-Rey closed 6 years ago

Martin-Rey commented 6 years ago

A further bug following the modifications of the quadratic algorithm.

Targeting a specific region (windowing) was previously based on the finest level. I forgot this aspect when changing the implementation in PR #33.

This PR keeps track of the region through all the different levels allowing for correct windowing. It stores the IDs of the targeted cells at each level.

Martin-Rey commented 6 years ago

Actually this is not quite correct. It works for most applications but not for grafic outputs. The grafic mapper only flag cells that are recorded in the input file but does not deal with propagating those through the different grids.

apontzen commented 6 years ago

Yes I suspect it was implemented this way because technically any cell can be addressed using a Grafic ID (whereas only the finest cells can be addressed using Gadget or Tipsy iords).

Nonetheless I think it would make sense to update Grafic mapper to propagate to all coarser levels when a fine cell is flagged, for consistency.