![]() |
Reference documentation for deal.II version 9.5.1
|
Functions | |
template<typename NumberType > | |
std::array< NumberType, 3 > | givens_rotation (const NumberType &x, const NumberType &y) |
template<typename NumberType > | |
std::array< NumberType, 3 > | hyperbolic_rotation (const NumberType &x, const NumberType &y) |
template<typename OperatorType , typename VectorType > | |
double | lanczos_largest_eigenvalue (const OperatorType &H, const VectorType &v0, const unsigned int k, VectorMemory< VectorType > &vector_memory, std::vector< double > *eigenvalues=nullptr) |
template<typename OperatorType , typename VectorType > | |
void | chebyshev_filter (VectorType &x, const OperatorType &H, const unsigned int n, const std::pair< double, double > unwanted_spectrum, const double tau, VectorMemory< VectorType > &vector_memory) |
A collection of linear-algebra utilities.
std::array< NumberType, 3 > Utilities::LinearAlgebra::givens_rotation | ( | const NumberType & | x, |
const NumberType & | y ) |
Return the elements of a continuous Givens rotation matrix and the norm of the input vector.
That is for a given pair x
and y
, return
std::array< NumberType, 3 > Utilities::LinearAlgebra::hyperbolic_rotation | ( | const NumberType & | x, |
const NumberType & | y ) |
Return the elements of a hyperbolic rotation matrix.
That is for a given pair x
and y
, return
Real valued solution only exists if
double Utilities::LinearAlgebra::lanczos_largest_eigenvalue | ( | const OperatorType & | H, |
const VectorType & | v0, | ||
const unsigned int | k, | ||
VectorMemory< VectorType > & | vector_memory, | ||
std::vector< double > * | eigenvalues = nullptr ) |
Estimate an upper bound for the largest eigenvalue of H
by a k
-step Lanczos process starting from the initial vector v0
. Typical values of k
are below 10. This estimator computes a k-step Lanczos decomposition eigenvalues
is not nullptr
, the eigenvalues of
vector_memory
is used to allocate memory for temporary vectors. OperatorType has to provide vmult
operation with VectorType.
This function implements the algorithm from
void Utilities::LinearAlgebra::chebyshev_filter | ( | VectorType & | x, |
const OperatorType & | H, | ||
const unsigned int | n, | ||
const std::pair< double, double > | unwanted_spectrum, | ||
const double | tau, | ||
VectorMemory< VectorType > & | vector_memory ) |
Apply Chebyshev polynomial of the operator H
to x
. For a non-defective operator
This function uses Chebyshev polynomials of first kind. Below is an example of polynomial
![]() |
By introducing a linear mapping unwanted_spectrum
to x
. The higher the polynomial degree tau
. Thus, the filtered operator is
The action of the Chebyshev filter only requires evaluation of vmult()
of H
and is based on the recursion equation for Chebyshev polynomial of degree
vector_memory
is used to allocate memory for temporary objects.
This function implements the algorithm (with a minor fix of sign of
tau
is equal to std::numeric_limits<double>::infinity()
, no normalization will be performed.