Class template GeneralizedEigenSolverTest

Inherits from ::testing::Test.

template<class MatrixImp, class F, class C, class R>
class GeneralizedEigenSolverTest<MatrixImp, F, C, R> : public ::testing::Test

No documentation provided.

Method GeneralizedEigenSolverTest::make_unit_matrix

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::make_unit_matrix()

(Re-)creates unit_matrix_ with the size of matrix_ and, unless the derived test provided one, uses it as the right hand side of the generalized eigenvalue problem.

Deriving tests that set rhs_matrix_ (and rhs_matrix_is_given_) in their constructor solve a genuine generalized problem lhsv = lambdarhs*v; all others fall back to rhs = Id, which reduces to the standard problem.

Method GeneralizedEigenSolverTest::make_matrix

template<class MatrixImp, class F, class C, class R>
static MatrixType GeneralizedEigenSolverTest<MatrixImp, F, C, R>::make_matrix(const int rows, const int cols)

Creates a rows x cols matrix filled with zeros, in the same way the fixture creates broken_matrix_.

Method GeneralizedEigenSolverTest::exports_correct_types

template<class MatrixImp, class F, class C, class R>
static void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::exports_correct_types()

No documentation provided.

Method GeneralizedEigenSolverTest::has_types_and_options

template<class MatrixImp, class F, class C, class R>
static void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::has_types_and_options()

No documentation provided.

Method GeneralizedEigenSolverTest::throws_on_broken_matrix_construction

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_broken_matrix_construction()

No documentation provided.

Method GeneralizedEigenSolverTest::throws_on_broken_rhs_matrix_construction

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_broken_rhs_matrix_construction()

The counterpart of throws_on_broken_matrix_construction() for the right hand side matrix.

Method GeneralizedEigenSolverTest::allows_broken_matrix_construction_when_checks_disabled

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::allows_broken_matrix_construction_when_checks_disabled()

No documentation provided.

Method GeneralizedEigenSolverTest::allows_broken_matrix_construction_when_all_checks_disabled

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::allows_broken_matrix_construction_when_all_checks_disabled()

‘disable_checks’ skips pre_checks()/post_checks() as a whole, not just the inf/nan check.

Method GeneralizedEigenSolverTest::throws_on_missing_type_in_options

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_missing_type_in_options()

Covers the ‘Missing type in given options’ branch of GeneralizedEigenSolverBase::pre_checks().

Method GeneralizedEigenSolverTest::throws_on_unknown_type

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_unknown_type()

Covers internal::ensure_generalized_eigen_solver_type() on all three ways an unknown type can enter: via the options factory, via the type-string ctor and via an already assembled configuration.

Method GeneralizedEigenSolverTest::throws_on_unknown_type_when_checks_are_disabled

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_unknown_type_when_checks_are_disabled()

With the checks disabled an unknown type reaches compute(), where it must not be silently ignored.

This is the only way to reach the final else branch of GeneralizedEigenSolver < …, true>::compute(), which pre_checks() otherwise guarantees to be unreachable.

Method GeneralizedEigenSolverTest::throws_on_non_positive_real_tolerance

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_non_positive_real_tolerance()

Covers the ‘non-positive tolerance’ branch of GeneralizedEigenSolverBase::pre_checks().

Method GeneralizedEigenSolverTest::throws_on_matrices_of_wrong_size

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_matrices_of_wrong_size()

Covers the three size checks in GeneralizedEigenSolverBase::check_size().

Only meaningful for matrix types of dynamic size; for statically sized ones (FieldMatrix) a non-square or mismatched pair cannot even be formed, so there is nothing to check.

Method GeneralizedEigenSolverTest::throws_on_inconsistent_given_options

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_inconsistent_given_options()

No documentation provided.

Method GeneralizedEigenSolverTest::is_constructible

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::is_constructible()

No documentation provided.

Method GeneralizedEigenSolverTest::is_constructible_from_options_pointer

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::is_constructible_from_options_pointer()

Covers the third GeneralizedEigenSolverBase ctor, which keeps a pointer to externally owned options.

