I have solved a system using Laspack using conjugate gradient and ILU preconditioner (tol. 1E-12) and it gives the following solution:
[1] 0.096709627074711618 double
[2] 0.041738859730487146 double
[3] 0.00067511123237074346 double
[4] -0.040388637958504281 double
[5] -0.095359407662660600 double
[6] 0.050941442361153874 double
[7] 0.027508948358719330 double
[8] 0.00067511042278063161 double
[9] -0.026158728561469002 double
[10] -0.049591224744352222 double
[11] 0.028279326736092902 double
[12] 0.016767643972775401 double
[13] 0.00067510968097885340 double
[14] -0.015417425476270046 double
[15] -0.026929109622622786 double
[16] 0.017154602993941025 double
[17] 0.010635301124244559 double
[18] 0.00067510921541819892 double
[19] -0.0092850833115109520 double
[20] -0.015804386045630902 double
[21] 0.012553916220840610 double
[22] 0.0079532300763286365 double
[23] 0.00067510900276445361 double
[24] -0..0066030125504719286 double
In Eigen however the solution of the same system using ConjugateGradient and ILU preconditioner is:
This is very different from Matlab and Laspack. What am I doing wrong? Am I calling Eigen correctly?
Please find in attachment the files to reproduce the solution. Steps: