Re: [eigen] help: eigen cann't solve this simple ax correctly, but Armadillo c++ can

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Thanks  I solve it with 
Vectorxd x = A.partialPivLu().solve(rhs);
 
I have a exact solution of "cos(6*Pi*x)*cos(6*Pi*y)", so i can obtain the absolute error. the order of error from Armadillo is "-14", while Eigen's error has an order of "1". I also tried other methods "fullPivLu()", "householderQr()", the situation doesn't change. 

But if i compute the relative error with Eigen's " double relative_error = (A*x - b).norm() / b.norm()", the relative_error is very small. I am confused by this situations.

On 9/8/2020 07:18Adrien Escande<adrien.escande@xxxxxxxxx> wrote:
Hi there,

could you be more precise: how did you try to solve your problem with Eigen? How do you know/check that the problem is not solved correctly ?

Best regards,
Adrien Escande

On Tue, Sep 8, 2020 at 12:55 AM ztdepyahoo <ztdepyahoo@xxxxxxxxx> wrote:

Dear sir:
   The matrix is generated from the spectral method of a simple heat diffusion problems, the dimension is 841. 
Attachment please find the a and rhs output from Armadillo. 
    I am wandering why eigen's dense linear sover cann't solve it correctly.
  Regards




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/