This forum has been archived. All content is frozen. Please use KDE Discuss instead.

QD library with Eigen3

Tags: None
(comma "," separated)
kde-adamba
Registered Member
Posts
1
Karma
0

QD library with Eigen3

Wed Feb 13, 2019 10:01 am
I have been using the dd_real data type from the QD library when solving Generalized eigenvalue problems. I had to make some minor modifications to the GeneralizedSelfAdjointEigenSolver routine but it now works well with the dd_real data type.

I am trying to do the same to the GeneralizedEigenSolver routine which uses the QZ decomposition. I get the following error when compiling:

Code: Select all
./Eigen/src/Core/functors/AssignmentFunctors.h:24:102: error: no match for 'operator=' (operand types are 'dd_real' and 'const std::complex<dd_real>')


The line in question from AssignmentFunctor is the following:

Code: Select all
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; }


The error is stating that the compiler does not understand the cast dd_real = std::complex<dd_real>. With the QD library I thought that to include complex numbers the Fortran bindings, fpu.h, needed to be imported; but it does not appear to work. Is there a way to static cast this?

Oddly I managed to get it working once by just setting a == b. This produced the correct answers from GeneralizedEigenSolver; but it no longer works and just sets all matrix elements to 0 during a Map procedure. I am still trying to understand what I did with this; but wondered if there is a better (correct) way to do it.

Many thanks :)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell