Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide how to deal with shared functionality of the SWE #27

Open
patrickersing opened this issue Mar 8, 2024 · 0 comments
Open

Decide how to deal with shared functionality of the SWE #27

patrickersing opened this issue Mar 8, 2024 · 0 comments

Comments

@patrickersing
Copy link
Contributor

Since we still have the standard ShallowWaterEquations in Trixi.jl, the code for the ShallowWaterEquationsWetDry is currently distributed between Trixi.jl and TrixiShallowWater.jl and we make heavy use of wrapper functions to call existing functions from Trixi.jl, such as

@inline function Trixi.flux(u, orientation::Integer,
                            equations::ShallowWaterEquationsWetDry2D)
    Trixi.flux(u, orientation, equations.basic_swe)

At some places such as FluxHLL this made the resulting code very complex and we decided to duplicate some functions to makes the code easier to understand, see here.

Since many core functions of the SWE are dispatched to Trixi.jl, they are not directly visible to users and developers of TrixiShallowWater.jl and they will have to look at both packages to understand the code and make changes, which I guess introduces a significant barrier of entry, see also this discussion.

We should discuss how we want to deal with this.

A solution could be to just duplicate all the SWE functions within TrixiShallowWater.jl. This would make the code much easier to understand, but we would also need to maintain the functions in both packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant