Skip to content

VolumeIntegralEntropyCorrection for TreeMesh#2764

Merged
ranocha merged 447 commits intotrixi-framework:mainfrom
jlchan:jc/volume_integral_entropy_correction
Feb 24, 2026
Merged

VolumeIntegralEntropyCorrection for TreeMesh#2764
ranocha merged 447 commits intotrixi-framework:mainfrom
jlchan:jc/volume_integral_entropy_correction

Conversation

@jlchan
Copy link
Copy Markdown
Contributor

@jlchan jlchan commented Jan 28, 2026

This adds IndicatorEntropyCorrection which, when combined with VolumeIntegralAdaptive, blends a stabilized subcell FV method with a high order volume integral so that the blended result satisfies an entropy inequality similar to that satisfied by a flux differencing method with entropy conservative fluxes.

IndicatorEntropyCorrectionShockCapturingCombined additionally allows users to specify a shock capturing indicator as well. The blending is then guided by the maximum of both indicators.

This requires entropy_potential to be defined for the equations being solved. One motivation for this is that it can enforce an entropy inequality for NonIdealCompressibleEuler equations.

@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 Jan 28, 2026

Codecov Report

❌ Patch coverage is 99.18033% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.13%. Comparing base (f28561f) to head (950c487).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/solvers/dgsem/calc_volume_integral.jl 97.78% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2764      +/-   ##
==========================================
+ Coverage   97.12%   97.13%   +0.01%     
==========================================
  Files         593      595       +2     
  Lines       45680    45802     +122     
==========================================
+ Hits        44364    44486     +122     
  Misses       1316     1316              
Flag Coverage Δ
unittests 97.13% <99.18%> (+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.

@jlchan
Copy link
Copy Markdown
Contributor Author

jlchan commented Jan 28, 2026

Note to self - I think the scaling of the entropy dissipation is incorrect; should probably be scaled by the full volume_jacobian.

EDIT: nevermind

@DanielDoehring DanielDoehring added the enhancement New feature or request label Jan 28, 2026
@jlchan jlchan changed the title draft of VolumeIntegralEntropyCorrection for TreeMesh VolumeIntegralEntropyCorrection for TreeMesh Jan 30, 2026
@jlchan jlchan marked this pull request as ready for review January 30, 2026 15:05
@jlchan jlchan marked this pull request as draft January 30, 2026 15:05
@jlchan jlchan marked this pull request as ready for review January 30, 2026 15:40
DanielDoehring
DanielDoehring previously approved these changes Feb 23, 2026
Copy link
Copy Markdown
Member

@DanielDoehring DanielDoehring left a comment

Choose a reason for hiding this comment

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

Okay, finally after almost 450 commits good to go from my side - sorry for asking for pause here multiple times - but I think the general structure behind the volume integrals is now much better than a month ago 👍

@jlchan
Copy link
Copy Markdown
Contributor Author

jlchan commented Feb 23, 2026

Okay, finally after almost 450 commits good to go from my side - sorry for asking for pause here multiple times - but I think the general structure behind the volume integrals is now much better than a month ago 👍

No problem. Thanks for all the helper PRs refactoring and cleaning things up!

Copy link
Copy Markdown
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

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

Thanks!

@ranocha ranocha merged commit eac3ec1 into trixi-framework:main Feb 24, 2026
39 checks passed
@DanielDoehring DanielDoehring mentioned this pull request Feb 24, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants