Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

generic solve interface #38

Copy link
Copy link
@lucaferranti

Description

@lucaferranti
Issue body actions

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 oettli I 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)
end
mforets

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.