API
Contour
Cim.AbstractContour
— Typecontours that we plan to support: 1. ellipse 2. circle 3. rectangle (not supported yet)
Quadrature
Cim.quadpts
— Typequadpts
Quadrature points of the trapezoidal rule on the contours.
Properties
N
: the number of the quadrature nodesnodes
: quadrature nodes size of N x 2nodes_prime
: derivative of the parametrization size of N x 2
Cim.get_quadpts
— Functionget_quadpts(ctr::ellipse, num_quadpts::Int64)
get_quadpts(ctr::circle, num_quadpts::Int64)
Get the quadrature points on the contour (ellipse or circle) ctr
. Here we use the composite trapezoidal rule.
Arguments
ctr
: the contour that we discretizenum_quadpts
: the number of the quadrature nodes
Nonlinear eigenvalue problems
Cim.Qep
— TypeQep{T}
Construct quadratic eigenvlaue problems
$(\mathbf{A}_{0} + \alpha \mathbf{A}_{1} + \alpha^2 \mathbf{A}_{2}) \mathbf{u} = 0.$
Fields
A₀
: the matrix in the zero order termA₁
: the matrix in the first order termA₂
: the matrix in the second order term
Contour integral method
Cim.cim
— Functioncim(ctr::AbstractContour, nep::Function, D, l::Int64; n=50, tol=1e-12)
Contour integral method to calculate the eigenvalues inside the contour ctr
Arugments
ctr
: the contournep
: the nonlinear eigenvalue problemd
: the scale of thenep
l
: the number of columns of random matrixn
: the number of the quadrature points (here we use the trapezoid rule)tol
: tolerance to determine the number of nonzero singular values
Reference
- Wolf-Jurgen Beyn, An integral method for solving NEPs, Linear Algebra Appl., 2012.
cim(ctr::AbstractContour, nep::Qep, d::Int64, l::Int64; n=50, tol=1e-12)
Use the contour integral method to solve quadratic eigenvalue problems.
Cim.contr_int_ho
— Functioncontr_int_ho()
Contour integral method with high-order moments
Arguments
In this function, we follow the notations in Stefan Guttel, Francoise Tisseur, Acta Numerica, 2017
ctr
:nep
:D
:r, l
: size of the probing matricespbar
: the number of the moments (for p = 0, ..., pbar)
Reference
- Stefan Guttel, Francoise Tisseur, The NEP, Acta Numerica, 2017.
Visualization
Cim.show_contour!
— Functionshow_contour!(ax, ctr::ellipse)
Plot the contour ctr::ellipse
on Axis ax
by using CairoMakie
.
show_contour!(ax, ctr::circle)
Plot the contour ctr::circle
on Axis ax
by using CairoMakie
.
Cim.show_eigenvalues!
— Functionshow_eigenvalues(ax, eigvals::AbstractArray)
Plot the eigenvalues on complex plane on Axis ax
by using CairoMakie
.
Cim.show_quadpts!
— Functionshow_quadpts!(ax, pts::quadpts)
Plot the quadrature points pts
on Axis ax
by using CairoMakie
.
Utils
Cim.is_inside
— Functionis_inside(λ, ctr::ellipse)
is_inside(λ, ctr::circle)
Check if the eigenvalue λ is in the contour ctr
to avoid spurious eigenvalues.
Cim.print_vec
— Functionprint_vec(vec; precision::Int=6)
Print the vector vec
to the REPL.