Skip to content

Zoom 1: Introducing zoom_init

William Roper requested to merge zoom_init into master

This is the first in a line of modular MRs for the zoom functionality. This MR introduces the zoom code's basic structure and the cell grid properties calculation at initialisation.

  • The src/zoom_region directory is introduced to house the zoom functionality. This is an improvement over the existing zoom branches where all zoom source code was in src, functionality has also been (and will be) further separated than in the existing zoom branches.
  • The --enable-zoom-region configure flag is introduced alongside the necessary changes to the Makefile.
  • zoom_init.c/h are introduced. The functions within calculate the shift necessary to move the particles to the centre of the box and calculate the boundaries, dimensions and widths of each cell grid (zoom, buffer and background; buffer being optional) for 3 different cases:
    • Large zoom regions allow multiple background cells in the zoom region (e.g. Apostle)
    • Intermediate zoom region sizes tesselate background cells the size of the zoom region across the box.
    • Small zoom regions introduced buffer cells between the zoom cells and background cells to ensure the number of background cells isn't too high (e.g. C-EAGLE/FLARES).
  • zoom_init is called in space_init.
  • The zoom initialisation requires the gravity properties so gravity_props_init is now called prior to space_init.
  • An example parameter file has been introduced in examples/ZoomRegiion.
  • Parameter naming conventions have been improved relative to the existing zoom branches to be clearer and reduce confusion between padding around the high-resolution particles and buffer cells.
  • An important change to note over the existing zoom branches is that Scheduler:max_top_level_cells is now ignored in favour of a more explicit parameter in the zoom block: ZoomRegion:zoom_top_level_cells.

Merge request reports