Add parabolic RHS support for StructuredMesh{2}#2862
Open
Conversation
Extend the 2D parabolic solver (Navier-Stokes / BR1 viscous formulation)
to work with StructuredMesh{2} by:
- Adding StructuredMesh{2} to Union types in shared functions
(create_cache_parabolic, transform_variables!, calc_viscous_fluxes!,
calc_volume_integral!, calc_volume_integral_gradient!,
apply_jacobian_parabolic!) in the tree/p4est parabolic files
- Adding a new src/solvers/dgsem_structured/dg_2d_parabolic.jl with
StructuredMesh{2}-specific implementations: prolong2interfaces!,
calc_interface_flux!, prolong2boundaries!, calc_boundary_flux!,
and rhs_parabolic!
- Including dg_2d_parabolic.jl from dg.jl
- Adding a convergence test elixir on a curved periodic mesh
(examples/structured_2d_dgsem/elixir_navierstokes_convergence.jl)
and a corresponding test in test/test_parabolic_2d.jl
The convergence test confirms order-4 convergence (polydeg=3) on the
wavy mapping from elixir_euler_free_stream.jl.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Review checklistThis 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
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Switch solver to default flux_lax_friedrichs and update test reference values obtained with --check-bounds=yes to match the CI test environment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…esh) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2862 +/- ##
==========================================
+ Coverage 97.04% 97.06% +0.01%
==========================================
Files 605 608 +3
Lines 47329 47695 +366
==========================================
+ Hits 45930 46292 +362
- Misses 1399 1403 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Non-Claude comments
The oscillations disappear under mesh refinement. Different numbers of elements in
xandyworks as well.Summary
StructuredMesh{2}by adding it toUniontype signatures in shared functions (create_cache_parabolic,transform_variables!,calc_viscous_fluxes!,calc_volume_integral!,calc_volume_integral_gradient!,apply_jacobian_parabolic!)src/solvers/dgsem_structured/dg_2d_parabolic.jlwithStructuredMesh{2}-specific implementations:prolong2interfaces!,calc_interface_flux!,prolong2boundaries!,calc_boundary_flux!, and the top-levelrhs_parabolic!examples/structured_2d_dgsem/elixir_navierstokes_convergence.jlon a curved periodic mesh (wavy mapping fromelixir_euler_free_stream.jl) confirming order-4 L2 convergence (polydeg=3)test/test_parabolic_2d.jlConvergence results (polydeg=3, cells_per_dimension doubled from 4×4 → 8×8 → 16×16)
rhorho_v1rho_v2rho_e_totalTest plan
🤖 Generated with Claude Code