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

Support SciMLOperators in LinearSolve #270

Merged
merged 26 commits into from
Feb 5, 2023

Conversation

vpuri3
Copy link
Member

@vpuri3 vpuri3 commented Feb 4, 2023

Plan: SciML/SciMLOperators.jl#142

Merge these first:
SciML/SciMLBase.jl#377
#269

The changes in the PR are as follows:

  1. Replaced AbstractDiffEqOperator with AbstractSciMLOperators.
  2. Created DirectLdiv! <: AbstractLinearSolveAlgorithm so that types that have a ldiv! defined may skip a second factorization step and simply use their ldiv!. Example, when A isa Factorization, or a BiDiagonal, or a SciMLOperator with has_ldiv!(A) == true.
  3. removed InvPreconditioner, as it is no longer needed: fill out residual in output stats JuliaSmoothOptimizers/Krylov.jl#612 (comment).
  4. Haven't removed ComposePreconditioner as it is used in OrdinaryDiffEq
  5. Replaced IterativeSolvers.I with SciMLOperators.IdentityOperator{N}() as identity matrix placeholder. wrote static method _isidentity_struct for checking.
  6. wrote TODO's for future changes WRT plan, some OperatorAssumptions notes.
  7. wrote tests for these changes

@ChrisRackauckas
Copy link
Member

This looks good, I like the direct ldiv! route. Just needs some clean up and upstream merges first.

@codecov
Copy link

codecov bot commented Feb 5, 2023

Codecov Report

Merging #270 (c763a17) into main (af09c4e) will increase coverage by 32.57%.
The diff coverage is 69.23%.

@@             Coverage Diff             @@
##             main     #270       +/-   ##
===========================================
+ Coverage   38.51%   71.09%   +32.57%     
===========================================
  Files          13       14        +1     
  Lines         810      858       +48     
===========================================
+ Hits          312      610      +298     
+ Misses        498      248      -250     
Impacted Files Coverage Δ
ext/LinearSolveHYPRE.jl 92.59% <ø> (+92.59%) ⬆️
lib/LinearSolveCUDA/src/LinearSolveCUDA.jl 0.00% <0.00%> (ø)
src/default.jl 54.21% <55.55%> (+17.85%) ⬆️
src/iterative_wrappers.jl 77.31% <75.00%> (+23.43%) ⬆️
src/LinearSolve.jl 96.55% <83.33%> (+21.55%) ⬆️
src/common.jl 89.83% <100.00%> (+5.34%) ⬆️
src/solve_function.jl 100.00% <100.00%> (ø)
src/HYPRE.jl 100.00% <0.00%> (ø)
lib/LinearSolvePardiso/src/LinearSolvePardiso.jl 75.00% <0.00%> (+2.08%) ⬆️
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vpuri3
Copy link
Member Author

vpuri3 commented Feb 5, 2023

gotta put InvPreconditioner back. It is used in NonlinearSolve.

test/basictests.jl Outdated Show resolved Hide resolved
src/common.jl Outdated Show resolved Hide resolved
@vpuri3
Copy link
Member Author

vpuri3 commented Feb 5, 2023

rerunning CI. some tests were cancelled.

@vpuri3 vpuri3 closed this Feb 5, 2023
@vpuri3 vpuri3 reopened this Feb 5, 2023
@@ -4,7 +4,7 @@ using HYPRE.LibHYPRE: HYPRE_Complex
using HYPRE: HYPRE, HYPREMatrix, HYPRESolver, HYPREVector
using IterativeSolvers: Identity
using LinearSolve: HYPREAlgorithm, LinearCache, LinearProblem, LinearSolve,
OperatorAssumptions, default_tol, init_cacheval, issquare, set_cacheval
OperatorAssumptions, default_tol, init_cacheval, __issquare, set_cacheval
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to be careful with this release.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. good we have CI test for 1.9

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests passing with lts, release, beta locally.

@ChrisRackauckas ChrisRackauckas merged commit 155e0ec into SciML:main Feb 5, 2023
@vpuri3 vpuri3 deleted the scimloperators branch February 6, 2023 00:29
vpuri3 added a commit to vpuri3/SciMLBase.jl that referenced this pull request Feb 6, 2023
reexport scimlops now that `issquare` name conflict is fixed in SciML/LinearSolve.jl#270
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

Successfully merging this pull request may close these issues.

2 participants