Skip to content

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

@patrickersing

Description

@patrickersing

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions