aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/minres.cpp
diff options
context:
space:
mode:
authorGravatar dnuentsa <desire.nuentsa_wakam@inria.fr>2012-10-09 13:07:09 +0200
committerGravatar dnuentsa <desire.nuentsa_wakam@inria.fr>2012-10-09 13:07:09 +0200
commitf75703400174d7a019037cb6803b8f4ce3f3eeb0 (patch)
treeb54a565fcbc0c2b40b550faaade7dd2c01f40be9 /unsupported/test/minres.cpp
parentfe78c86b4a746e631b65048ac951a9144e08b8d7 (diff)
parentbf81276dadc4dc15b3dfae947aca6f39420e325e (diff)
MINRES solver
Diffstat (limited to 'unsupported/test/minres.cpp')
-rw-r--r--unsupported/test/minres.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/unsupported/test/minres.cpp b/unsupported/test/minres.cpp
new file mode 100644
index 000000000..eb187d445
--- /dev/null
+++ b/unsupported/test/minres.cpp
@@ -0,0 +1,33 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>
+// Copyright (C) 2012 Giacomo Po <gpo@ucla.edu>
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#include "../../test/sparse_solver.h"
+#include <Eigen/IterativeSolvers>
+
+template<typename T> void test_minres_T()
+{
+// MINRES<SparseMatrix<T>, Lower, DiagonalPreconditioner<T> > minres_colmajor_diag;
+ MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner > minres_colmajor_I;
+// MINRES<SparseMatrix<T>, Lower, IncompleteLUT<T> > minres_colmajor_ilut;
+ //minres<SparseMatrix<T>, SSORPreconditioner<T> > minres_colmajor_ssor;
+
+// CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_diag) );
+ CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_I) );
+ // CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ilut) );
+ //CALL_SUBTEST( check_sparse_square_solving(minres_colmajor_ssor) );
+}
+
+void test_minres()
+{
+ for(int i = 0; i < g_repeat; i++) {
+ CALL_SUBTEST_1(test_minres_T<double>());
+ // CALL_SUBTEST_2(test_minres_T<std::complex<double> >());
+ }
+}