gtsam
3rdparty
Eigen
unsupported
test
gmres.cpp
Go to the documentation of this file.
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 Kolja Brix <brix@igpm.rwth-aaachen.de>
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
11
#include "../../test/sparse_solver.h"
12
#include <Eigen/IterativeSolvers>
13
14
template
<
typename
T>
void
test_gmres_T
()
15
{
16
GMRES<SparseMatrix<T>
,
DiagonalPreconditioner<T>
> gmres_colmajor_diag;
17
GMRES<SparseMatrix<T>
,
IdentityPreconditioner
> gmres_colmajor_I;
18
GMRES<SparseMatrix<T>
,
IncompleteLUT<T>
> gmres_colmajor_ilut;
19
//GMRES<SparseMatrix<T>, SSORPreconditioner<T> > gmres_colmajor_ssor;
20
21
CALL_SUBTEST
(
check_sparse_square_solving
(gmres_colmajor_diag) );
22
// CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_I) );
23
CALL_SUBTEST
(
check_sparse_square_solving
(gmres_colmajor_ilut) );
24
//CALL_SUBTEST( check_sparse_square_solving(gmres_colmajor_ssor) );
25
}
26
27
EIGEN_DECLARE_TEST
(
gmres
)
28
{
29
CALL_SUBTEST_1
(test_gmres_T<double>());
30
CALL_SUBTEST_2
(
test_gmres_T
<std::complex<double> >());
31
}
Eigen::DiagonalPreconditioner
A preconditioner based on the digonal entries.
Definition:
BasicPreconditioners.h:36
EIGEN_DECLARE_TEST
EIGEN_DECLARE_TEST(gmres)
Definition:
gmres.cpp:27
CALL_SUBTEST_1
#define CALL_SUBTEST_1(FUNC)
Definition:
split_test_helper.h:4
test_gmres_T
void test_gmres_T()
Definition:
gmres.cpp:14
Eigen::IncompleteLUT
Incomplete LU factorization with dual-threshold strategy.
Definition:
IncompleteLUT.h:99
CALL_SUBTEST
#define CALL_SUBTEST(FUNC)
Definition:
main.h:399
Eigen::GMRES
A GMRES solver for sparse square problems.
Definition:
GMRES.h:221
Eigen::IdentityPreconditioner
A naive preconditioner which approximates any matrix as the identity matrix.
Definition:
BasicPreconditioners.h:200
CALL_SUBTEST_2
#define CALL_SUBTEST_2(FUNC)
Definition:
split_test_helper.h:10
check_sparse_square_solving
void check_sparse_square_solving(Solver &solver, int maxSize=300, int maxRealWorldSize=100000, bool checkDeficient=false)
Definition:
sparse_solver.h:534
Eigen::internal::gmres
bool gmres(const MatrixType &mat, const Rhs &rhs, Dest &x, const Preconditioner &precond, Index &iters, const Index &restart, typename Dest::RealScalar &tol_error)
Definition:
GMRES.h:56
gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:18