Hi everyone.
I have a code for computing Surface Wave dispersion velocity (seismology) and it takes about 6 s to run. Of those, 4.5 s are spent on this for loop that calls Arpack to solve the generalised eigenvalue and eigenvector problem (I need both) many times.
for o=1:fnum
dp,xp=eigs(A,B,nev=3,sigma=ω[o]/rspd);
x[:,:,o] = real.(xp);
d[:,:,o] = real.(dp);
end
After some testing the fastest way is to use skip more inputs (tol, which, etc).
A and B are 972x972 sparse matrixes (symmetric but none diagonal ) that are build on each iteration. But the total time of building them is around 0.15 s, so it is not THAT bad.
I wonder if you guys know a faster way to run this line… or if there is a faster alternative in another package.