Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix Gerick fgerick

View GitHub Profile
@fgerick
fgerick / quadgep.jl
Created Jul 28, 2020
Quadruple precision sparse generalized eigen problem in Julia
View quadgep.jl
# 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)
View keybase.md

Keybase proof

I hereby claim:

  • I am fgerick on github.
  • I am felixg (https://keybase.io/felixg) on keybase.
  • I have a public key ASCKtmh1Fr-o7fPFedLk6xN0swd3W8PqgN65hBfwwySQiwo

To claim this, I am signing this object:

@fgerick
fgerick / atom.mplstyle
Created Jul 3, 2019
matplotlib theme for atom one-dark with color cycle from matplotlib dark_background theme
View atom.mplstyle
lines.color: abb2bf
patch.edgecolor: abb2bf
text.color: abb2bf
axes.facecolor: 282c34
axes.edgecolor: abb2bf
axes.labelcolor: abb2bf
axes.prop_cycle: cycler('color', ['8dd3c7', 'feffb3', 'bfbbd9', 'fa8174', '81b1d2', 'fdb462', 'b3de69', 'bc82bd', 'ccebc4', 'ffed6f'])
@fgerick
fgerick / eigstarget.jl
Last active Jul 4, 2019
Shift-invert Arnoldi for targeted generalised eigen problem in Julia
View eigstarget.jl
# Solve Ax = λBx using Shift-invert Arnoldi targeting complex σ:
# (A-σB)^-1 Bx = 1/(λ-σ)x
using LinearAlgebra, SparseArrays, Arpack, LinearMaps
n=100
A = sprandn(n,n,0.1)
B = sprandn(n,n,0.1) .+ sparse(1.0I,n,n)
# eigenvalue to target:
You can’t perform that action at this time.