Skip to content

Conversation

@Chaitanya140904
Copy link

This PR updates elixirs in the CI groups from #2464 to use the new default Local Lax–Friedrichs wave speed by removing explicit max_abs_speed_naive overrides for FluxLaxFriedrichs/Rusanov.

I ran representative elixirs (1D/2D/3D tree, structured, dgmulti, etc.) locally and they all finished with retcode: Success.

On my local macOS + Julia 1.12 setup, test/test_threaded.jl reports 8 failing tests in elixir_euler_positivity.jl (4 passed, 8 failed, 12 total). These failures also appear when I restore that elixir to match origin/main, so they seem environment-specific rather than caused by this PR. CI should clarify the correct behavior.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 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.

Comment on lines 4 to 11
# Up to version 0.13.0, `max_abs_speed_naive` was used as the default wave speed estimate of
# `const flux_lax_friedrichs = FluxLaxFriedrichs(), i.e., `FluxLaxFriedrichs(max_abs_speed = max_abs_speed_naive)`.
# `const flux_lax_friedrichs = FluxLaxFriedrichs(), i.e., `FluxLaxFriedrichs()`.
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs()`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
surface_flux = FluxLaxFriedrichs(max_abs_speed_naive)
surface_flux = FluxLaxFriedrichs()
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for taking initiative here! The goal would be to delete this comment, though, and just use flux_lax_friedrichs. The issue is that you will most llikely run into a number of CI failures due to slightly different errors.

Copy link
Member

Choose a reason for hiding this comment

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

So this comment applies to every elixir, i.e., it would be nice to replace in every elixir this comment and switch to flux_lax_friedrichs.

@DanielDoehring DanielDoehring added the example Adding/changing examples (elixirs) label Dec 3, 2025
@DanielDoehring DanielDoehring marked this pull request as draft December 3, 2025 08:17
@Chaitanya140904 Chaitanya140904 marked this pull request as ready for review December 3, 2025 20:27
@Chaitanya140904
Copy link
Author

I’ve implemented the requested changes:

1)replaced explicit FluxLaxFriedrichs(...) usage with flux_lax_friedrichs in the elixirs

2)removed the outdated LLF comment where applicable
Please let me know if you’d like me to adjust anything further or split this into smaller commits.

Comment on lines -4 to -10
# Up to version 0.13.0, `max_abs_speed_naive` was used as the default wave speed estimate of
# `const flux_lax_friedrichs = FluxLaxFriedrichs(), i.e., `FluxLaxFriedrichs(max_abs_speed = max_abs_speed_naive)`.
# In the `StepsizeCallback`, though, the less diffusive `max_abs_speeds` is employed which is consistent with `max_abs_speed`.
# Thus, we exchanged in PR#2458 the default wave speed used in the LLF flux to `max_abs_speed`.
# To ensure that every example still runs we specify explicitly `FluxLaxFriedrichs(max_abs_speed_naive)`.
# We remark, however, that the now default `max_abs_speed` is in general recommended due to compliance with the
# `StepsizeCallback` (CFL-Condition) and less diffusion.
Copy link
Member

Choose a reason for hiding this comment

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

This is what we would like to have for every elixir: Remove the entire comment once you switch fluxes

@DanielDoehring
Copy link
Member

DanielDoehring commented Dec 8, 2025

Nice, can you now also format the examples via

$ julia utils/trixi-format.jl/ examples/?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example Adding/changing examples (elixirs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants