|
|
|
@ -112,7 +112,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Iterative |
|
|
|
var z = matrix.Multiply(x); |
|
|
|
|
|
|
|
// Check that the solution converged
|
|
|
|
Assert.IsTrue(monitor.HasConverged, "#04"); |
|
|
|
Assert.IsTrue(monitor.Status == IterationStatus.Converged, "#04"); |
|
|
|
|
|
|
|
// Now compare the vectors
|
|
|
|
for (var i = 0; i < y.Count; i++) |
|
|
|
@ -157,7 +157,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Iterative |
|
|
|
var z = matrix.Multiply(x); |
|
|
|
|
|
|
|
// Check that the solution converged
|
|
|
|
Assert.IsTrue(monitor.HasConverged, "#04"); |
|
|
|
Assert.IsTrue(monitor.Status == IterationStatus.Converged, "#04"); |
|
|
|
|
|
|
|
// Now compare the vectors
|
|
|
|
for (var i = 0; i < y.Count; i++) |
|
|
|
@ -235,7 +235,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Iterative |
|
|
|
var z = matrix.Multiply(x); |
|
|
|
|
|
|
|
// Check that the solution converged
|
|
|
|
Assert.IsTrue(monitor.HasConverged, "#04"); |
|
|
|
Assert.IsTrue(monitor.Status == IterationStatus.Converged, "#04"); |
|
|
|
|
|
|
|
// Now compare the vectors
|
|
|
|
for (var i = 0; i < y.Count; i++) |
|
|
|
@ -266,7 +266,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Iterative |
|
|
|
var solver = new BiCgStab(); |
|
|
|
var resultx = solver.Solve(matrixA, vectorb, monitor); |
|
|
|
|
|
|
|
if (!monitor.HasConverged) |
|
|
|
if (!(monitor.Status == IterationStatus.Converged)) |
|
|
|
{ |
|
|
|
// Solution was not found, try again downgrading convergence boundary
|
|
|
|
continue; |
|
|
|
@ -307,7 +307,7 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests.Single.Solvers.Iterative |
|
|
|
var solver = new BiCgStab(); |
|
|
|
var matrixX = solver.Solve(matrixA, matrixB, monitor); |
|
|
|
|
|
|
|
if (!monitor.HasConverged) |
|
|
|
if (!(monitor.Status == IterationStatus.Converged)) |
|
|
|
{ |
|
|
|
// Solution was not found, try again downgrading convergence boundary
|
|
|
|
continue; |
|
|
|
|