aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/bicgstab.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-03-09 13:55:20 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-03-09 13:55:20 +0100
commit224a1fe4c6991c863986d8c8bd3d41af5aa4ff80 (patch)
treebd780db7a218e994d5c064966615788e6bbd0e11 /test/bicgstab.cpp
parentcf9940e17b5799c35b6a05764bec166d07906b6f (diff)
bug #963: make IncompleteLUT compatible with non-default storage index types.
Diffstat (limited to 'test/bicgstab.cpp')
-rw-r--r--test/bicgstab.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/bicgstab.cpp b/test/bicgstab.cpp
index f327e2fac..6d76389ce 100644
--- a/test/bicgstab.cpp
+++ b/test/bicgstab.cpp
@@ -10,11 +10,11 @@
#include "sparse_solver.h"
#include <Eigen/IterativeLinearSolvers>
-template<typename T> void test_bicgstab_T()
+template<typename T, typename I> void test_bicgstab_T()
{
- BiCGSTAB<SparseMatrix<T>, DiagonalPreconditioner<T> > bicgstab_colmajor_diag;
- BiCGSTAB<SparseMatrix<T>, IdentityPreconditioner > bicgstab_colmajor_I;
- BiCGSTAB<SparseMatrix<T>, IncompleteLUT<T> > bicgstab_colmajor_ilut;
+ BiCGSTAB<SparseMatrix<T,0,I>, DiagonalPreconditioner<T> > bicgstab_colmajor_diag;
+ BiCGSTAB<SparseMatrix<T,0,I>, IdentityPreconditioner > bicgstab_colmajor_I;
+ BiCGSTAB<SparseMatrix<T,0,I>, IncompleteLUT<T,I> > bicgstab_colmajor_ilut;
//BiCGSTAB<SparseMatrix<T>, SSORPreconditioner<T> > bicgstab_colmajor_ssor;
CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_diag) );
@@ -25,6 +25,7 @@ template<typename T> void test_bicgstab_T()
void test_bicgstab()
{
- CALL_SUBTEST_1(test_bicgstab_T<double>());
- CALL_SUBTEST_2(test_bicgstab_T<std::complex<double> >());
+ CALL_SUBTEST_1((test_bicgstab_T<double,int>()) );
+ CALL_SUBTEST_1((test_bicgstab_T<double,long int>()));
+ CALL_SUBTEST_2((test_bicgstab_T<std::complex<double>, int>()));
}