----------------------------------------------------------------------------------
@MSGID:
<be249762-6f1d-4b0d-8c37-bfd262721bd8n@googlegroups.com> 3a24e025
@REPLY:
<4d061409-7c22-4e8c-a020-6e4476e8f165n@googlegroups.com> 90ca26cc
@REPLYADDR Farzad Tatar
<tatarfarzad1992@gmail.com>
@REPLYTO 2:5075/128 Farzad Tatar
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<f8466a68-55d1-4d8c-a607-5c41c85404d2n@googlegroups.com> <4d061409-7c22-4e8c-a020-6e4476e8f165n@googlegroups.com>
@RFC-Message-ID:
<be249762-6f1d-4b0d-8c37-bfd262721bd8n@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
>It does not return the inverse in the third argument, but the LU
>decomposition, not including the diagonal of L, which is all 1.
Thanks for telling me this, I had totally ignored this. probably
this is the reason. I will check it out.
> Set TEST2 to an identity matrix, and so the solution will be the inverse.
Since the dimensions are not the same, i.e., I don`t have two
columns of unknowns, this solution will not help.
>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.
Here is one example of what I believed was not correct.
A. CODE:
real:: TEST(2,2) = TRANSPOSE(reshape((/1.,2.,3.,4./), (/2,2/)))
real:: TEST2(2) = (1.,1.)
integer :: ipiv2(2)
integer, parameter :: sizet=2
goto 999
...
999 NRHS=1
print*, `before solving`, test, test2
CALL DGESV(sizet, nrhs, TEST, sizet, IPIV2, TEST2, sizet, INFO)
print*, ` after solving:`, test, test2
print*, ` ipiv2 vector: ` ipiv2
B. RESULTS IN CMD:
before solving 1.000000 3.000000 2.000000 4.000000
1.000000 1.000000
after solving: 2.000000 4.000000 -1.7014126E+38 1.375000
0.0000000E+00 0.0000000E+00
ipiv2 vector: 2 2
OUTPUTS OF SOLVING LS: INFO 0
C. WHILE I EXPECT THESE VALUES, YOU CAN PUT THEM IN THE EQUATION AND CHECK.
X1=-1, X2=1 BUT THE OUTPUT IS 0 AND 0.
--- 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