-
Notifications
You must be signed in to change notification settings - Fork 10
Decide how to deal with shared functionality of the SWE #27
Description
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.