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

Include different types of bathymetries #130

Closed
2 tasks done
JoshuaLampert opened this issue Aug 12, 2024 · 4 comments
Closed
2 tasks done

Include different types of bathymetries #130

JoshuaLampert opened this issue Aug 12, 2024 · 4 comments

Comments

@JoshuaLampert
Copy link
Owner

JoshuaLampert commented Aug 12, 2024

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:

@ranocha
Copy link
Collaborator

ranocha commented Aug 16, 2024

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 #135 (comment)

@JoshuaLampert
Copy link
Owner Author

JoshuaLampert commented Aug 16, 2024

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.

@JoshuaLampert
Copy link
Owner Author

We could think of making bathymetry_variable the default for all equations.

@ranocha
Copy link
Collaborator

ranocha commented Aug 30, 2024

Closed by #147

@ranocha ranocha closed this as completed Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants