Skip to content

Commit

Permalink
Double precision speeds up convergence
Browse files Browse the repository at this point in the history
  • Loading branch information
axla-io committed Sep 19, 2023
1 parent 957a4ab commit 6c30879
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/dfsane.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ struct DFSane{T, F} <: AbstractNonlinearSolveAlgorithm
max_inner_iterations::Int
end

function DFSane(; σₘᵢₙ = 1.0f-10,
σₘₐₓ = 1.0f+10,
σ₁ = 1.0f0,
function DFSane(; σₘᵢₙ = 1e-10,
σₘₐₓ = 1e+10,
σ₁ = 1.0,
M = 10,
γ = 1.0f-4,
τₘᵢₙ = 0.1f0,
τₘₐₓ = 0.5f0,
γ = 1e-4,
τₘᵢₙ = 0.1,
τₘₐₓ = 0.5,
nₑₓₚ = 2,
ηₛ = (f₍ₙₒᵣₘ₎₁, n, xₙ, fₙ) -> f₍ₙₒᵣₘ₎₁ / n^2,
max_inner_iterations = 1000)
Expand Down Expand Up @@ -194,6 +194,7 @@ function perform_step!(cache::DFSaneCache{true})
α₋ = sum(cache.uₙ₋₁)
cache.σₙ = α₊ / α₋


# Spectral parameter bounds check
if abs(cache.σₙ) > σₘₐₓ || abs(cache.σₙ) < σₘᵢₙ
test_norm = sqrt(sum(abs2, cache.fuₙ₋₁))
Expand Down

0 comments on commit 6c30879

Please sign in to comment.