---
title: convergenceTest
framework: accelerate
role: symbol
role_heading: Instance Property
path: accelerate/sparselsmroptions/convergencetest
---

# convergenceTest

The convergence test to use for iterative solve methods.

## Declaration

```swift
var convergenceTest: SparseLSMRConvergenceTest_t
```

## Discussion

Discussion For SparseLSMRCTDefault, iterations stop when: ‖ Aᵀ(b-Ax) ‖₂ < rtol * ‖ Aᵀ(b-Ax_₀) ‖₂ + atol For SparseLSMRCTFongSaunders, iterations stop when any of the following occur: ‖ b-Ax ‖₂ < btol * ‖ b ‖₂ + atol * ‖ A ‖₂ ‖ x ‖₂    (‖A‖₂ is an estimate) ‖ Aᵀ (b-Ax) ‖₂ < atol * ‖ A ‖₂ * ‖ A-bx ‖₂             (‖A‖₂ is an estimate) Estimated condition of matrix >= conditionLimit

## See Also

### Inspecting LSMR Options

- [atol](accelerate/sparselsmroptions/atol.md)
- [btol](accelerate/sparselsmroptions/btol.md)
- [conditionLimit](accelerate/sparselsmroptions/conditionlimit.md)
- [SparseLSMRConvergenceTest_t](accelerate/sparselsmrconvergencetest_t.md)
- [lambda](accelerate/sparselsmroptions/lambda.md)
- [maxIterations](accelerate/sparselsmroptions/maxiterations.md)
- [nvec](accelerate/sparselsmroptions/nvec.md)
- [reportError](accelerate/sparselsmroptions/reporterror.md)
- [reportStatus](accelerate/sparselsmroptions/reportstatus.md)
- [rtol](accelerate/sparselsmroptions/rtol.md)
