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

Clamp Melt Fraction #218

Merged
merged 3 commits into from
Sep 12, 2024
Merged

Clamp Melt Fraction #218

merged 3 commits into from
Sep 12, 2024

Conversation

aelligp
Copy link
Collaborator

@aelligp aelligp commented Sep 12, 2024

This PR clamps the melt fraction functions to values between 0.0 and 1.0. On the CPU there are some Float64 rounding errors that lead to complex numbers when calculating e.g. LinearMeltViscosities

before:

julia> extrema(ϕ)
(0.0, 1.0000000000000004)

Clamping prohibits that ϕ exceeds 1.0, see e.g.:

compute_meltfraction_ratio(args::Vararg{Any, N}) where N = 
clamp(compute_param_times_frac(compute_meltfraction, args...), 0e0, 1e0)

Also some fixes in the docs and adds the icon (CC @boriskaus)

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/MeltFraction/MeltingParameterization.jl 80.00% 4 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

@albert-de-montserrat albert-de-montserrat merged commit e65b54f into main Sep 12, 2024
16 of 19 checks passed
@aelligp aelligp deleted the pa-clamp branch September 13, 2024 10:10
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

Successfully merging this pull request may close these issues.

2 participants