summaryrefslogtreecommitdiffhomepage
path: root/eigen/test/bicgstab.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-18 12:42:15 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-11-02 15:12:04 +0100
commit44861dcbfeee041223c4aac1ee075e92fa4daa01 (patch)
tree6dfdfd9637846a7aedd71ace97d7d2ad366496d7 /eigen/test/bicgstab.cpp
parentf3fe458b9e0a29a99a39d47d9a76dc18964b6fec (diff)
update
Diffstat (limited to 'eigen/test/bicgstab.cpp')
-rw-r--r--eigen/test/bicgstab.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/eigen/test/bicgstab.cpp b/eigen/test/bicgstab.cpp
new file mode 100644
index 0000000..f327e2f
--- /dev/null
+++ b/eigen/test/bicgstab.cpp
@@ -0,0 +1,30 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2011 Gael Guennebaud <g.gael@free.fr>
+//
+// 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 "sparse_solver.h"
+#include <Eigen/IterativeLinearSolvers>
+
+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>, IncompleteLUT<T> > bicgstab_colmajor_ilut;
+ //BiCGSTAB<SparseMatrix<T>, SSORPreconditioner<T> > bicgstab_colmajor_ssor;
+
+ 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_ilut) );
+ //CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_ssor) );
+}
+
+void test_bicgstab()
+{
+ CALL_SUBTEST_1(test_bicgstab_T<double>());
+ CALL_SUBTEST_2(test_bicgstab_T<std::complex<double> >());
+}