Skip to content

Remove option to pass averaged normal direction for NonConservativeJump terms#2890

Draft
patrickersing wants to merge 9 commits intotrixi-framework:mainfrom
patrickersing:subcell_limiting_remove_avg_direction
Draft

Remove option to pass averaged normal direction for NonConservativeJump terms#2890
patrickersing wants to merge 9 commits intotrixi-framework:mainfrom
patrickersing:subcell_limiting_remove_avg_direction

Conversation

@patrickersing
Copy link
Copy Markdown
Member

@patrickersing patrickersing commented Mar 27, 2026

See #2852

This PR modifies the calcflux_fhat! kernel for NonConservativeJump() terms to pass the left and right normal direction instead of the averaged normal direction, to fix the convergence issues on curvilinear meshes.
This also required a modification of how the normal direction is applied for flux_nonconservative_powell_local_jump.

Here are convergence results for elixir_mhd_alfven_wave_curved_sc.jl with polydeg=4, dt=2e-4 at time t=0.1:
image

TODO:

  • TrixiShallowWater.jl: Create PR to adapt the arguments for flux_nonconservative_ersing_local_jump

@github-actions
Copy link
Copy Markdown
Contributor

Review checklist

This checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging.

Purpose and scope

  • The PR has a single goal that is clear from the PR title and/or description.
  • All code changes represent a single set of modifications that logically belong together.
  • No more than 500 lines of code are changed or there is no obvious way to split the PR into multiple PRs.

Code quality

  • The code can be understood easily.
  • Newly introduced names for variables etc. are self-descriptive and consistent with existing naming conventions.
  • There are no redundancies that can be removed by simple modularization/refactoring.
  • There are no leftover debug statements or commented code sections.
  • The code adheres to our conventions and style guide, and to the Julia guidelines.

Documentation

  • New functions and types are documented with a docstring or top-level comment.
  • Relevant publications are referenced in docstrings (see example for formatting).
  • Inline comments are used to document longer or unusual code sections.
  • Comments describe intent ("why?") and not just functionality ("what?").
  • If the PR introduces a significant change or new feature, it is documented in NEWS.md with its PR number.

Testing

  • The PR passes all tests.
  • New or modified lines of code are covered by tests.
  • New or modified tests run in less then 10 seconds.

Performance

  • There are no type instabilities or memory allocations in performance-critical parts.
  • If the PR intent is to improve performance, before/after time measurements are posted in the PR.

Verification

  • The correctness of the code was verified using appropriate tests.
  • If new equations/methods are added, a convergence test has been run and the results
    are posted in the PR.

Created with ❤️ by the Trixi.jl community.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.09%. Comparing base (4c42b01) to head (d4ee190).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2890   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files         609      610    +1     
  Lines       47493    47497    +4     
=======================================
+ Hits        46111    46116    +5     
+ Misses       1382     1381    -1     
Flag Coverage Δ
unittests 97.09% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@patrickersing patrickersing requested a review from amrueda March 27, 2026 15:44
@ranocha ranocha mentioned this pull request Apr 2, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove option to pass normal_direction_avg for NonConservativeJump terms

1 participant