Skip to content

Partial absorbing chain reduction attempt 2 - #3816

Merged
connor-mcclellan merged 12 commits into
tardis-sn:masterfrom
jvshields:partial_absorbing_chain_2
Nov 4, 2026
Merged

connor-mcclellan merged 12 commits into
tardis-sn:masterfrom
jvshields:partial_absorbing_chain_2

Conversation

@jvshields

Copy link
Copy Markdown
Contributor

This is another attempt at making subset absorbing chain reductions work. For the IIP workflow you would probably only want to do hydrogen and maybe helium too. This will technically make the MC part slower but probably negligibly if you do hydrogen and helium. Cutting heavy elements out of the process should reduce the memory hungry opacity solve.

@andrewfullard

Copy link
Copy Markdown
Contributor

Probably close #3598?

@andrewfullard
andrewfullard self-requested a review November 2, 2026 16:14
raise ValueError("markov_chain.mode must be full, partial, or explicit")
if (mode == "partial") != bool(elements):
raise ValueError(
"markov_chain.elements must be nonempty only in partial mode"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually matter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to have. If you switch to partial mode but don't provide any elements it's a more informative crash telling you you have to add elements to the config. I'm changing the wording a bit though.

@tardis-bot

tardis-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The docs workflow has completed with these results:

  • Build: success

View the documentation preview.

Runs: build and test · publish

@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.75839% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.32%. Comparing base (773caec) to head (17abae7).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
tardis/transport/montecarlo/macro_atom.py 0.00% 43 Missing ⚠️
...dis/opacities/macro_atom/absorbing_markov_chain.py 90.66% 7 Missing ⚠️
...ardis/opacities/continuum/continuum_state_numba.py 0.00% 2 Missing ⚠️
tardis/opacities/macro_atom/macroatom_state.py 75.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3816   +/-   ##
=======================================
  Coverage   70.32%   70.32%           
=======================================
  Files         207      207           
  Lines       16065    16163   +98     
=======================================
+ Hits        11298    11367   +69     
- Misses       4767     4796   +29     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrewfullard andrewfullard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good except for the addition of tutorials and workflows RST files at the top level?

@jvshields

Copy link
Copy Markdown
Contributor Author

All looks good except for the addition of tutorials and workflows RST files at the top level?

Oops should be gone now.

@andrewfullard andrewfullard added the opacity Related to opacity extensions in TARDIS label Nov 4, 2026
@connor-mcclellan
connor-mcclellan merged commit c34435f into tardis-sn:master Nov 4, 2026
28 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opacity Related to opacity extensions in TARDIS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants