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

Eigen solver reliability issues

Tags: None
(comma "," separated)
lnorgeot
Registered Member
Posts
1
Karma
0

Eigen solver reliability issues

Tue Mar 19, 2013 11:07 am
Firstly, hello everyone! :)

I am loïc, a french student 8) (so please be kind with my **** english) in fluid mechanics.

In the context of a 6 months project i am developping in C++ a code allowing users to simulate a flow around an airfoil profile.
In this code, I need to solve big linear systems (A*X=B), with A being a large float matrix (up to 1000*1000 and beyond!) and B a column vector.

I came across Eigen, which seemed the best choice for solving such systems, and seemed to work pretty well.

BUT, I am encountering difficulties right now:
The various decompositions offered by Eigen give me different results (and not a little different, I mean resuts seem to live and behave on independant planets :o ).
My matrix being quite a messy one (no zeros, positive and negative members, no symetry...etc.), I used:

*FullPivLU: This one seemed the best, giving me results which could be realistic, but not as much as they should have.
*HouseholderQR: Quite worse, the results could be realistic, but on a strange world populated with funny creatures.
*ColPivHouseholderQR: Not the worst one, but irrealistic results.
*FullPivHouseholderQR : Doesn't even cares about giving me any result xD.

My question(s):
-How is this possible? I have no PHD in mathematics but studied linear algebra a (little) lot, and even if the methods are different, the results should not change that much right?
-Is this a known problem, and has anyone experienced it before?
-If so, are there any hints on how to process (validating the results, and maybe having the same results with the different methods)?

As you might feel I'm a little lost right there, so any help would really be appreciated. I could post a simple version of my code later if needed.
Thanks in advance to everyone (anyone)!
Eigenly yours,
Loïc.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen solver reliability issues

Tue Mar 19, 2013 7:47 pm
Hi,

it might likely be the case that your problem very hill conditioned, and that applying a simple scaling would solve all your problems. If you can share a simple code to reproduce the issue might help. You might also print the column norms:

std::cout << A.colwise().norm() << "\n";

and singular values:

std::cout << A.jacobiSvd().singularValues().transpose() << "\n";

and report them.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]