Skip to content

Draft of entropy correction artificial viscosity#2700

Draft
jlchan wants to merge 63 commits into
trixi-framework:mainfrom
jlchan:jc/semidiscretization_AV
Draft

Draft of entropy correction artificial viscosity#2700
jlchan wants to merge 63 commits into
trixi-framework:mainfrom
jlchan:jc/semidiscretization_AV

Conversation

@jlchan
Copy link
Copy Markdown
Contributor

@jlchan jlchan commented Dec 9, 2025

This PR is mainly intended as experimentation and brainstorming on how to implement ECAV in Trixi.

Ideally we would like to reuse the gradient calculations between rhs_parabolic! and rhs!. Two assumptions:

  • SplitODEProblem calls rhs_parabolic! first, then rhs! so that the viscous gradients are available to rhs!, which would now need to take in a cache_parabolic or viscous_container argument.
  • the AV is implemented in rhs! and should not be overly stiff.

Since the rhs! call signature changes, this probably requires a new Semidiscretization?

Questions:

  • how would one run with no parabolic terms? Maybe have a dummy parabolic equation which is set by default if the parabolic equation is not specific. This would just trigger rhs_parabolic! to calculate gradients

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 9, 2025

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 Dec 9, 2025

Codecov Report

❌ Patch coverage is 1.20968% with 490 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.36%. Comparing base (16e465f) to head (56815c8).
⚠️ Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
...ization/semidiscretization_artificial_viscosity.jl 0.00% 176 Missing ⚠️
...c/solvers/dgsem_tree/dg_2d_artificial_viscosity.jl 0.00% 122 Missing ⚠️
src/solvers/dgsem_tree/dg_1d_parabolic.jl 1.69% 58 Missing ⚠️
examples/tree_1d_dgsem/elixir_ecav_1d.jl 0.00% 50 Missing ⚠️
examples/tree_2d_dgsem/elixir_ecav_2d.jl 0.00% 37 Missing ⚠️
src/solvers/dgmulti/dg.jl 0.00% 27 Missing ⚠️
...c/equations/laplace_diffusion_entropy_variables.jl 0.00% 6 Missing ⚠️
src/solvers/dgsem_tree/dg_2d_parabolic.jl 14.29% 6 Missing ⚠️
src/solvers/solvers_parabolic.jl 14.29% 6 Missing ⚠️
src/equations/compressible_euler_1d.jl 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2700      +/-   ##
==========================================
- Coverage   97.08%   90.36%   -6.71%     
==========================================
  Files         611      615       +4     
  Lines       47580    48058     +478     
==========================================
- Hits        46189    43427    -2762     
- Misses       1391     4631    +3240     
Flag Coverage Δ
unittests 90.36% <1.21%> (-6.71%) ⬇️

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.

@DanielDoehring DanielDoehring marked this pull request as draft December 12, 2025 07:41
@DanielDoehring DanielDoehring added the enhancement New feature or request label Dec 17, 2025
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.

3 participants