-
Notifications
You must be signed in to change notification settings - Fork 8
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
Refactor SchurComplementW for ClimaTimesteppers #1364
Conversation
bors try |
tryBuild succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
bors r+ |
1364: Refactor SchurComplementW for ClimaTimesteppers r=charleskawczynski a=charleskawczynski This PR is a peel off from #1358. This PR adds `temp1` and `temp2` to `SchurComplementW`, and defines ```julia linsolve!(::Type{Val{:init}}, f, u0; kwargs...) = _linsolve! _linsolve!(x, A, b, update_matrix = false; kwargs...) = LinearAlgebra.ldiv!(x, A, b) # Function required by Krylov.jl (x and b can be AbstractVectors) # See JuliaSmoothOptimizers/Krylov.jl#605 for a # related issue that requires the same workaround. function LinearAlgebra.ldiv!(x, A::SchurComplementW, b) A.temp1 .= b LinearAlgebra.ldiv!(A.temp2, A, A.temp1) x .= A.temp2 end ``` and the original `_linsolve` contents are in ```julia function LinearAlgebra.ldiv!( x::Fields.FieldVector, A::SchurComplementW, b::Fields.FieldVector, ) ``` (the pattern used in ClimaAtmos). It also renames `_linsolve!` to `test_linsolve!` to avoid a name collision in the test suite. It's a much smaller PR than it appears, due to indenting. Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
Build failed: |
bors r+ |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This PR is a peel off from #1358.
This PR adds
temp1
andtemp2
toSchurComplementW
, and definesand the original
_linsolve
contents are in(the pattern used in ClimaAtmos). It also renames
_linsolve!
totest_linsolve!
to avoid a name collision in the test suite.It's a much smaller PR than it appears, due to indenting.