Last active
March 27, 2021 10:50
-
-
Save fgerick/360840c15a065be36633c77af5ba31ac to your computer and use it in GitHub Desktop.
Quadruple precision sparse generalized eigen problem in Julia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solve for largest |λ| in Ax = λBx using quadruple precision : | |
# (B)^-1 Ax = λx | |
#as of now requires https://github.com/fgerick/ArnoldiMethod.jl and Julia >v1.4 | |
using LinearAlgebra, SparseArrays, ArnoldiMethod, IncompleteLU, DoubleFloats, LinearMaps | |
n=100 | |
T=Double64 | |
A = sprandn(T,n,n,0.1) | |
B = sprandn(T,n,n,0.1) + I(n) | |
P = ilu(B,τ=zero(T)) | |
L = LinearMap{Complex{T}}((y,x) -> ldiv!(y,P,A*x),n) | |
pschur,history=partialschur(L,which=LM(),nev=5) | |
λ,u = partialeigen(pschur) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment