Skip to content

[newchem-cpp] WIP: initial efforts towards splitting SpLUT#551

Open
mabruzzo wants to merge 37 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/use-partmap
Open

[newchem-cpp] WIP: initial efforts towards splitting SpLUT#551
mabruzzo wants to merge 37 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/use-partmap

Conversation

@mabruzzo

@mabruzzo mabruzzo commented May 14, 2026

Copy link
Copy Markdown
Collaborator

This is a WIP PR (I will definitely modify it before it's ready for review)

This depends on #562


I'm posting it now to start running the tests in the background.

@mabruzzo mabruzzo changed the base branch from main to newchem-cpp May 14, 2026 18:48
@mabruzzo mabruzzo force-pushed the ncc/use-partmap branch 3 times, most recently from cc469e9 to 47fb540 Compare May 14, 2026 19:00
mabruzzo added 26 commits June 21, 2026 12:55
…data

Currently, `time_deriv_0d` works by preparing a context pack with all of
the infrastructure for creating a 1-element version of grackle_field_data.
This was a pragmatic choice early during transcription, but it's hacky &
inefficient.

Before this PR:

- the `time_derivative_0d::derivative` function would overwrite
  `pack.field.internal_energy` and `pack.field.e_density`,
  `pack.field.HI_density`, `pack.field.HII_density`, ... to point to the
  buffers provided in the function arguments
- now, the context pack will pre-allocate the evolved buffers tracked
  within the 1-element version `grackle_field_data` and we will just copy over
  the values from the function arguments

Aside: for all fields that aren't evolved (e.g. `density`, `dust_density`,
`volumetric_heating_rate`, RT-fields, etc.) the 1-zone `grackle_field_data`
instance just points to the appropriate location in the full 3D field.
This is inadvisable, but will be necessary to achieve reasonable
performance in step_rate_newton_raphson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant