View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003015 | OpenFOAM | Bug | public | 2018-07-24 13:27 | 2018-07-24 16:41 |
Reporter | marniemann | Assigned To | will | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86_64 | OS | Ubuntu | OS Version | 16.04 and 17.04 |
Summary | 0003015: eigenValue and eigenVector computation give wrong results | ||||
Description | 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) | ||||
Tags | No tags attached. | ||||