• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>
5 // Copyright (C) 2012 Giacomo Po <gpo@ucla.edu>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <cmath>
11 
12 #include "../../test/sparse_solver.h"
13 #include <Eigen/IterativeSolvers>
14 
test_minres_T()15 template<typename T> void test_minres_T()
16 {
17   MINRES<SparseMatrix<T>, Lower, DiagonalPreconditioner<T> > minres_colmajor_diag;
18   MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner    > minres_colmajor_I;
19 //  MINRES<SparseMatrix<T>, Lower, IncompleteLUT<T> >           minres_colmajor_ilut;
20   //minres<SparseMatrix<T>, SSORPreconditioner<T> >     minres_colmajor_ssor;
21 
22   CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_diag)  );
23   CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_I) );
24  // CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ilut)     );
25   //CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ssor)     );
26 }
27 
test_minres()28 void test_minres()
29 {
30   CALL_SUBTEST_1(test_minres_T<double>());
31 //  CALL_SUBTEST_2(test_minres_T<std::complex<double> >());
32 }
33