Nп/п : 34 из 100
 От   : gah4                                2:5075/128        31 авг 23 17:06:10
 К    : Farzad Tatar                                          31 авг 23 03:09:02
 Тема : Re: DGESV LAPACK HELP
----------------------------------------------------------------------------------
                                                                                 
@MSGID:
<30e8fe19-14fc-46a0-9acc-a384fa844fcfn@googlegroups.com> 905481f0
@REPLY:
<f8466a68-55d1-4d8c-a607-5c41c85404d2n@googlegroups.com> c559ed72
@REPLYADDR gah4 <gah4@u.washington.edu>
@REPLYTO 2:5075/128 gah4
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<f8466a68-55d1-4d8c-a607-5c41c85404d2n@googlegroups.com>
@RFC-Message-ID:
<30e8fe19-14fc-46a0-9acc-a384fa844fcfn@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
On Thursday, August 31, 2023 at 7:31:38 AM UTC-7, Farzad Tatar wrote:
> DEAR ALL, 
> I am trying to use LAPack libraries in Fortran to invert a square matrix.
 > I am new in Fortran and also LAPack. To rely on the results
after the inversion,
> I used a simple 2-2 matrix to check if I used the subroutine correctly.  
> However, I am receiving the wrong results. Here is the code. 

Looks to me like the answer is right. 

It does not return the inverse in the third argument, but the LU 
decomposition, not including the diagonal of L, which is all 1.

I am not fast enough doing LU by hand, to tell if it is right.
It does seem the LU for a diagonal matrix is the same, as you see.

But multiplying the original matrix by the result does give the
original values for TEST2.

It is, I believe, easy to get the actual inverse from LU, though.

You don`t show the declaration or values for IPIV.
It will sometimes exchange the rows, which you will only know if
you show IPIV.

--- G2/1.0
 * Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх