-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Now that we have different preconditioning mechanisms and solvers, it's time to polish the generic solve interface
- Extend CommonSolve.jl #42
- At the moment the solution using Oettli-Präger has its stand alone solver
oettliI guess that should also be a solver like the others #41 - implement generic interface with different methods that decide the preconditioning based on the matrix type and the algorithms, e.g. #42
function _default_precondition(A, method::AbstractSolver)
# ....
end
# specific default preconditioning methods
function _default_precondition(A, method::GaussElimination)
if is_sdd_matrix || is_M_matrix
return NoPrecondition()
else
return InverseMidpoint()
end
end
function _default_solver()
GaussEliminiation()
end
function solve(A, b,
solver::AbstractSolver=_default_solver(),
precondition::AbstractPrecondition=_default_precondition(A, method))
# precondition
Ap, bp = precondition(A, b)
# compute solution
return solver(Ap, bp)
endmforets
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request