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

Provide default thresholds for Float32 #41

Open
patrickersing opened this issue Apr 22, 2024 · 0 comments
Open

Provide default thresholds for Float32 #41

patrickersing opened this issue Apr 22, 2024 · 0 comments

Comments

@patrickersing
Copy link
Contributor

PR #38 introduces two new thresholds threshold_desingularization and threshold_partially_wet.
Default values for these thresholds are currently provided by a fixed value. As we do not have experience with other number formats, the default values are only available for Float64 (see #38 (comment)).

For other number formats thresholds can be set manually through the equation struct, e.g.
equations = ShallowWaterMultiLayerEquations1D(gravity_constant=9.812f0, rhos=1f0, threshold_limiter=5eps(), threshold_desingularization=1f-6, threshold_partially_wet=1f-4)

However, we should also test and introduce good default values for Float32. The default value threshold_partially_wet=1e-4 can probably also be used in single precision, but threshold_desingularization=1e-10 needs to be adjusted.

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