add a basic ILU preconditioner

This commit is contained in:
Gael Guennebaud
2011-10-11 20:41:43 +02:00
parent a5761d6dd7
commit 3fce43a704
3 changed files with 128 additions and 1 deletions

View File

@@ -29,15 +29,17 @@ template<typename T> void test_bicgstab_T()
{
BiCGSTAB<SparseMatrix<T>, DiagonalPreconditioner<T> > bicgstab_colmajor_diag;
BiCGSTAB<SparseMatrix<T>, IdentityPreconditioner > bicgstab_colmajor_I;
BiCGSTAB<SparseMatrix<T>, IncompleteLU<T> > bicgstab_colmajor_ilu;
CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_diag) );
CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_I) );
CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_ilu) );
}
void test_bicgstab()
{
for(int i = 0; i < g_repeat; i++) {
CALL_SUBTEST_1(test_bicgstab_T<double>());
CALL_SUBTEST_2(test_bicgstab_T<std::complex<double> >());
//CALL_SUBTEST_2(test_bicgstab_T<std::complex<double> >());
}
}