Closed JoshuaLampert closed 2 months ago
Another question, which just came into my mind: What do we do if you pass bathymetry_flat to the equation, but then set a non-constant bathymetry in the initial condition. I haven't thought about that before. Should this raise a warning or an error or nothing?
Where could we add such a check? My first idea was to look at create_cache, but that doesn't have the initial condition
It could live in Semidiscretization
, but then I would only add such a check when all equations have a field bathymetry
(or bathymetry_type
), i.e. after finishing #130.
Originally posted by @JoshuaLampert in https://github.com/JoshuaLampert/DispersiveShallowWater.jl/issues/135#issuecomment-2293798516
When all AbstractShallowWaterEquations1D
have a bathymetry_type
and have $\eta$, $v$ and $b$ as variables in the ODE, we can also make more functions dispatch on AbstractShallowWaterEquations1D
rather than on the different equations, e.g., varnames
, initial_condition_dingemans
, initial_condition_well_balancedness
, and all the conversion functions like prim2cons
, cons2prim
etc.
We could think of making bathymetry_variable
the default for all equations.
Closed by #147
In #127 we decided to define different types of bathymetries (flat, variable, mild slope) as structs, which are used to dispatch. In any case, we keep the bathymetry as variable in the equation to be able to possibly extend the package in the future to also deal with time-dependent bathymetries. This concept should also be used for the existing equations:
bathymetry_type
, flat bathymetry is still missing, see #148)