[MOAB-dev] Matrix3 EigenDecomp Bug

shriwise shriwise at wisc.edu
Tue Aug 18 15:56:38 CDT 2015


Hey all,

After a day or so of working on this, I found an error in the Eigenvalue 
decomposition function provided by Matrix3.

I believe that its computation is correct, but the way that it returns 
the Eigenvectors is at the very least ambiguous, and I would argue that 
it is simply incorrect.

Typically the matrix produced by this decomposition contains the vectors 
in a column-based manner, but the vectors are being returned in an array 
of CartVects where each CartVect contains a row of the resulting matrix. 
The problem being that the solution matrix in this case is indeed column 
based. So while the correct information is available, it is returned in 
such a way that leads one to believe each CartVect contains one of the 
EigenVectors when this is not the case.

I found this by comparing the results of this function to that of a 
common linear algebra library, Armadillo.

I've attached the test program I was using if anyone is curious.

Normally, I would simply fix it and create a PR but I'm not quite 
certain how to proceed. I think probably the best way is to fix this at 
the source in Matrix3.hpp but I don't want any reliant functionality to 
be affected without notice. This is a long standing bug affecting the 
OBBTree. I'll start working on a fix tomorrow morning, perhaps by 
finding anywhere this is used and double checking the use of the 
returned Eigenvectors. Does that sound amenable to all?

Cheers,

-- 
Patrick C. Shriwise
Research Fellow
University of Wisconsin - Madison
Engineering Research Building - Rm. 428
1500 Engineering Drive
Madison, WI 53706
(608) 446-8173

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_Mat3.cpp
Type: text/x-c++src
Size: 1816 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20150818/944e7dbe/attachment.cpp>


More information about the moab-dev mailing list