AMReX-Astro / AMReX-Astro/Microphysics
Documented Debye-Huckel screening option cannot be built
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 43
- Forks
- 46
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Summary
SCREEN_METHOD=debye_huckel is documented and implemented in screen.H,
but GNU make rejects it. Adding the makefile selection alone also leaves
the screening test unable to compile because screen_name is missing.
Suggested priority: medium. This blocks a documented build configuration.
Affected code
Make.Microphysics_extern:38-51: accepted screening methods.screening/screen.H:34-44: screening method name declarations.unit_test/test_screening_templated/main.cpp:154: usesscreen_name.Docs/source/screening.rst: documents the standalone method.
Reviewed commit: e4b401b7637894a3db5ffa1e4b401509a332a1d6.
Related implementation: 66a8b4a8, PR #1688.
Reproduction
From the repository root:
cd unit_test/test_screening_templated
make -n SCREEN_METHOD=debye_huckel
The command exits with status 2:
../../Make.Microphysics_extern:50: *** Invalid value for SCREEN_METHOD.
The accompanying harness independently selects
-DSCREEN_METHOD=SCREEN_METHOD_debye_huckel at compilation. The screening
calculation works, but adding a reference to screen_name produces:
error: 'screen_name' was not declared in this scope
See run_harness.py, reproduce.cpp, and reproduction-output.txt in this
directory. This second check isolates the missing declaration without
editing the makefile.
Proposed fix
Add this branch before the rejecting else in Make.Microphysics_extern:
else ifeq ($(SCREEN_METHOD), debye_huckel)
DEFINES += -DSCREEN_METHOD=SCREEN_METHOD_debye_huckel
Add the corresponding branch in the screen_name selection:
#elif SCREEN_METHOD == SCREEN_METHOD_debye_huckel
constexpr std::string_view screen_name = "debye_huckel";
Validation
Build and run unit_test/test_screening_templated with this method and
verify the output prefix is test_screening.debye_huckel. Add this option
to the screening build matrix so both omissions are covered.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SCREEN_METHOD selection in Make.Microphysics_extern:38-51 and the screen_name declarations in screening/screen.H:34-44. Run make -n SCREEN_METHOD=debye_huckel in unit_test/test_screening_templated, then use run_harness.py and reproduce.cpp to confirm the missing name declaration. Done means the test builds and runs with output prefix test_screening.debye_huckel and the method is covered by the screening build matrix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100