Skip to content

Commit

Permalink
Merge be73e8f into 1bb2a3a
Browse files Browse the repository at this point in the history
  • Loading branch information
vpuri3 committed Apr 18, 2022
2 parents 1bb2a3a + be73e8f commit 7313c17
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ struct LinearCache{TA,Tb,Tu,Tp,Talg,Tc,Tl,Tr,Ttol}
isfresh::Bool # false => cacheval is set wrt A, true => update cacheval wrt A
Pl::Tl # preconditioners
Pr::Tr
solve_adjoint::Bool # solve adjoint problem
abstol::Ttol
reltol::Ttol
maxiters::Int
Expand Down Expand Up @@ -77,6 +78,7 @@ default_tol(::Type{Any}) = 0

function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorithm,Nothing}, args...;
alias_A = false, alias_b = false,
solve_adjoint = false,
abstol=default_tol(eltype(prob.A)),
reltol=default_tol(eltype(prob.A)),
maxiters=length(prob.b),
Expand All @@ -94,6 +96,11 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
fill!(u0,false)
end

# TODO
if solve_adjoint === true
A = A'
end

cacheval = init_cacheval(alg, A, b, u0, Pl, Pr, maxiters, abstol, reltol, verbose)
isfresh = true
Tc = typeof(cacheval)
Expand Down Expand Up @@ -121,6 +128,7 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
isfresh,
Pl,
Pr,
solve_adjoint,
abstol,
reltol,
maxiters,
Expand Down

0 comments on commit 7313c17

Please sign in to comment.