Conversation
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2761 +/- ##
==========================================
+ Coverage 97.04% 97.06% +0.02%
==========================================
Files 574 573 -1
Lines 44765 44823 +58
==========================================
+ Hits 43439 43505 +66
+ Misses 1326 1318 -8
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:
|
|
The CI errors are really weird, but they seem to appear consistently on the CI runner. I cannot reproduce locally. |
|
Ah, it's also failing in other PRs, see #2754 and #2733. The last successful CI run was 6 hours ago (9:17 AM UTC+1). It seems like the error happens first in performance_specializations here: Edit: I looked at the diff of the used package versions between the last successful and the first failing CI run. Only SciMLBase.jl updated from v2.134.0 to v2.135.0 and DifferentiationInterface.jl updated from v0.7.14 to v0.7.15. Given that the error happens in examples/tree_2d_dgsem/elixir_euler_ec.jl:47, which is Trixi.jl/examples/tree_2d_dgsem/elixir_euler_ec.jl Lines 44 to 47 in 880e251 Edit2: No, it's not SciMLBase.jl. It's also failing with the old version. |
ranocha
left a comment
There was a problem hiding this comment.
Thank you very much for tackling this long-standing issue!
In the very end, everything ends up being type-stable using tuples also for the unstructured BCs:
Trixi.jl/src/solvers/dgsem_unstructured/sort_boundary_conditions.jl
Lines 27 to 44 in 880e251
Thus, I strongly prefer using NamedTuples - and only them, no Dicts - to keep type stability in the whole computation. Or do I miss a good reason for using Dicts?
We also need to remember to add a NEWS.md entry when the design has been finalized.
|
I agree that consistently using
|
|
Great, thanks!
Yes - if we keep working with |
This is something we might discuss in the next Trixi.jl meeting as well. I have observed that it can be a source of annoying-to-debug errors, that everything is periodic by default. Maybe it's time to change this and require passing |
I discussed with @jlchan that switching to |
Thanks for adding that @JoshuaLampert! |
|
This PR is finished from my point of view, @ranocha. It left it in draft mode so that it does not get accidentally merged. |
|
Please see also the comment #2761 (comment) above |
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* no default boundary conditions * format * some fixes * more fixes * format * more fixes * fix docs * fix parabolic * remove comma * error if wrong boundary conditions supplied * set periodicity to false by default * format * fix some periodicity of meshes * format * add periodicity = true in elixirs and more tests * add docstring fir TreeMesh constructor * periodicity = true for StructuredMesh * fix some unit tests * fix more unit tests * unit test fixes * fix error type for Julia <v1.12 * fix some tests * fix bug that periodicity not saved to file for StructuredMesh * fix comments * fixes * add NEWS entry * add tests for partially periodic meshes * also test StructuredMesh * add another NEWS entry * allow not passing periodic boundary conditions in NamedTuple for periodic parts of tree and structured mesh * test an elixir without specifying periodic boundary conditions in periodic direction * disallow passing boundary conditions as tuple * remove boundary_condition_default * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com> * docstring for SemidiscretizationHyperbolicParabolic * format * format * fix typo in NEWS * boundary_condition_periodic instead of BoundaryConditionPeriodc() * improve error handling for passing boundary conditions as Tuples and add tests * remove both_ again * resolve method ambiguities * resolve more ambiguities * return UnstructuredSortedBoundaryTypes * fix test if UnstructuredSortedBoundaryTypes directly passed as boundary_conditions (e.g., by remake) keep this boundary condition --------- Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
* allow Dict and NamedTuple as boundary conditions * unify handling of periodic boundary conditions * add tests for T8codeMesh and UnstructuredMesh2D * test actual boundary conditions * move new test file to unit tests * format * enforce SciMLBase.jl v2.134.0 * revert restriction on SciMLBase.jl * also test other dimensions for coverage * coverage * always use NamedTuples instead of Dicts * use same syntax to for DGMulti to create NamedTuples * fix * fix more * format * fixed another one * fix one more * consistently use semicolon for NamedTuples * Add NEWS entry * fix structured * use NamedTuple also in UnstructuredSortedBoundaryTypes * fixes * remove periodic bcs by default * simplify default boundary conditions * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * use NamedTuple for is_on_boundary * add some semicolons for consistency * Apply suggestion from @ranocha Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * Apply suggestion from @ranocha Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> * improve type stability of UnstructuredSortedBoundaryTypes * fix order of type parameters * Update src/solvers/dgsem_unstructured/sort_boundary_conditions.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * No default boundary conditions (trixi-framework#2770) * no default boundary conditions * format * some fixes * more fixes * format * more fixes * fix docs * fix parabolic * remove comma * error if wrong boundary conditions supplied * set periodicity to false by default * format * fix some periodicity of meshes * format * add periodicity = true in elixirs and more tests * add docstring fir TreeMesh constructor * periodicity = true for StructuredMesh * fix some unit tests * fix more unit tests * unit test fixes * fix error type for Julia <v1.12 * fix some tests * fix bug that periodicity not saved to file for StructuredMesh * fix comments * fixes * add NEWS entry * add tests for partially periodic meshes * also test StructuredMesh * add another NEWS entry * allow not passing periodic boundary conditions in NamedTuple for periodic parts of tree and structured mesh * test an elixir without specifying periodic boundary conditions in periodic direction * disallow passing boundary conditions as tuple * remove boundary_condition_default * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com> * docstring for SemidiscretizationHyperbolicParabolic * format * format * fix typo in NEWS * boundary_condition_periodic instead of BoundaryConditionPeriodc() * improve error handling for passing boundary conditions as Tuples and add tests * remove both_ again * resolve method ambiguities * resolve more ambiguities * return UnstructuredSortedBoundaryTypes * fix test if UnstructuredSortedBoundaryTypes directly passed as boundary_conditions (e.g., by remake) keep this boundary condition --------- Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com> --------- Co-authored-by: Hendrik Ranocha <ranocha@users.noreply.github.com> Co-authored-by: Hendrik Ranocha <mail@ranocha.de> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com>
I would like to tackle #1510 to make it more attractive to create a new breaking release rather sooner than later, such that #2753 can be merged soon.
This PR allows to pass the boundary conditions as Dict or as NamedTuple and allows to not pass periodic boundary conditions to make it the default. For the first part I'm not sure if this is what we want or if we would prefer to allow only one of the possibilities – Dict or NamedTuple.
I used the help of Claude to generate this PR.
Closes #1510.