Overview of the concepts

The implemented eigensolvers are based on a templated type EVP that must implement the Eigenproblem concept. Each Eigenproblem must export certain types which themselves must adhere to certain rules that are also defined as concepts. This facilitates the development of new backends. The documentation of all the necessary concepts is given below. Detailed descriptions of the individual methods that these concepts require are given in the OpenMP backend documentation.

template<class EVP>
concept Eigenproblem
#include <concepts.hh>

Concept for eigenvalue problems.

An Eigenproblem bundles the operator, inner product, and small dense solver needed by the block Lanczos algorithm. It also provides factory methods for backend-specific multivectors and block matrices.

Requirements

  • types: Scalar, BlockMultivector (satisfies BlockMultiVector)

  • blocksize consistent with BlockMultivector::blocksize

  • apply: Y = A * X (or transformed operator)

  • dot: B = X^T * Y (or B-inner product)

  • orthonormalize: X <- X * R^{-1}, output R (upper triangular)

  • size: global problem dimension

  • create_multivector, create_blockmatrix: factory methods

  • solve_small_dense: solve projected problem, return converged count

  • get_current_eigenvalues, get_current_eigenvectors: latest Ritz data

  • get_eigenvalues_block: block of eigenvalues used for restart

Semantics

For standard problems, dot computes X^T * Y. For generalized problems, dot may implement X^T * B * Y. The orthonormalize routine should leave R such that X_old = X_new * R, with R upper triangular.

template<class BMV>
concept BlockMultiVector
#include <concepts.hh>

Concept for block multivectors.

A BlockMultivector stores a set of vectors grouped into fixed-size blocks. It is the primary data structure for Lanczos basis vectors.

Requirements

  • blocksize: compile-time block size

  • block_view: access a block view by block index

  • BlockView satisfies BlockVectorView

  • BlockMatrix satisfies BlockMatrixConcept

template<class BV>
concept BlockVectorView
#include <concepts.hh>

Concept for block vector views.

A BlockView is a view into a contiguous block of vectors inside a BlockMultivector. The Lanczos algorithm uses these views to build and orthogonalize block Krylov bases.

Requirements

  • set_zero, rows, cols, copy_from

  • operator-=: in-place subtraction

  • mult_add: other += this * W

  • mult: other = this * W

  • mult_transpose: other = this * W^T

  • subtract_product: this -= other * W

Notes

Operations are expected to be dense, block-sized linear algebra kernels.

template<class BM>
concept BlockMatrixConcept
#include <concepts.hh>

Concept for block matrices.

A BlockMatrix stores a matrix as a grid of small dense blocks. It is used to represent the projected Lanczos matrix and small temporary blocks.

Requirements

  • block_rows, block_cols: number of block rows and columns

  • block_view: obtain a view into the (i, j) block

  • BlockView satisfies MatrixBlockViewConcept

Notes

The block layout is implementation-defined, but block_view must behave like a lightweight, non-owning view.

template<typename R, typename EVP, typename BMV>
concept ReorthogonalizationStrategy
#include <reorthogonalization.hh>

Concept for reorthogonalization strategies.

A strategy must be callable with (EVP&, BMV&, unsigned count, BlockView, BlockMatrixBlockView) and orthogonalize the BlockView against the first count blocks of the basis.