numerics 0.1.0
Loading...
Searching...
No Matches
num::kernel::subspace Namespace Reference

Functions

real mgs_orthogonalize (const std::vector< Vector > &basis, Vector &v, std::vector< real > &h, idx k)
 Modified Gram-Schmidt against basis[0..k-1].
 
real mgs_orthogonalize (const Matrix &basis, idx k, Vector &v)
 Modified Gram-Schmidt against columns 0..k-1 of a row-major matrix.
 
template<class Op >
requires requires(const Op& A, const Vector& x, Vector& y) { A.apply(x, y); }
real arnoldi_step (const Op &A, std::vector< Vector > &basis, std::vector< real > &h, idx k, Vector &scratch, real breakdown_tol=real(1e-14))
 One Arnoldi step: expand the orthonormal basis by one vector.
 

Function Documentation

◆ arnoldi_step()

template<class Op >
requires requires(const Op& A, const Vector& x, Vector& y) { A.apply(x, y); }
real num::kernel::subspace::arnoldi_step ( const Op &  A,
std::vector< Vector > &  basis,
std::vector< real > &  h,
idx  k,
Vector scratch,
real  breakdown_tol = real(1e-14) 
)

One Arnoldi step: expand the orthonormal basis by one vector.

Definition at line 24 of file subspace.hpp.

References num::beta(), mgs_orthogonalize(), and num::scale().

◆ mgs_orthogonalize() [1/2]

real num::kernel::subspace::mgs_orthogonalize ( const Matrix basis,
idx  k,
Vector v 
)

Modified Gram-Schmidt against columns 0..k-1 of a row-major matrix.

Definition at line 20 of file subspace.cpp.

References num::norm(), and num::BasicMatrix< T >::rows().

◆ mgs_orthogonalize() [2/2]

real num::kernel::subspace::mgs_orthogonalize ( const std::vector< Vector > &  basis,
Vector v,
std::vector< real > &  h,
idx  k 
)

Modified Gram-Schmidt against basis[0..k-1].

Definition at line 9 of file subspace.cpp.

References num::axpy(), num::dot(), and num::norm().

Referenced by arnoldi_step(), num::expv(), num::gmres(), and num::lanczos().