Skip to content

Refactor plasma field calculations to use numba's njit for improved p…#4172

Merged
timothy-nunn merged 1 commit intomainfrom
change_jit_plasma_fields
Apr 10, 2026
Merged

Refactor plasma field calculations to use numba's njit for improved p…#4172
timothy-nunn merged 1 commit intomainfrom
change_jit_plasma_fields

Conversation

@chris-ashe
Copy link
Copy Markdown
Collaborator

…erformance

Description

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@chris-ashe chris-ashe requested a review from a team as a code owner April 10, 2026 10:43
Copilot AI review requested due to automatic review settings April 10, 2026 10:43
@chris-ashe chris-ashe added the Bug Something isnt working label Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates plasma field helper functions to use Numba’s njit decorator (nopython mode) for improved JIT performance and stricter compilation guarantees within the physics model layer.

Changes:

  • Replace @nb.jit(cache=True) with @nb.njit(cache=True) on several PlasmaFields static methods.
  • Ensure the affected plasma field calculations run in Numba nopython mode (consistent with other physics modules already using njit / jit(nopython=True)).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.44%. Comparing base (0a46aa3) to head (1400951).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4172   +/-   ##
=======================================
  Coverage   49.44%   49.44%           
=======================================
  Files         149      149           
  Lines       29796    29796           
=======================================
  Hits        14734    14734           
  Misses      15062    15062           

☔ 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.

@timothy-nunn timothy-nunn merged commit 1927fd4 into main Apr 10, 2026
14 checks passed
@timothy-nunn timothy-nunn deleted the change_jit_plasma_fields branch April 10, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isnt working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants