309309
310310function SciMLBase. solve (prob:: StaticLinearProblem ,
311311 alg:: Nothing , args... ; kwargs... )
312- if alg === nothing || alg isa DirectLdiv!
313- u = prob. A \ prob. b
314- elseif alg isa LUFactorization
315- u = lu (prob. A) \ prob. b
316- elseif alg isa QRFactorization
317- u = qr (prob. A) \ prob. b
318- elseif alg isa CholeskyFactorization
319- u = cholesky (prob. A) \ prob. b
320- elseif alg isa NormalCholeskyFactorization
321- u = cholesky (Symmetric (prob. A' * prob. A)) \ (prob. A' * prob. b)
322- elseif alg isa SVDFactorization
323- u = svd (prob. A) \ prob. b
324- else
325- # Slower Path but handles all cases
326- cache = init (prob, alg, args... ; kwargs... )
327- return solve! (cache)
328- end
329- return SciMLBase. build_linear_solution (alg, u, nothing , prob)
312+ u = prob. A \ prob. b
313+ return SciMLBase. build_linear_solution (alg, u, nothing , prob; retcode = ReturnCode. Success)
330314end
331315
332316function SciMLBase. solve (prob:: StaticLinearProblem ,
@@ -348,5 +332,5 @@ function SciMLBase.solve(prob::StaticLinearProblem,
348332 cache = init (prob, alg, args... ; kwargs... )
349333 return solve! (cache)
350334 end
351- return SciMLBase. build_linear_solution (alg, u, nothing , prob)
335+ return SciMLBase. build_linear_solution (alg, u, nothing , prob; retcode = ReturnCode . Success )
352336end
0 commit comments