That ctor exists for hot loops (see dune/gdt/operators/reconstruction/internal.hh, which keeps a static Configuration around); unlike the by-value ctor it writes the missing defaults back into the caller’s options.

Method GeneralizedEigenSolverTest::exposes_the_given_matrices

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::exposes_the_given_matrices()

Covers the lhs_matrix()/rhs_matrix() accessors of GeneralizedEigenSolverBase.

Method GeneralizedEigenSolverTest::find_ev

template<class MatrixImp, class F, class C, class R>
static bool GeneralizedEigenSolverTest<MatrixImp, F, C, R>::find_ev(const int &expected_evs, const int &actual_ev, const double &tolerance)

No documentation provided.

Method GeneralizedEigenSolverTest::gives_correct_eigenvalues

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::gives_correct_eigenvalues(const Common::Configuration &tolerances = {})

No documentation provided.

Method GeneralizedEigenSolverTest::gives_correct_eigenvalues_via_free_functions

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::gives_correct_eigenvalues_via_free_functions(const Common::Configuration &tolerances = {})

The free functions from dune/xt/la/generalized-eigen-solver.hh have to agree with the class interface.

Method GeneralizedEigenSolverTest::throws_on_request_for_eigenvectors

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_request_for_eigenvectors()

Eigenvectors of generalized eigenvalue problems are not implemented (yet).

Asking for them up front makes compute() fail, while asking for them after a successful eigenvalue computation has to be reported as a usage error instead of returning an empty matrix.

Method GeneralizedEigenSolverTest::throws_on_indefinite_rhs_matrix

template<class MatrixImp, class F, class C, class R>
void GeneralizedEigenSolverTest<MatrixImp, F, C, R>::throws_on_indefinite_rhs_matrix()

lapack’s dsygv requires the right hand side matrix to be positive definite.

A zero right hand side passes all of our own checks (it is square, of matching size and free of inf/nan), so the failure has to be reported by the backend error handling of the lapack based implementation.

Constructor GeneralizedEigenSolverTest::GeneralizedEigenSolverTest<MatrixImp, F, C, R>

template<>
template<class MatrixImp, class F, class C, class R>
GeneralizedEigenSolverTest<MatrixImp, F, C, R>::GeneralizedEigenSolverTest<MatrixImp, F, C, R>()

No documentation provided.

Field GeneralizedEigenSolverTest::all_matrices_and_expected_eigenvalues_and_vectors_are_computed_

bool GeneralizedEigenSolverTest::all_matrices_and_expected_eigenvalues_and_vectors_are_computed_

No documentation provided.

Field GeneralizedEigenSolverTest::broken_matrix_

MatrixType GeneralizedEigenSolverTest::broken_matrix_

No documentation provided.

Field GeneralizedEigenSolverTest::unit_matrix_

MatrixType GeneralizedEigenSolverTest::unit_matrix_

No documentation provided.

Field GeneralizedEigenSolverTest::matrix_

MatrixType GeneralizedEigenSolverTest::matrix_

No documentation provided.

Field GeneralizedEigenSolverTest::rhs_matrix_

MatrixType GeneralizedEigenSolverTest::rhs_matrix_

No documentation provided.

Field GeneralizedEigenSolverTest::rhs_matrix_is_given_

bool GeneralizedEigenSolverTest::rhs_matrix_is_given_

No documentation provided.

Field GeneralizedEigenSolverTest::expected_eigenvalues_

int GeneralizedEigenSolverTest::expected_eigenvalues_

No documentation provided.

Type alias GeneralizedEigenSolverTest::MatrixType

type GeneralizedEigenSolverTest::MatrixType

No documentation provided.

Type alias GeneralizedEigenSolverTest::ComplexMatrixType

type GeneralizedEigenSolverTest::ComplexMatrixType

No documentation provided.

Type alias GeneralizedEigenSolverTest::RealMatrixType

type GeneralizedEigenSolverTest::RealMatrixType

No documentation provided.

Type alias GeneralizedEigenSolverTest::M

type GeneralizedEigenSolverTest::M

No documentation provided.