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();
43 char BAL=
'B', L=
'N',R=
'N', S=
'E';
45 if (computeEigenvectors) {
47 L =
'V'; R =
'V'; S=
'B';
62 work = ComplexVectorX::Zero(lwork);
64 rwork = RealVectorX::Zero(l_rwork),
65 lscale = RealVectorX::Zero(n),
66 rscale = RealVectorX::Zero(n),
67 rconde = RealVectorX::Zero(n),
68 rcondv = RealVectorX::Zero(n);
71 *a_vals = Amat.data(),
72 *b_vals = Bmat.data(),
73 *alpha_v =
alpha.data(),
74 *beta_v =
beta.data(),
77 *work_v = work.data();
80 *rwork_v = rwork.data(),
81 *lscale_v = lscale.data(),
82 *rscale_v = rscale.data(),
83 *rconde_v = rconde.data(),
84 *rcondv_v = rcondv.data(),
97 &(alpha_v[0]), &(beta_v[0]),
101 &(lscale_v[0]), &(rscale_v[0]),
103 &(rconde_v[0]), &(rcondv_v[0]),
104 &(work_v[0]), &lwork,
112 <<
"Warning!! ZGGEVX returned with nonzero info = "
int zggevx_(char *balanc, char *jobvl, char *jobvr, char *sens, 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, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double *rcondv, std::complex< double > *work, int *lwork, double *rwork, int *iwork, bool *bwork, int *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