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

Generalize function for `AnalysisSurfaceIntegral` #1902

Closed andrewwinters5000 closed 2 months ago

andrewwinters5000 commented 2 months ago

This adds the x coordinate and the time t as input arguments for the variable function that can be integrated along a physical boundary via AnalysisSurfaceIntegral. This will allow the callback to compute integrated quantities on boundaries that depend on the solution u as well as boundary data that may be space and/or time dependent. Currently, the variable function can only use the solution u to compute boundary quantities.

github-actions[bot] commented 2 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.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 96.30%. Comparing base (c6fc9c5) to head (d06320e). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1902 +/- ## ======================================= Coverage 96.30% 96.30% ======================================= Files 448 448 Lines 36079 36081 +2 ======================================= + Hits 34745 34747 +2 Misses 1334 1334 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1902/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/1902/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `96.30% <100.00%> (+<0.01%)` | :arrow_up: | 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.

andrewwinters5000 commented 2 months ago

Thanks Andrew for the additional comments, it is always helpful to have a second person expressing their understanding!

No problem! It is easy to lose track of the normal scaling and what is meant between normal_direction and a normal_vector. So, these extra comments hopefully avoid headaches in the future.