pynbody / genetIC

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

adapt_mask ineffective if combined with subsampling #117

Open Morkney opened 2 years ago

Morkney commented 2 years ago

Hello,

I've been having a little trouble getting the adapt_mask option to work as intended when combined with subsampling. As an example, I might have a zoom geometry like:

subsample 8

# Specify the base-level grid:
base_grid 100 192

# Zoom level 1:
centre 50 50 50
select_cube 10
zoom_grid 4 48

# Zoom level 2:
centre 50 50 50
select_sphere 3
zoom_grid 2 96

adapt_mask 5
autopad 5

In my mind, this is describing a central high-resolution sphere, enclosed within a central base-resolution cube, with a base that is subsampled by 8 times. Then, the adapt_mask and autopad options should adapt the particles in zoom level 1 so that they form a sphere wrapped around the particles in zoom level 2, and every autopad level should also be rounded.

However, what I find is that the resolution levels are only spherical out until the borders of the zoom level 1 particles, beyond which they become cube shaped.

Perhaps I am misunderstanding how the options interact, or what they are supposed to do.

All the best