#### View Issue Details

ID Project Category View Status Date Submitted Last Update 0003015 OpenFOAM [All Projects] Bug public 2018-07-24 13:27 2018-07-24 16:41 marniemann will normal minor always resolved fixed x86_64 Ubuntu 16.04 and 17.04 6 0003015: eigenValue and eigenVector computation give wrong results For some cases eigenvalues are computed with the wrong sign, e.g. negative instead of positive eigenvalues for the (3x3) identity matrix. Moreover, eigenvectors for eigenvalues with multiplicity are identical. The following short example illustrates this behavior where the analytical results were computed using wolframalpha.com, e.g. with eigenvalues{{1,0,0},{0,1,0},{0,0,1}}:     tensor test, test2;     vector test1;     test = tensor(1,0,0, 0,1,0, 0,0,1);     test1 = eigenValues(test);     test2 = eigenVectors(test, test1);     // analytical values: (1, 1, 1)     // vectors: (0,0,1), (0,1,0), (0,0,1)     Info << "EVtest: " << test << ", " << test1 << ", " << test2 << endl;     test = tensor(1,2,0, 2,1,0, 0,0,1);     test1 = eigenValues(test);     test2 = eigenVectors(test, test1);     // analytical values: (3, 1, -1)     // vectors: (1,1,0), (-1,1,0), (0,0,1)     Info << "EVtest: " << test << ", " << test1 << ", " << test2 << endl;     test = tensor(2,1,1, 1,2,1, 1,1,2);     test1 = eigenValues(test);     test2 = eigenVectors(test, test1);     // analytical values: (4, 1, 1)     // vectors: (1,1,1), (-1,0,1), (-1,1,0)     Info << "EVtest: " << test << ", " << test1 << ", " << test2 << endl; Output of this example: EVtest: (1 0 0 0 1 0 0 0 1), (-1 -1 -1), (1 0 0 1 0 0 1 0 0) EVtest: (1 2 0 2 1 0 0 0 1), (-1 1 3), (0.707107 -0.707107 0 -0 -0 1 0.707107 0.707107 0) EVtest: (2 1 1 1 2 1 1 1 2), (-1 -1 4), (0.942809 -0.235702 -0.235702 0.942809 -0.235702 -0.235702 0.57735 0.57735 0.57735) No tags attached.

#### Activities

 2018-07-24 16:41 manager   ~0009874 Thanks for the report. There was a bug in the handling of repeated roots in cubicEqn and quadraticEqn. Resolved in dev by commit 9cf8078f, and in version 6 by 82b3c0c1.