trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
505 stars 98 forks source link

Add warning about polynomial degree 0 #1863

Closed benegee closed 4 months ago

benegee commented 4 months ago

I was misled by a comment in basis_lobatto_legendre.jl, thinking polydeg = 0 would be an exceptional but valid setting. It however only works with TreeMesh. See https://github.com/trixi-framework/Trixi.jl/pull/1489

So I extended the comment.

Would there be an easy way to catch such a setting early and warn users?

github-actions[bot] commented 4 months ago

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

Code quality

Documentation

Testing

Performance

Verification

Created with :heart: by the Trixi.jl community.

benegee commented 4 months ago

Would we want to have such checks? What is our policy in regard to user assistance?

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.30%. Comparing base (4bf61a0) to head (607c70a). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1863 +/- ## ========================================== - Coverage 96.30% 96.30% -0.00% ========================================== Files 438 438 Lines 35577 35603 +26 ========================================== + Hits 34259 34284 +25 - Misses 1318 1319 +1 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1863/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1863/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `96.30% <ø> (-<0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ranocha commented 4 months ago

Would we want to have such checks? What is our policy in regard to user assistance?

I would be fine having such a check. Right now, we just check that the dimensions fit

https://github.com/trixi-framework/Trixi.jl/blob/b11bc10d8ac68798ae2e53f9db3d5c4f824af5fa/src/semidiscretization/semidiscretization_hyperbolic.jl#L44

What about the other core devs, e.g., @trixi-framework/principal-developers?

sloede commented 4 months ago

Intuitively, I am not a big fan. One would have to add mesh-specific checks to the semidiscretization, which I don't think is good practice regarding modularity and extensibility.

ranocha commented 4 months ago

Good point.