Skip to content

Conversation

DanielDoehring
Copy link
Member

@DanielDoehring DanielDoehring commented Jun 10, 2025

See the item in the Trixi Meeting

xref: #1511

Major issue: The extensively used initial_condition_weak_blast_wave - if this is changed, we have lots of CI values to update.

@DanielDoehring DanielDoehring added discussion consistency Make Michael happy example Adding examples (elixirs) labels Jun 10, 2025
Copy link
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.

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 55.37634% with 83 lines in your changes missing coverage. Please review.

Project coverage is 96.56%. Comparing base (da9e72e) to head (1b82431).

Files with missing lines Patch % Lines
src/solvers/dg.jl 56.20% 53 Missing ⚠️
...dgsem/elixir_euler_riemannproblem_quadrants_amr.jl 0.00% 15 Missing ⚠️
...dgsem/elixir_euler_riemannproblem_quadrants_amr.jl 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2433      +/-   ##
==========================================
- Coverage   96.77%   96.56%   -0.20%     
==========================================
  Files         495      497       +2     
  Lines       41055    41214     +159     
==========================================
+ Hits        39727    39798      +71     
- Misses       1328     1416      +88     
Flag Coverage Δ
unittests 96.56% <55.38%> (-0.20%) ⬇️

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.

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.

Interesting proposal. I am looking forward to the discussion in our next meeting.


initial_condition = initial_condition_composite
# Note calling the constructor of the struct: `InitialConditionComposite()` instead of `initial_condition_composite` !
const initial_condition = InitialConditionComposite()
Copy link
Member

Choose a reason for hiding this comment

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

Does setting this to const conflict with including different elixirs in a single REPL session?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that will cause errors. I took inspiration from

const flux_lax_friedrichs = FluxLaxFriedrichs()

Copy link
Member

Choose a reason for hiding this comment

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

It is required there in our code but not here since we just pass the IC to the semidiscretization. So it should be fine without const here

Comment on lines +806 to +815
if i == 1
x_node = SVector(nextfloat(x_node[1]), x_node[2])
elseif i == nnodes(dg)
x_node = SVector(prevfloat(x_node[1]), x_node[2])
end
if j == 1
x_node = SVector(x_node[1], nextfloat(x_node[2]))
elseif j == nnodes(dg)
x_node = SVector(x_node[1], prevfloat(x_node[2]))
end
Copy link
Member

Choose a reason for hiding this comment

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

This assumes that the element lies in the coordinate direction, which may not be the case for unstructured and curved meshes in general, is it?

Copy link
Member Author

Choose a reason for hiding this comment

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

True, we would need to check the direction of the face.

Copy link
Member

Choose a reason for hiding this comment

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

As discussed in the meeting, it would also be fine to implement this only for the TreeMesh when a hard error is thrown for the other mesh types in 2D and 3D.

Comment on lines +852 to +856
if i == 1
x_node = SVector(nextfloat(x_node[1]), x_node[2], x_node[3])
elseif i == nnodes(dg)
x_node = SVector(prevfloat(x_node[1]), x_node[2], x_node[3])
end
Copy link
Member

Choose a reason for hiding this comment

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

Same here?

Comment on lines +838 to +844
# NOTE: This still assumes that the first node index somewhat resembles the first coordinate direction!
if x_node[1] < x_node_n[1]
x_node = SVector(nextfloat(x_node[1]), x_node[2])
else
x1_min_at_node1 = false
x_node = SVector(prevfloat(x_node[1]), x_node[2])
end
Copy link
Member Author

Choose a reason for hiding this comment

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

This is probably the most convenient way of dragging the nodes inwards. As mentioned in the comment, this is probably not really fail-safe if a mesh is supplied/constructed where the i index does not really expand the element in 1 direction but 2 direction. I would assume that this is possible depending on the exact order of node numbering in a supplied mesh file. @andrewwinters5000 is that right?

@@ -437,7 +437,7 @@ end
left_direction = right_direction - 1

for i in eachnode(dg)
if orientation == 1
if orientation == 1 # (x-direction)
Copy link
Member Author

Choose a reason for hiding this comment

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

See

# Interfaces in x-direction (`orientation` = 1)
calc_interface_flux!(elements.surface_flux_values,
elements.left_neighbors[1, element],
element, 1, u, mesh,
nonconservative_terms, equations,
surface_integral, dg, cache)
# Interfaces in y-direction (`orientation` = 2)

@@ -552,7 +552,7 @@ end
left_direction = right_direction - 1

for j in eachnode(dg), i in eachnode(dg)
if orientation == 1
if orientation == 1 # (x-direction)
Copy link
Member Author

Choose a reason for hiding this comment

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

see

# Interfaces in x-direction (`orientation` = 1)
calc_interface_flux!(elements.surface_flux_values,
elements.left_neighbors[1, element],
element, 1, u, mesh,
nonconservative_terms, equations,
surface_integral, dg, cache)
# Interfaces in y-direction (`orientation` = 2)
calc_interface_flux!(elements.surface_flux_values,
elements.left_neighbors[2, element],
element, 2, u, mesh,
nonconservative_terms, equations,
surface_integral, dg, cache)
# Interfaces in z-direction (`orientation` = 3)

@DanielDoehring
Copy link
Member Author

Plot of current implementation for 4 Quadrant Riemann problem

old_4Q_RP

Plot of new implementation for 4 Quadrant Riemann problem

new_4Q_RP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking consistency Make Michael happy discussion example Adding examples (elixirs) high-priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants