Allows Lower|Upper as a template argument of CG and MINRES: in this case the full matrix will be considered.

This commit is contained in:
Gael Guennebaud
2015-02-10 18:57:41 +01:00
parent d10d6a40dd
commit c6e8caf090
5 changed files with 23 additions and 8 deletions

View File

@@ -12,13 +12,15 @@
template<typename T> void test_conjugate_gradient_T()
{
ConjugateGradient<SparseMatrix<T>, Lower> cg_colmajor_lower_diag;
ConjugateGradient<SparseMatrix<T>, Upper> cg_colmajor_upper_diag;
ConjugateGradient<SparseMatrix<T>, Lower > cg_colmajor_lower_diag;
ConjugateGradient<SparseMatrix<T>, Upper > cg_colmajor_upper_diag;
ConjugateGradient<SparseMatrix<T>, Lower|Upper> cg_colmajor_loup_diag;
ConjugateGradient<SparseMatrix<T>, Lower, IdentityPreconditioner> cg_colmajor_lower_I;
ConjugateGradient<SparseMatrix<T>, Upper, IdentityPreconditioner> cg_colmajor_upper_I;
CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_lower_diag) );
CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_upper_diag) );
CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_loup_diag) );
CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_lower_I) );
CALL_SUBTEST( check_sparse_spd_solving(cg_colmajor_upper_I) );
}