bicgstabl.cpp File Reference
#include "../../test/sparse_solver.h"
#include <Eigen/IterativeSolvers>

Functions

template<typename T >
void test_bicgstabl_T ()
 
 EIGEN_DECLARE_TEST (bicgstabl)
 

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( bicgstabl  )
27  {
28  CALL_SUBTEST_1(test_bicgstabl_T<double>());
29  CALL_SUBTEST_2(test_bicgstabl_T<std::complex<double> >());
30 }
void test_bicgstabl_T()
Definition: bicgstabl.cpp:15
#define CALL_SUBTEST_1(FUNC)
Definition: split_test_helper.h:4
#define CALL_SUBTEST_2(FUNC)
Definition: split_test_helper.h:10

References CALL_SUBTEST_1, CALL_SUBTEST_2, and test_bicgstabl_T().

◆ test_bicgstabl_T()

template<typename T >
void test_bicgstabl_T ( )
15  {
16  BiCGSTABL<SparseMatrix<T>, DiagonalPreconditioner<T> > bicgstabl_colmajor_diag;
17  BiCGSTABL<SparseMatrix<T>, IncompleteLUT<T> > bicgstabl_colmajor_ilut;
18 
19  // This does not change the tolerance of the test, only the tolerance of the solver.
20  bicgstabl_colmajor_diag.setTolerance(NumTraits<T>::epsilon() * 20);
21  bicgstabl_colmajor_ilut.setTolerance(NumTraits<T>::epsilon() * 20);
22 
23  CALL_SUBTEST(check_sparse_square_solving(bicgstabl_colmajor_diag));
24  CALL_SUBTEST(check_sparse_square_solving(bicgstabl_colmajor_ilut));
25 }
Definition: BiCGSTABL.h:282
A preconditioner based on the digonal entries.
Definition: BasicPreconditioners.h:39
Incomplete LU factorization with dual-threshold strategy.
Definition: IncompleteLUT.h:102
Derived & setTolerance(const RealScalar &tolerance)
Definition: IterativeSolverBase.h:236
#define CALL_SUBTEST(FUNC)
Definition: main.h:382
void check_sparse_square_solving(Solver &solver, int maxSize=300, int maxRealWorldSize=100000, bool checkDeficient=false)
Definition: sparse_solver.h:613
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217

References CALL_SUBTEST, check_sparse_square_solving(), and Eigen::IterativeSolverBase< Derived >::setTolerance().

Referenced by EIGEN_DECLARE_TEST().