Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The LinearSolve.jl interface #3

Closed
6 of 16 tasks
ChrisRackauckas opened this issue Jul 12, 2021 · 8 comments
Closed
6 of 16 tasks

The LinearSolve.jl interface #3

ChrisRackauckas opened this issue Jul 12, 2021 · 8 comments

Comments

@ChrisRackauckas
Copy link
Member

ChrisRackauckas commented Jul 12, 2021

  • LinearProblem(A,b,p=SciMLBase.NullParameters();u0=nothing,kwargs...) where kwargs forward to solve
  • ShiftedLinearProblem(A,b,gamma,p=SciMLBase.NullParameters();u0=nothing,kwargs...) = LinearProblem(WOperator,...)
  • solve(prob,alg;reltol, abstol, weights, prec)
  • cache = init(prob,alg; kwargs...) where solve = init -> solve!(cache)
  • Functions on cache:
    • set_A!(cache,A)
    • set_b!(cache,b)
    • set_p!(cache,p)
    • set_prec(cache,prec)
    • update_prec!(cache) = set_prec!(cache,cache.prec(cache)...)`
  • The cache should have fields A, cacheval, isfresh, pr, and pl
  • The factorization alg should just have the factorization function
  • IterativeSolversAlg should set the iterable to cacheval, factorization methods should store the factorized A there.
  • Preconditioner functions:
    • @set cache.prec = f(Val{:init}, cache) for initialization
    • preconditioner function is f(cache) -> (pl,pr) user-defined.

Linear.pdf

@YingboMa
Copy link
Member

Do we need ShiftedLinearProblem if there's LinearProblem(WOperator,...)?

@ChrisRackauckas
Copy link
Member Author

We can leave that for us to figure out. @EdelmanJonathan won't handle that part.

@ranocha
Copy link
Member

ranocha commented Oct 10, 2021

resize! would also be a great functionality for the cache, for example in the context of PDEs and adaptive mesh refinement.

@ChrisRackauckas
Copy link
Member Author

yes, good point.

@vpuri3
Copy link
Member

vpuri3 commented Nov 14, 2021

should LinearCache also have fields for present solution u, and iteration count iter (set to 0 for factorizations)?

@ChrisRackauckas
Copy link
Member Author

Yes

@vpuri3 vpuri3 mentioned this issue Nov 14, 2021
3 tasks
@vpuri3 vpuri3 mentioned this issue Nov 25, 2021
3 tasks
@vpuri3
Copy link
Member

vpuri3 commented Dec 8, 2021

what's weights in the third task: solve(prob,alg;reltol, abstol, weights, prec) ?

@ChrisRackauckas
Copy link
Member Author

Those are the weights supposed to be used in the scaled preconditioners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants