![]() |
deal.II version 9.7.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 


![\[\begin{bmatrix}
c & s \\
-s & c
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
=
\begin{bmatrix}
\sqrt{x^2+y^2} \\
0
\end{bmatrix}
\]](form_2129.png)
| 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 


![\[\begin{bmatrix}
c & -s \\
-s & c
\end{bmatrix}
\begin{bmatrix}
x \\
y
\end{bmatrix}
=
\begin{bmatrix}
r \\
0
\end{bmatrix}
\]](form_2130.png)
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 [Zhou2006].

| 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 ![$[-1,1]$](form_612.png)
x. The higher the polynomial degree 
![$[-1,1]$](form_612.png)
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.