Skip to content

Allow Optional Runtime Computation of the Density Profile in the Take Approach #226

@julianlitz

Description

@julianlitz

The Take approach currently requires that both the DomainGeometry values (arr, att, art, detDF) and the density profile are cached together. This was done for implementation convenience — having everything precomputed and readily accessible.

However, caching the density profile at every grid point can be trivially avoided to reduce the memory footprint if desired. The density profile should therefore be made optionally computable at runtime rather than always stored.

Proposed change:

  • The Take approach should only assume that the DomainGeometry quantities (arr, att, art, detDF) are cached.
  • The density profile should be recomputed on-the-fly when a user opts out of caching it, trading memory for compute.
  • This can be controlled via a configuration flag (e.g., cache_density_profile = true/false).

This makes the Take approach more flexible and allows it to be used in memory-constrained settings without changing its fundamental character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions