Skip to content

Comments

Fixes a bug in deriving the electron pressure from conserved quantities in AMR files#199

Merged
wtbarnes merged 4 commits intorice-solar-physics:mainfrom
wtbarnes:fix-pe-amr-bug
Nov 12, 2025
Merged

Fixes a bug in deriving the electron pressure from conserved quantities in AMR files#199
wtbarnes merged 4 commits intorice-solar-physics:mainfrom
wtbarnes:fix-pe-amr-bug

Conversation

@wtbarnes
Copy link
Member

This fixes a bug in how the electron pressure is calculated from the conserved quantities calculated in the amr files. I was dividing by $\gamma - 1$ instead of multiplying so in cases where only the amr files were being used, the electron temperature was off by over a factor of 2. 🤦

This also includes several tests to ensure this doesn't happen again.

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.35%. Comparing base (c175a02) to head (0e45287).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #199      +/-   ##
==========================================
+ Coverage   81.20%   81.35%   +0.15%     
==========================================
  Files          21       21              
  Lines        1096     1105       +9     
==========================================
+ Hits          890      899       +9     
  Misses        206      206              

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Member

@jwreep jwreep left a comment

Choose a reason for hiding this comment

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

Looks good to me! Relatively simple fix to a simple issue.

@wtbarnes wtbarnes merged commit bf0d711 into rice-solar-physics:main Nov 12, 2025
14 checks passed
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.

2 participants