Skip to content

Comments

Bump TrixiTest#2682

Closed
DanielDoehring wants to merge 5 commits intotrixi-framework:mainfrom
DanielDoehring:BumpTrixiTrest
Closed

Bump TrixiTest#2682
DanielDoehring wants to merge 5 commits intotrixi-framework:mainfrom
DanielDoehring:BumpTrixiTrest

Conversation

@DanielDoehring
Copy link
Member

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 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 -51 to -52
# TODO: remake ignores the mesh itself as well
@test real(ode.p.mesh) == Float64
Copy link
Contributor

Choose a reason for hiding this comment

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

I am uncertain about this TODO.

Sure, mesh now has Float32 as real type, but just because RealT was passed to P4estMesh.

This TODO is from #2212, where Adapt.jl was introduced. Would we expect mesh to get adapted as well, @vchuravy ?

Copy link
Member Author

Choose a reason for hiding this comment

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

In that case this TODO should probably live somewhere else, maybe in function remake?

Copy link
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.

I agree that the TODO note may also live somewhere else. But I would like to keep the current form of the elixir without introducing RealT in the mesh since it is not used anywhere else (and should not be required when adapt is fixed).

@DanielDoehring
Copy link
Member Author

DanielDoehring commented Dec 2, 2025

I agree that the TODO note may also live somewhere else. But I would like to keep the current form of the elixir without introducing RealT in the mesh since it is not used anywhere else (and should not be required when adapt is fixed).

Are you sure the test actually does what it is supposed to do?

In the test RealT = Float32 is set

@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_basic_gpu.jl"),
# Expected errors are exactly the same as with TreeMesh!
l2=[Float32(8.311947673061856e-6)],
linf=[Float32(6.627000273229378e-5)],
RealT=Float32,
real_type=Float32)

but this is not used in the elixir itself:

https://github.com/trixi-framework/Trixi.jl/blob/main/examples/p4est_2d_dgsem/elixir_advection_basic_gpu.jl

i.e., there is no place where RealT (only real_type) shows up. To me, this looks like the RealT parameter was altogether forgotten when that elixir was introduced.

@benegee
Copy link
Contributor

benegee commented Dec 2, 2025

In the test RealT = Float32 is set
[...]
but this is not used in the elixir itself:

This is related to our discussion in trixi-framework/TrixiTest.jl#16: since this is a test using Float32 it makes sense to compute the error tolerances based on Float32, which had been the only effect of the RealT parameter so far.

@DanielDoehring
Copy link
Member Author

DanielDoehring commented Dec 2, 2025

This is related to our discussion in trixi-framework/TrixiTest.jl#16: since this is a test using Float32 it makes sense to compute the error tolerances based on Float32, which had been the only effect of the RealT parameter so far.

Ah I see. However, the test seems (to me) to be executed in Float32 altogether. Since the test passes with the Float32 mesh I would still change that datatype?

@DanielDoehring DanielDoehring marked this pull request as draft December 2, 2025 18:48
@DanielDoehring DanielDoehring deleted the BumpTrixiTrest branch December 8, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants