cholmod_support.cpp File Reference
#include "sparse_solver.h"
#include <Eigen/CholmodSupport>

Macros

#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS
 

Functions

template<typename SparseType >
void test_cholmod_ST ()
 
template<typename T , int flags, typename IdxType >
void test_cholmod_T ()
 
 EIGEN_DECLARE_TEST (cholmod_support)
 

Macro Definition Documentation

◆ EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS

#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( cholmod_support  )
71  {
72  CALL_SUBTEST_11((test_cholmod_T<double, ColMajor, int>()));
73  CALL_SUBTEST_12((test_cholmod_T<double, ColMajor, long>()));
74  CALL_SUBTEST_13((test_cholmod_T<double, RowMajor, int>()));
75  CALL_SUBTEST_14((test_cholmod_T<double, RowMajor, long>()));
76  CALL_SUBTEST_21((test_cholmod_T<std::complex<double>, ColMajor, int>()));
77  CALL_SUBTEST_22((test_cholmod_T<std::complex<double>, ColMajor, long>()));
78  // TODO complex row-major matrices do not work at the moment:
79  // CALL_SUBTEST_23( (test_cholmod_T<std::complex<double>, RowMajor, int >()) );
80  // CALL_SUBTEST_24( (test_cholmod_T<std::complex<double>, RowMajor, long>()) );
81 }
void test_cholmod_T()
Definition: cholmod_support.cpp:67
@ ColMajor
Definition: Constants.h:318
#define CALL_SUBTEST_21(FUNC)
Definition: split_test_helper.h:124
#define CALL_SUBTEST_13(FUNC)
Definition: split_test_helper.h:76
#define CALL_SUBTEST_14(FUNC)
Definition: split_test_helper.h:82
#define CALL_SUBTEST_11(FUNC)
Definition: split_test_helper.h:64
#define CALL_SUBTEST_12(FUNC)
Definition: split_test_helper.h:70
#define CALL_SUBTEST_22(FUNC)
Definition: split_test_helper.h:130

References CALL_SUBTEST_11, CALL_SUBTEST_12, CALL_SUBTEST_13, CALL_SUBTEST_14, CALL_SUBTEST_21, CALL_SUBTEST_22, Eigen::ColMajor, and test_cholmod_T().

◆ test_cholmod_ST()

template<typename SparseType >
void test_cholmod_ST ( )
16  {
17  CholmodDecomposition<SparseType, Lower> g_chol_colmajor_lower;
18  g_chol_colmajor_lower.setMode(CholmodSupernodalLLt);
19  CholmodDecomposition<SparseType, Upper> g_chol_colmajor_upper;
20  g_chol_colmajor_upper.setMode(CholmodSupernodalLLt);
21  CholmodDecomposition<SparseType, Lower> g_llt_colmajor_lower;
22  g_llt_colmajor_lower.setMode(CholmodSimplicialLLt);
23  CholmodDecomposition<SparseType, Upper> g_llt_colmajor_upper;
24  g_llt_colmajor_upper.setMode(CholmodSimplicialLLt);
25  CholmodDecomposition<SparseType, Lower> g_ldlt_colmajor_lower;
26  g_ldlt_colmajor_lower.setMode(CholmodLDLt);
27  CholmodDecomposition<SparseType, Upper> g_ldlt_colmajor_upper;
28  g_ldlt_colmajor_upper.setMode(CholmodLDLt);
29 
30  CholmodSupernodalLLT<SparseType, Lower> chol_colmajor_lower;
31  CholmodSupernodalLLT<SparseType, Upper> chol_colmajor_upper;
32  CholmodSimplicialLLT<SparseType, Lower> llt_colmajor_lower;
33  CholmodSimplicialLLT<SparseType, Upper> llt_colmajor_upper;
34  CholmodSimplicialLDLT<SparseType, Lower> ldlt_colmajor_lower;
35  CholmodSimplicialLDLT<SparseType, Upper> ldlt_colmajor_upper;
36 
37  check_sparse_spd_solving(g_chol_colmajor_lower);
38  check_sparse_spd_solving(g_chol_colmajor_upper);
39  check_sparse_spd_solving(g_llt_colmajor_lower);
40  check_sparse_spd_solving(g_llt_colmajor_upper);
41  check_sparse_spd_solving(g_ldlt_colmajor_lower);
42  check_sparse_spd_solving(g_ldlt_colmajor_upper);
43 
44  check_sparse_spd_solving(chol_colmajor_lower);
45  check_sparse_spd_solving(chol_colmajor_upper);
46  check_sparse_spd_solving(llt_colmajor_lower);
47  check_sparse_spd_solving(llt_colmajor_upper);
48  check_sparse_spd_solving(ldlt_colmajor_lower);
49  check_sparse_spd_solving(ldlt_colmajor_upper);
50 
51  check_sparse_spd_determinant(chol_colmajor_lower);
52  check_sparse_spd_determinant(chol_colmajor_upper);
53  check_sparse_spd_determinant(llt_colmajor_lower);
54  check_sparse_spd_determinant(llt_colmajor_upper);
55  check_sparse_spd_determinant(ldlt_colmajor_lower);
56  check_sparse_spd_determinant(ldlt_colmajor_upper);
57 
58  check_sparse_zero_matrix(chol_colmajor_lower);
59  check_sparse_zero_matrix(chol_colmajor_upper);
60  check_sparse_zero_matrix(llt_colmajor_lower);
61  check_sparse_zero_matrix(llt_colmajor_upper);
62  check_sparse_zero_matrix(ldlt_colmajor_lower);
63  check_sparse_zero_matrix(ldlt_colmajor_upper);
64 }
A general Cholesky factorization and solver based on Cholmod.
Definition: CholmodSupport.h:689
void setMode(CholmodMode mode)
Definition: CholmodSupport.h:705
A simplicial direct Cholesky (LDLT) factorization and solver based on Cholmod.
Definition: CholmodSupport.h:551
A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod.
Definition: CholmodSupport.h:492
A supernodal Cholesky (LLT) factorization and solver based on Cholmod.
Definition: CholmodSupport.h:624
@ CholmodSimplicialLLt
Definition: CholmodSupport.h:237
@ CholmodLDLt
Definition: CholmodSupport.h:237
@ CholmodSupernodalLLt
Definition: CholmodSupport.h:237
void check_sparse_zero_matrix(Solver &solver)
Definition: sparse_solver.h:578
void check_sparse_spd_determinant(Solver &solver)
Definition: sparse_solver.h:471
void check_sparse_spd_solving(Solver &solver, int maxSize=(std::min)(300, EIGEN_TEST_MAX_SIZE), int maxRealWorldSize=100000)
Definition: sparse_solver.h:392

References check_sparse_spd_determinant(), check_sparse_spd_solving(), check_sparse_zero_matrix(), Eigen::CholmodLDLt, Eigen::CholmodSimplicialLLt, Eigen::CholmodSupernodalLLt, and Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::setMode().

◆ test_cholmod_T()

template<typename T , int flags, typename IdxType >
void test_cholmod_T ( )
67  {
68  test_cholmod_ST<SparseMatrix<T, flags, IdxType> >();
69 }

Referenced by EIGEN_DECLARE_TEST().