Skip to content

Commit

Permalink
works with IterativeSolvers v0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
hofmannmartin committed Feb 19, 2021
1 parent d9e99a5 commit 3065d65
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SparsityOperators = "a5ff1dd3-4e0a-50db-9022-6d011c1d5846"
VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

[compat]
IterativeSolvers = "0.8"
IterativeSolvers = "0.9"
ProgressMeter = "1.2"
SparsityOperators = "0.1.7, 0.2"
VectorizationBase = "0.19"
Expand All @@ -24,4 +24,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Random"]
test = ["Test", "Random"]
4 changes: 2 additions & 2 deletions src/ADMM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ creates an `ADMM` object for the system matrix `A`.
* (`iterationsInner::Int64=10`) - max number of internal CG iterations
* (`absTol::Float64=eps()`) - abs tolerance for stopping criterion
* (`relTol::Float64=eps()`) - rel tolerance for stopping criterion
* (`tolInner::Float64=1.e-5`) - tolerance for CG stopping criterion
* (`tolInner::Float64=1.e-5`) - rel tolerance for CG stopping criterion
"""
function ADMM(A::matT, x::vecT=zeros(eltype(A),size(A,2)); reg=nothing, regName=["L1"]
, λ=[0.0]
Expand Down Expand Up @@ -218,7 +218,7 @@ function iterate(solver::ADMM{matT,opT,T,preconT}, iteration::Int=0) where {matT
solver.β[:] .+= solver.ρ[i]*(solver.z[i].-solver.u[i])
end
cg!(solver.x, solver.op, solver.β, Pl=solver.precon
, maxiter=solver.iterationsInner, tol=solver.tolInner, statevars=solver.cgStateVars)
, maxiter=solver.iterationsInner, reltol=solver.tolInner, statevars=solver.cgStateVars)

# 2. update z using the proximal map of 1/ρ*g(x)
for i=1:length(solver.reg)
Expand Down
4 changes: 2 additions & 2 deletions src/SplitBregman.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ The Split Bregman Method for l1 Regularized Problems
* (`iterationsCG::Int64=10`) - maximum number of CG iterations
* (`absTol::Float64=eps()`) - absolute tolerance for stopping criterion
* (`relTol::Float64=eps()`) - relative tolerance for stopping criterion
* (`tolInner::Float64=1.e-3`) - tolerance for CG
* (`tolInner::Float64=1.e-3`) - relative tolerance for CG
* (`solverInfo = nothing`) - `solverInfo` object used to store convergence metrics
"""
function iterate(solver::SplitBregman{matT,vecT,opT,rvecT,preconT}, iteration::Int=1) where {matT,vecT,opT,rvecT,preconT}
Expand All @@ -248,7 +248,7 @@ function iterate(solver::SplitBregman{matT,vecT,opT,rvecT,preconT}, iteration::I
for i=1:length(solver.reg)
solver.β[:] .+= solver.ρ[i]*(solver.v[i].-solver.b[i])
end
cg!(solver.u,solver.op,solver.β,Pl=solver.precon,maxiter=solver.iterationsCG,tol=solver.tolInner)
cg!(solver.u,solver.op,solver.β,Pl=solver.precon,maxiter=solver.iterationsCG,reltol=solver.tolInner)

# proximal map for regularization terms
for i=1:length(solver.reg)
Expand Down

0 comments on commit 3065d65

Please sign in to comment.