Skip to content

WIP: Sc/p4est view coupled hanging nodes#2598

Draft
SimonCan wants to merge 124 commits into
sc/p4est-view-coupled-enhancedfrom
sc/p4est-view-coupled-hanging-nodes
Draft

WIP: Sc/p4est view coupled hanging nodes#2598
SimonCan wants to merge 124 commits into
sc/p4est-view-coupled-enhancedfrom
sc/p4est-view-coupled-hanging-nodes

Conversation

@SimonCan
Copy link
Copy Markdown
Contributor

@SimonCan SimonCan commented Oct 9, 2025

Added capability of coupling pest mesh views with hanging/non-conforming nodes.

Convergence test for examples/p4est_2d_dgsem/elixir_advection_coupled.jl:

####################################################################################################
l2
scalar (semi 1)     scalar (semi 2)     
error     EOC       error     EOC       
1.33e-04  -         1.33e-04  -         
7.82e-06  4.09      7.82e-06  4.09      
4.93e-07  3.99      4.93e-07  3.99      

mean      4.04      mean      4.04      
----------------------------------------------------------------------------------------------------
linf
scalar (semi 1)     scalar (semi 2)     
error     EOC       error     EOC       
9.61e-04  -         9.61e-04  -         
6.31e-05  3.93      6.31e-05  3.93      
4.09e-06  3.95      4.09e-06  3.95      

mean      3.94      mean      3.94      
----------------------------------------------------------------------------------------------------
(Dict(:l2 => [4.090696282565419 4.090696282565263; 3.9854659838820132 3.985465983898814], :linf => [3.9270697255568128 3.927069726249952; 3.947878553740121 3.9478785702678123]), Dict{Symbol, LinearAlgebra.Transpose{Float64, Matrix{Float64}}}(:l2 => [0.00013318279010717573 0.00013318279010712838; 7.816742843172999e-6 7.816742843171064e-6; 4.934930228156311e-7 4.934930228097621e-7], :linf => [0.0009605782290112996 0.0009605782290100784; 6.314906968718503e-5 6.314906965676492e-5; 4.092013831336061e-6 4.092013782486248e-6]))

This PR has had significant contributions by the LLM Claude.

@SimonCan SimonCan added enhancement New feature or request low-priority labels Oct 9, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 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 Oct 16, 2025

Codecov Report

❌ Patch coverage is 23.28358% with 514 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (sc/p4est-view-coupled-enhanced@cdd1181). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/solvers/dgsem_p4est/dg_2d_coupled.jl 0.00% 257 Missing ⚠️
src/meshes/p4est_mesh_view.jl 0.00% 140 Missing ⚠️
src/solvers/dgsem_p4est/containers_coupled.jl 0.00% 44 Missing ⚠️
...discretization/semidiscretization_coupled_p4est.jl 0.00% 43 Missing ⚠️
...dgsem/elixir_advection_coupled_with_amr_mortars.jl 0.00% 20 Missing ⚠️
src/solvers/dgsem_p4est/dg.jl 0.00% 4 Missing ⚠️
src/solvers/dgsem/basis_lobatto_legendre.jl 91.67% 2 Missing ⚠️
src/solvers/dgsem_p4est/dg_2d.jl 0.00% 2 Missing ⚠️
src/solvers/dgsem_p4est/dg_3d_parallel.jl 0.00% 1 Missing ⚠️
src/solvers/dgsem_tree/subcell_finite_volume_O2.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##             sc/p4est-view-coupled-enhanced    #2598   +/-   ##
=================================================================
  Coverage                                  ?   91.87%           
=================================================================
  Files                                     ?      570           
  Lines                                     ?    44734           
  Branches                                  ?        0           
=================================================================
  Hits                                      ?    41095           
  Misses                                    ?     3639           
  Partials                                  ?        0           
Flag Coverage Δ
unittests 91.87% <23.28%> (?)

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.

SimonCan and others added 22 commits October 17, 2025 09:42
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@SimonCan SimonCan changed the base branch from main to sc/p4est-view-coupled-enhanced February 9, 2026 17:18
SimonCan and others added 29 commits May 6, 2026 12:37
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Use coordinate-based cell ID selection so the ring/center split works at
any initial_refinement_level, and add mesh_equations_solver_cache and
analyze_convergence dispatches for SemidiscretizationCoupledP4est so
that convergence_test produces a proper EOC table.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
equations, dg::DGSEM, cache,
args...; normalize = true) where {Func}
return integrate_via_indices(func, trixi_backend(u), u, mesh, equations, dg, cache,
return integrate_via_indices(func, trixi_backend(_u), _u, mesh, equations, dg, cache,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
return integrate_via_indices(func, trixi_backend(_u), _u, mesh, equations, dg, cache,
return integrate_via_indices(func, trixi_backend(_u), _u, mesh, equations, dg,
cache,

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

Labels

enhancement New feature or request low-priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants