diff --git a/src/helium.jl b/src/helium.jl index c7c3a77..ecb388c 100644 --- a/src/helium.jl +++ b/src/helium.jl @@ -129,7 +129,7 @@ function anneal!(ρᵣ::AbstractMatrix{T}, Teq::DenseVector{T}, dt::Number, tste @turbo @. ρᵣ[i,1:i] = 1 / ((dm.C0 + dm.C1 * (log(dt + Teqᵢ) - dm.C2) / lᵢ)^(1/dm.beta) + 1) end - # Guenthner et al conversion volume-length conversion + # Guenthner et al volume-length conversion rmr0 = dm.rmr0 scale = 1/(1-rmr0) @fastmath @inbounds for j ∈ 1:ntsteps diff --git a/src/inversion.jl b/src/inversion.jl index c6a9683..5a349e8 100644 --- a/src/inversion.jl +++ b/src/inversion.jl @@ -217,7 +217,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -245,7 +245,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, npointsₚ, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, npointsₚ, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -578,7 +578,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax if pointsininterval(agepointsₚ, npointsₚ, detail.agemin, detail.agemax) >= enoughpoints break end @@ -608,7 +608,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, npointsₚ, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, npointsₚ, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -955,7 +955,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax if pointsininterval(agepointsₚ, npointsₚ, detail.agemin, detail.agemax) >= enoughpoints break end @@ -985,7 +985,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, npointsₚ, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, npointsₚ, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -1351,7 +1351,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -1379,7 +1379,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts @@ -1405,7 +1405,7 @@ linterp1s!(Tstepsₚ, knot_index, ages, temperatures, agesteps) # Retry unless we have satisfied the maximum reheating rate - if isdistinct(agepointsₚ, npointsₚ, k, 2dt) && maxdiff(Tstepsₚ) < dTmax + if isdistinct(agepointsₚ, npointsₚ, k, dt) && maxdiff(Tstepsₚ) < dTmax break end if attempt == nattempts diff --git a/src/utilities.jl b/src/utilities.jl index 00759af..4d4c31f 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -62,7 +62,7 @@ # Check if point k is distinct from other points in list within ± δ function isdistinct(points::DenseArray, npoints::Int, k::Int, δ::Number) @inbounds for i = 1:npoints - if i!=k && abs(points[i] - points[k]) < δ + if i!=k && abs(points[i] - points[k]) <= δ return false end end