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

Ls enhancement #288

Merged
merged 2 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Method `solve!(x,ls,op::AffineOperator,cache::Nothing,newmatrix)`. Since PR [#288](https://github.com/gridap/Gridap.jl/pull/288).

### Fixed

- Bug related with `WriteVTK` version 1.7. Fixed via PR [#287](https://github.com/gridap/Gridap.jl/pull/287).
- Bug in outer constructor of Table{...} for input arrays of abstract type. Fixed via PR [#285](https://github.com/gridap/Gridap.jl/pull/285).

## [0.11.1] - 2020-6-19
Expand Down
5 changes: 5 additions & 0 deletions src/Algebra/LinearSolvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ function solve!(
cache
end

function solve!(
x::AbstractVector,ls::LinearSolver,op::AffineOperator,cache::Nothing,newmatrix::Bool)
solve!(x,ls,op)
end

# Concrete implementations

"""
Expand Down
24 changes: 24 additions & 0 deletions test/AlgebraTests/LinearSolversTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,28 @@ op = AffineOperator(A,2*b)
solve!(x1,nls,op,cache)
@test all(x1 .≈ 2*x0)

op = AffineOperator(A,b)
x0 = copy(x)
cache = solve!(x0,ls,op,nothing,true)
@test all(x .≈ x0)
cache = solve!(x0,ls,op,nothing)
@test all(x .≈ x0)
cache = solve!(x0,ls,op)
@test all(x .≈ x0)

x0 = copy(x)
cache = solve!(x0,ls,op,cache)
@test all(x .≈ x0)
cache = solve!(x0,ls,op,cache,false)
@test all(x .≈ x0)

op2 = AffineOperator(A,2*b)
x0 = copy(x)
cache = solve!(x0,ls,op2,cache)
@test all(2*x .≈ x0)
cache = solve!(x0,ls,op2,cache,false)
@test all(2*x .≈ x0)
cache = solve!(x0,ls,op2,nothing,false)
@test all(2*x .≈ x0)

end # module