Registered Member
|
Hello,
I am trying to solve a linear system Ax = b using PartialPivLU and FullPivLU. For some reason, only PartialPivLU is capable of computing the solution. I have already tried to adjust the threshold with a very small value, but no success. The maxPivot of the matrix is 3.791125e+18 and it seems A also has pivots in the order of 1.0e-2. Below are the coefficient matrix A and the vector b. Why FullPivLU fails to solve such linear system?
|
Moderator
|
Hi, according to double precision accuracy, your matrix is singular (rank 12), so the fact that partial piv LU gives you a better solution here is probably just luck.
|
Registered Member
|
The same matrix can be solved with GSL with no problems. This matrix is in fact a Jacobian matrix used during a Newton-Raphson iteration.
If I am not wrong, GSL performs a LU decomposition with partial pivoting. Perhaps this is why it succeeds in computing the linear system. Is there a remedy that make it possible to solve the linear system Ax = b with FullPivLU? |
Moderator
|
forget what I said, there might be a threshold issue in FullPivLU, I added an entry in our bug tracker: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=379
|
Registered Member
|
Exactly what do you mean by "is capable of computing a solution"? How do you check this? I thought that the threshold is not used by solve(). However, Gael seems to think otherwise. Can you please clarify: does changing the threshold make any difference to the result of solve() ? |
Registered Member
|
The solution I obtain with PartialPivLU matches the solution obtained by GSL using a LU decomposition with partial pivoting. The use of FullPivLU results in a solution vector x that fails ||Ax - b|| < epsilon for small enough epsilon (1.0e-6).
No. Changing the threshold in FullPivLU yields the same solution vector x, which again fails the above checking. I also tried to use a threshold = 0 as shown in the thread below, but with no success. viewtopic.php?f=74&t=88127&p=159349&hilit=FullPivLU+octave#p159349 |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]