Clang-format tests, examples, libraries, benchmarks, etc.

This commit is contained in:
Antonio Sánchez
2023-12-05 21:22:55 +00:00
committed by Rasmus Munk Larsen
parent 3252ecc7a4
commit 46e9cdb7fe
876 changed files with 33453 additions and 37795 deletions

View File

@@ -12,33 +12,30 @@
#include "../../test/sparse_solver.h"
#include <Eigen/IterativeSolvers>
template<typename T> void test_minres_T()
{
template <typename T>
void test_minres_T() {
// Identity preconditioner
MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner > minres_colmajor_lower_I;
MINRES<SparseMatrix<T>, Upper, IdentityPreconditioner > minres_colmajor_upper_I;
MINRES<SparseMatrix<T>, Lower, IdentityPreconditioner> minres_colmajor_lower_I;
MINRES<SparseMatrix<T>, Upper, IdentityPreconditioner> minres_colmajor_upper_I;
// Diagonal preconditioner
MINRES<SparseMatrix<T>, Lower, DiagonalPreconditioner<T> > minres_colmajor_lower_diag;
MINRES<SparseMatrix<T>, Upper, DiagonalPreconditioner<T> > minres_colmajor_upper_diag;
MINRES<SparseMatrix<T>, Lower|Upper, DiagonalPreconditioner<T> > minres_colmajor_uplo_diag;
MINRES<SparseMatrix<T>, Lower | Upper, DiagonalPreconditioner<T> > minres_colmajor_uplo_diag;
// call tests for SPD matrix
CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_lower_I) );
CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_upper_I) );
CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_lower_diag) );
CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_upper_diag) );
CALL_SUBTEST( check_sparse_spd_solving(minres_colmajor_uplo_diag) );
CALL_SUBTEST(check_sparse_spd_solving(minres_colmajor_lower_I));
CALL_SUBTEST(check_sparse_spd_solving(minres_colmajor_upper_I));
CALL_SUBTEST(check_sparse_spd_solving(minres_colmajor_lower_diag));
CALL_SUBTEST(check_sparse_spd_solving(minres_colmajor_upper_diag));
CALL_SUBTEST(check_sparse_spd_solving(minres_colmajor_uplo_diag));
// TO DO: symmetric semi-definite matrix
// TO DO: symmetric indefinite matrix
}
EIGEN_DECLARE_TEST(minres)
{
EIGEN_DECLARE_TEST(minres) {
CALL_SUBTEST_1(test_minres_T<double>());
// CALL_SUBTEST_2(test_minres_T<std::compex<double> >());
// CALL_SUBTEST_2(test_minres_T<std::compex<double> >());
}