Skip to content

Commit

Permalink
Merge pull request #692 from gridap/fix_typo_LinearSolvers
Browse files Browse the repository at this point in the history
Fixed typo in LinearSolvers.jl
  • Loading branch information
santiagobadia authored Oct 25, 2021
2 parents 2015bd1 + 1faacc4 commit 390380a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Algebra/LinearSolvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function solve!(x::AbstractVector,
ns = cache.ns
residual!(b, op, x)
numerical_setup!(ns,A)
ruml!(b,-1)
rmul!(b,-1)
solve!(x,ns,b)
cache
end
Expand Down
11 changes: 11 additions & 0 deletions test/AlgebraTests/LinearSolversTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module LinearSolversTests

using Test
using Gridap.Algebra
using Gridap.Algebra: NonlinearOperatorMock

using LinearAlgebra
using SparseArrays
Expand Down Expand Up @@ -80,4 +81,14 @@ cache = solve!(x0,ls,op2,cache,false)
cache = solve!(x0,ls,op2,nothing,false)
@test all(2*x .≈ x0)

nlop = NonlinearOperatorMock()
x = [1.0, 3.0]
b = [0.0,0.0]
A = [-1.0 0.0; 0.0 1.0]
test_nonlinear_operator(nlop,x,b,jac=A)
x0 = copy(x)
nl_cache = solve!(x0,ls,nlop,nothing)
nl_cache = solve!(x0,ls,nlop,nl_cache)


end # module

0 comments on commit 390380a

Please sign in to comment.