Conversation
Huh. I'm not seeing this problem locally. If anyone knows a quick fix I'd be grateful, I won't have time to return to this for a few days. |
I guess that's because you have a system-wide version of Eigen that Spectra picks up. Spectra is looking for Eigen via find_package() without checking that the target already exist first. I think you can set |
|
Thanks, @jdumas . Unfortunately, that doesn't seem to work. I'm not sure how I can trick spectra into seeing our Eigen. |
|
It looks like maybe this pull request on spectra would solve our issues? |
|
Yes it would definitely solve the issues we're having. I don't understand why it's been opened for 2y... |
|
If they don't merge such a change soon I can work on a libigl-side workaround later this week, I've done this a million times for misbehaving projects... |
|
Thanks, that'd be great. Using my fork is not a great solution. Though it seems spectra is not changing very frequently. |
|
Merging this in for now. If spectra merges yixuan/spectra#152 or we find a cmake work around. We can get rid of the alecjacobson mirror url. |
This introduces a spectra module. I'm still not 100% convinced that spectra is reliable. This uses a shift-invert mode with Eigen's SparseLU as a solver.
Matlab uses Arpack + umfpack. Eigen does provide a wrapper for umfpack, which would mean further including a SuiteSparse dependency (I'd say this is out of scope for now). So, in the meantime, I've templated over the solver so if a user really wanted to use umfpack they could.
One thing that makes me uncomfortable is that spectra did not find the correct modes for a basic unit test without really increasing the shift value
sigma. Ideally this would work withsigma=0or some other reliable procedure that is hidden from the caller. I'm not sure if we should blame spectra or SparseLU or the way I'm calling spectra for this issue.As a use-case, I included Spectral Conformal Parametrization. Another great addition would be the skinning eigenmodes from https://arxiv.org/abs/2303.11886.