pynbody / genetIC

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

Generate masks for RAMSES #19

Closed Martin-Rey closed 6 years ago

Martin-Rey commented 6 years ago

Generate Ramses ic_refmap and ic_pvar files.

I converged to an implementation based on flagged cells: I assume that the flagged cells at the deepest level are the ultimate cells one is interested with. From there, I track theses cells up and down the hierarchy, including through all layers of virtual grids.

The trade-off between speed and memory is done by storing only the flagged cells vector rather than the full grid at each level, but looping through it regularly. I will run a quick profiling test to check that it does not suddenly breaks done on bigger cases.

Main additions is in the multilevelcontext/mask file. Let me know if anything seems absurd.