MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / LapackEigenSystem

Method LapackEigenSystem

comp/bilinearform.cpp:6867–6893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6865
6866 template <class TSCAL>
6867 void S_BilinearForm<TSCAL>::LapackEigenSystem(FlatMatrix<TSCAL> & elmat, LocalHeap & lh) const
6868 {
6869 if (!this->symmetric || this->fespace->IsComplex())
6870 {
6871 Vector<Complex> lami(elmat.Height());
6872 Matrix<TSCAL> evecs(elmat.Height());
6873 FlatMatrix<TSCAL> elmat_save(elmat.Height(), elmat.Width(), lh);
6874 elmat_save = elmat;
6875#ifdef LAPACK
6876 LapackEigenValues (elmat_save, lami, evecs);
6877 (*testout) << "lami = "
6878 << endl << lami << endl << "evecs: " << endl << evecs << endl;
6879#endif
6880 }
6881 else
6882 {
6883 Vector<TSCAL> lami(elmat.Height());
6884 Matrix<TSCAL> evecs(elmat.Height());
6885#ifdef LAPACK
6886 LapackEigenValuesSymmetric (elmat, lami, evecs);
6887#else
6888 CalcEigenSystem (elmat, lami, evecs);
6889#endif
6890 (*testout) << "lami = "
6891 << endl << lami << endl << "evecs: " << endl << evecs << endl;
6892 }
6893 }
6894
6895
6896

Callers

nothing calls this directly

Calls 6

LapackEigenValuesFunction · 0.85
CalcEigenSystemFunction · 0.70
IsComplexMethod · 0.45
HeightMethod · 0.45
WidthMethod · 0.45

Tested by

no test coverage detected