You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

  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. #include "../../test/sparse_solver.h"
  12. #include <Eigen/IterativeSolvers>
  13. template<typename T> void test_minres_T()
  14. {
  15. MINRES<SparseMatrix<T>, Lower, DiagonalPreconditioner<T> > minres_colmajor_diag;
  16. MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner > minres_colmajor_I;
  17. // MINRES<SparseMatrix<T>, Lower, IncompleteLUT<T> > minres_colmajor_ilut;
  18. //minres<SparseMatrix<T>, SSORPreconditioner<T> > minres_colmajor_ssor;
  19. CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_diag) );
  20. CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_I) );
  21. // CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ilut) );
  22. //CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ssor) );
  23. }
  24. void test_minres()
  25. {
  26. CALL_SUBTEST_1(test_minres_T<double>());
  27. // CALL_SUBTEST_2(test_minres_T<std::complex<double> >());
  28. }