Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Typedefs | Enumerations | Functions
matrix_free.hpp File Reference
#include <uni20/core/scalar_concepts.hpp>
#include <uni20/core/math.hpp>
#include <algorithm>
#include <cmath>
#include <complex>
#include <concepts>
#include <cstddef>
#include <limits>
#include <optional>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
Include dependency graph for matrix_free.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uni20::krylov::EigenResult< Scalar, Vector >
 Matrix-free eigenvalue result with solver-owned vector objects. More...
 
struct  uni20::krylov::NonsymmetricArnoldiDiagnostics< Scalar >
 Optional diagnostic state for nonsymmetric Arnoldi solves. More...
 
struct  uni20::krylov::NonsymmetricEigenParams< Scalar >
 Parameters for a native nonsymmetric eigenvalue solve. More...
 
struct  uni20::krylov::NonsymmetricEigenResult< Scalar, Vector >
 Matrix-free nonsymmetric eigenvalue result. More...
 
struct  uni20::krylov::SymmetricEigenParams< Scalar >
 Common parameters for a symmetric or Hermitian eigenvalue solve. More...
 
struct  uni20::krylov::SymmetricLanczosDiagnostics< Scalar >
 Optional diagnostic state for symmetric Lanczos solves. More...
 
struct  uni20::krylov::SymmetricRestartCycleDiagnostics< Scalar >
 Diagnostic state for one symmetric Lanczos restart cycle. More...
 
struct  uni20::krylov::SymmetricTransformOptions< Scalar >
 Native symmetric transform options for mapping OP Ritz values. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::krylov
 

Concepts

concept  uni20::krylov::KrylovVectorOps
 Concept for opaque vector-space operations required by Krylov solvers.
 
concept  uni20::krylov::KrylovOperator
 Concept for an output-first Krylov operator application y <- OP*x.
 
concept  uni20::krylov::KrylovMatrixFreeOperator
 Composite concept for current adapters that own vector ops and OP*x.
 
concept  uni20::krylov::MatrixFreeVectorOps
 Backward-compatible name for the combined vector/operator concept.
 
concept  uni20::krylov::KrylovMetricInnerProduct
 Optional customization point for backend-owned metric inner products.
 
concept  uni20::krylov::MetricInnerProductOps
 Backward-compatible name for direct metric inner-product customization.
 
concept  uni20::krylov::KrylovNorm
 Optional customization point for direct vector norms.
 

Typedefs

using uni20::krylov::SymmetricSpectralTransform = SymmetricTransformKind
 Backward-compatible name for symmetric transform kinds.
 
template<uni20::Real Scalar>
using uni20::krylov::SymmetricSpectralTransformOptions = SymmetricTransformOptions< Scalar >
 Backward-compatible name for symmetric transform options.
 

Enumerations

enum class  uni20::krylov::KrylovDiagnosticsLevel { uni20::krylov::None , uni20::krylov::Summary , uni20::krylov::Full }
 Amount of solver-internal diagnostic state to retain. More...
 
enum class  uni20::krylov::NonsymmetricStatus {
  uni20::krylov::Converged , uni20::krylov::NotConverged , uni20::krylov::ComplexPairEncountered , uni20::krylov::ComplexPromotionRecommended ,
  uni20::krylov::RealSchurPairRequired , uni20::krylov::AmbiguousReality , uni20::krylov::Breakdown , uni20::krylov::InvalidInput
}
 Native nonsymmetric solver status. More...
 
enum class  uni20::krylov::RealNonsymmetricPolicy { uni20::krylov::RequireRealEigenpairs , uni20::krylov::AllowRealSchurPairs , uni20::krylov::PromoteToComplexSuggested }
 Policy for real nonsymmetric solves when wanted Ritz values may be complex. More...
 
enum class  uni20::krylov::RitzReality { uni20::krylov::Real , uni20::krylov::Ambiguous , uni20::krylov::Complex }
 Numerical reality classification for a complex Ritz value from a real Arnoldi solve. More...
 
