aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_solver.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-02-13 10:03:53 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-02-13 10:03:53 +0100
commitfe513199808654bfa5080fe16bda7dcdafbd57c6 (patch)
tree71c207f44df25ebd76d19531e65cb6e22efd5c89 /test/sparse_solver.h
parente8cdbedefb1913b5a0e2f2b7d38470f081cb8d29 (diff)
parent0918c51e600bed36a53448fa276b01387119a3c2 (diff)
Merge Index-refactoring branch with default, fix PastixSupport, remove some useless typedefs
Diffstat (limited to 'test/sparse_solver.h')
-rw-r--r--test/sparse_solver.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/sparse_solver.h b/test/sparse_solver.h
index afda26b93..42b365eaa 100644
--- a/test/sparse_solver.h
+++ b/test/sparse_solver.h
@@ -32,7 +32,7 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
x = solver.solve(b);
if (solver.info() != Success)
{
- std::cerr << "sparse solver testing: solving failed\n";
+ std::cerr << "sparse solver testing: solving failed (" << typeid(Solver).name() << ")\n";
return;
}
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
@@ -75,7 +75,8 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
xm = solver.solve(bm);
if (solver.info() != Success)
{
- std::cerr << "sparse solver testing: solving failed\n";
+ std::cerr << "sparse solver testing: solving with a Map failed\n";
+ exit(0);
return;
}
VERIFY(oldb.isApprox(bm) && "sparse solver testing: the rhs should not be modified!");
@@ -194,7 +195,10 @@ int generate_sparse_spd_problem(Solver& , typename Solver::MatrixType& A, typena
dA = dM * dM.adjoint();
halfA.resize(size,size);
- halfA.template selfadjointView<Solver::UpLo>().rankUpdate(M);
+ if(Solver::UpLo==(Lower|Upper))
+ halfA = A;
+ else
+ halfA.template selfadjointView<Solver::UpLo>().rankUpdate(M);
return size;
}