問題タブ [arpack]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c++ - Strange behaviour using Arpack EigenLibrary Wrapper for small matrices
I want to solve the following generalized EVP using the ArpackWrapper of the Eigen library:
K_e is SPD. Normally K_g is indefinite and singular but for this MVP it is just indefinite. Furthermore, I'm interested in the smallest eigenvalues. For large systems 300kx300k i obtained reasonable results but for this small example the results appear strange. The first 4 resulting eigenvalues read
#xA;For less requested eigenvalues solverEig.info()
returns Eigen::NoConvergence
.
If i use Maple to compute the eigenvalues i get
#xA;which can be inserted in the problem statement to see their correctness.
Therefore, my question is why does it not yield the correct result? Is this a problem of arpack or of the eigen wrapper? Or most probably my wrong usage/understanding of arpack or the eigen wrapper.
Versions:
Eigen 3.3.7
Arpack https://github.com/opencollab/arpack-ng different versions result to the same behaviour
The code:
#xA;The files:
Ke.txt
#xA;Kg.txt
#xA;julia - 疎行列の対角化のための高速な方法 (julia): なぜ arpack はとても遅いのですか?
私の問題では、スパース実対称行列 A のいくつかの固有状態 (最小の固有値を持つ) にのみ関心があります。私が見る限り、arpack は別の方法を使用しており、LinearAlgebra パッケージの完全な対角化よりもはるかに高速です。私の例ではなぜずっと遅いのですか?
python - scipy.sparse.linalg.eigs を使用した複素固有値の計算
ファイルから次のリンクA
で取得できる次の入力 numpy 2d-array が与えられた場合、 scipy.sparse.linalg.eigsのような反復ソルバーを使用して固有値のサブセットのみを計算できれば素晴らしいでしょう。hill_mat.npy
まず、コンテキストについて少し説明します。この行列は、 double サイズの同等の固有値問題で線形化されたA
サイズの 2 次固有値問題から得られます。次の構造を持っています (青色はゼロです):N
2*N
A
と次の機能:
の実際の寸法はA
、この再現可能な小さな例よりもはるかに大きいです。この場合、実際の希薄率と形状は近いと予想され95%
ます(5508, 5508)
。
結果として得られる の固有値A
は複素数(複素共役ペアになります) であり、モジュラスの虚数部が最小のものに関心があります。
問題: 直接ソルバーを使用する場合:
計算時間は急速に法外なものになります。したがって、スパースアルゴリズムの使用を検討しています:
しかし、この方法では ARPACK は固有値を見つけられないようです。scipy/arpack チュートリアルから、 のような小さな固有値を探す場合、kwargwhich = 'SI'
を指定して、いわゆるシフト反転モードを使用する必要があります。つまり、アルゴリズムがこれらの固有値を見つけることができる場所を知ることができるようにするためです。それにもかかわらず、私の試みはすべて結果をもたらしませんでした...sigma
この機能の経験が豊富な人が、これを機能させるために手を貸してくれませんか?
コード スニペット全体を以下に示します。