AMReX-Astro / AMReX-Astro/Microphysics

switch NSE to use constexpr_for on bion and mion

Open
#1,897 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

nse
Dominant language
C++
Stars
43
Forks
46
Avg merge
2d 18h
Merged PRs (30d)
15

Description

The way bion and mion are implemented in the networks is via a loop over a constexpr function templated on the species index. In the self-consistent NSE solver, we are using these legacy interfaces to bion and mion which take O(N) work to index. We should switch those loops to constexpr_for and use the templated interface to mion and bion.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the self-consistent NSE solver and trace the loops over species that currently call the legacy bion and mion interfaces. Compare them with the constexpr_for pattern and templated bion and mion interfaces already used elsewhere. Done means those solver loops use constexpr_for and the templated interfaces while preserving the solver’s behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.