Skip to content

Commit

Permalink
refining qme sol (NAWM failed on schur)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thore Kockerols authored and Thore Kockerols committed Oct 29, 2024
1 parent aa96824 commit 23db725
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions src/algorithms/quadratic_matrix_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,28 @@ function solve_quadratic_matrix_equation(A::AbstractMatrix{R},

if verbose println("Quadratic matrix equation solver: $quadratic_matrix_equation_solver - converged: $solved in $iterations iterations to tolerance: $reached_tol") end

if !solved && quadratic_matrix_equation_solver :schur # try schur if previous one didn't solve it
sol, solved, iterations, reached_tol = solve_quadratic_matrix_equation(A, B, C,
Val(:schur),
T;
initial_guess = initial_guess,
tol = tol,
timer = timer,
verbose = verbose)

if verbose println("Quadratic matrix equation solver: schur - converged: $solved in $iterations iterations to tolerance: $reached_tol") end
if !solved
if quadratic_matrix_equation_solver :schur # try schur if previous one didn't solve it
sol, solved, iterations, reached_tol = solve_quadratic_matrix_equation(A, B, C,
Val(:schur),
T;
initial_guess = initial_guess,
tol = tol,
timer = timer,
verbose = verbose)

if verbose println("Quadratic matrix equation solver: schur - converged: $solved in $iterations iterations to tolerance: $reached_tol") end
else quadratic_matrix_equation_solver :doubling
sol, solved, iterations, reached_tol = solve_quadratic_matrix_equation(A, B, C,
Val(:doubling),
T;
initial_guess = initial_guess,
tol = tol,
timer = timer,
verbose = verbose)

if verbose println("Quadratic matrix equation solver: doubling - converged: $solved in $iterations iterations to tolerance: $reached_tol") end
end
end

return sol, solved
Expand Down

0 comments on commit 23db725

Please sign in to comment.