28 bool computeEigenvectors) {
30 libmesh_assert(A.cols() == A.rows() &&
31 B.cols() == A.rows() &&
32 B.cols() == B.rows());
41 int n = (int)A.cols();
45 if (computeEigenvectors)
60 work = ComplexVectorX::Zero(lwork);
62 rwork = RealVectorX::Zero(l_rwork);
65 *a_vals = Amat.data(),
66 *b_vals = Bmat.data(),
67 *alpha_v =
alpha.data(),
68 *beta_v =
beta.data(),
71 *work_v = work.data();
74 *rwork_v = rwork.data();
80 &(alpha_v[0]), &(beta_v[0]),
81 &(VL_v[0]), &n, &(VR_v[0]), &n,
88 <<
"Warning!! ZGGEV returned with nonzero info = "
virtual void compute(const ComplexMatrixX &A, const ComplexMatrixX &B, bool computeEigenvectors=true)
computes the eigensolution for .
Matrix< Complex, Dynamic, 1 > ComplexVectorX
const ComplexMatrixX & B() const
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
Matrix< Real, Dynamic, 1 > RealVectorX
const ComplexMatrixX & A() const
int zggev_(char *jobvl, char *jobvr, int *n, std::complex< double > *a, int *lda, std::complex< double > *b, int *ldb, std::complex< double > *alpha, std::complex< double > *beta, std::complex< double > *vl, int *ldvl, std::complex< double > *vr, int *ldvr, std::complex< double > *work, int *lwork, double *rwork, int *info)