bicgstab.cpp File Reference
#include "sparse_solver.h"
#include <Eigen/IterativeLinearSolvers>

Functions

template<typename T , typename I_ >
void test_bicgstab_T ()
 
 EIGEN_DECLARE_TEST (bicgstab)
 

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( bicgstab  )
29  {
30  CALL_SUBTEST_1((test_bicgstab_T<double, int>()));
31  CALL_SUBTEST_2((test_bicgstab_T<std::complex<double>, int>()));
32  CALL_SUBTEST_3((test_bicgstab_T<double, long int>()));
33 }
void test_bicgstab_T()
Definition: bicgstab.cpp:14
#define CALL_SUBTEST_3(FUNC)
Definition: split_test_helper.h:16
#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, CALL_SUBTEST_3, and test_bicgstab_T().

◆ test_bicgstab_T()

template<typename T , typename I_ >
void test_bicgstab_T ( )
14  {
17  BiCGSTAB<SparseMatrix<T, 0, I_>, IncompleteLUT<T, I_> > bicgstab_colmajor_ilut;
18  // BiCGSTAB<SparseMatrix<T>, SSORPreconditioner<T> > bicgstab_colmajor_ssor;
19 
20  bicgstab_colmajor_diag.setTolerance(NumTraits<T>::epsilon() * 4);
21  bicgstab_colmajor_ilut.setTolerance(NumTraits<T>::epsilon() * 4);
22 
23  CALL_SUBTEST(check_sparse_square_solving(bicgstab_colmajor_diag));
24  // CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_I) );
25  CALL_SUBTEST(check_sparse_square_solving(bicgstab_colmajor_ilut));
26  // CALL_SUBTEST( check_sparse_square_solving(bicgstab_colmajor_ssor) );
27 }
A bi conjugate gradient stabilized solver for sparse square problems.
Definition: BiCGSTAB.h:153
A preconditioner based on the digonal entries.
Definition: BasicPreconditioners.h:39
A naive preconditioner which approximates any matrix as the identity matrix.
Definition: BasicPreconditioners.h:181
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().