enum class  uni20::krylov::SpectrumPart {
  uni20::krylov::LargestMagnitude , uni20::krylov::SmallestMagnitude , uni20::krylov::LargestAlgebraic , uni20::krylov::SmallestAlgebraic ,
  uni20::krylov::BothEnds , uni20::krylov::LargestReal , uni20::krylov::SmallestReal , uni20::krylov::LargestImaginary ,
  uni20::krylov::SmallestImaginary
}
 Spectrum selector for matrix-free eigenvalue solvers. More...
 
enum class  uni20::krylov::SymmetricTransformKind {
  uni20::krylov::Regular , uni20::krylov::GeneralizedInverse , uni20::krylov::ShiftInvert , uni20::krylov::Buckling ,
  uni20::krylov::Cayley
}
 Transform represented by the caller-supplied symmetric Krylov operator. More...
 

Functions

template<uni20::Complex C>
RitzReality uni20::krylov::classify_ritz_reality (C theta, uni20::make_real_t< C > tolerance=uni20::make_real_t< C >{}, uni20::make_real_t< C > scale=uni20::make_real_t< C >{1}, uni20::make_real_t< C > ambiguity_factor=uni20::make_real_t< C >{10})
 Classify whether a complex Ritz value is numerically real.
 
template<uni20::Real Scalar>
requires requires { uni20::numeric_limits<Scalar>::epsilon(); }
Scalar uni20::krylov::default_complex_pair_tolerance ()
 Default imaginary-part tolerance for deciding whether a real Arnoldi Ritz value is real.
 
template<uni20::Real Scalar>
Scalar uni20::krylov::default_complex_pair_tolerance (Scalar const &exemplar)
 Default reality tolerance using the exemplar's working precision.
 
int uni20::krylov::default_nonsymmetric_krylov_dimension (int eigenvalue_count, std::size_t problem_dimension)
 Return the default nonsymmetric Arnoldi subspace dimension.
 
int uni20::krylov::default_nonsymmetric_retained_ritz_count (int eigenvalue_count, int krylov_dimension)
 Return the default nonsymmetric retained Schur dimension.
 
int uni20::krylov::default_symmetric_krylov_dimension (int eigenvalue_count, std::size_t problem_dimension)
 Return the default symmetric/Hermitian Krylov subspace dimension.
 
int uni20::krylov::default_symmetric_retained_ritz_count (int eigenvalue_count, int krylov_dimension)
 Return the default symmetric/Hermitian retained Ritz count.
 
template<uni20::Real Scalar>
int uni20::krylov::effective_nonsymmetric_krylov_dimension (NonsymmetricEigenParams< Scalar > const &params, std::size_t problem_dimension)
 Return the effective nonsymmetric Arnoldi subspace dimension.
 
template<uni20::Real Scalar>
int uni20::krylov::effective_nonsymmetric_retained_ritz_count (NonsymmetricEigenParams< Scalar > const &params, int krylov_dimension)
 Return the effective nonsymmetric retained Ritz or Schur count.
 
template<uni20::Real Scalar>
int uni20::krylov::effective_symmetric_krylov_dimension (SymmetricEigenParams< Scalar > const &params, std::size_t problem_dimension)
 Return the effective symmetric/Hermitian Krylov subspace dimension.
 
template<uni20::Real Scalar>
int uni20::krylov::effective_symmetric_retained_ritz_count (SymmetricEigenParams< Scalar > const &params, int krylov_dimension)
 Return the effective symmetric/Hermitian retained Ritz count.
 
template<typename Scalar , typename Vector , typename MetricOps , typename BOps , typename InnerOps >
Scalar uni20::krylov::metric_inner_product_or_apply (MetricOps &metric_ops, BOps &b_ops, InnerOps &inner_ops, Vector const &x, Vector const &y, Vector &scratch)
 Evaluate a metric inner product, using a backend override when available.
 
template<typename Scalar , typename Vector , typename Ops >
uni20::make_real_t< Scalar > uni20::krylov::norm_or_inner_product (Ops &ops, Vector const &x)
 Evaluate a vector norm, using a backend override when available.
 
template<typename Ops , typename Vector >
std::size_t uni20::krylov::validate_matrix_free_dimensions (Ops const &ops, Vector const &vector, char const *context)
 Validate that an initial/prototype vector matches the matrix-free problem dimension.