- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to calculate LU-decomposition of square matrix. I call function dgetrf() but returned result is uncorrect.
double A[100,100]; int Size=100; int *ipiv = new int[100]; int info;
/*...*/
dgetrf(&Size,&Size,A,&Size,ipiv,&info);
I think, matrix A beforedgetrf()must be = P*L*U after dgetrf(), where P can be obtained from ipiv. Please,check my code.
double A[100,100]; int Size=100; int *ipiv = new int[100]; int info;
/*...*/
dgetrf(&Size,&Size,A,&Size,ipiv,&info);
I think, matrix A beforedgetrf()must be = P*L*U after dgetrf(), where P can be obtained from ipiv. Please,check my code.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't give enough context to test whether your A looks like a Fortran double subscripted array; in general, it will not. You must refer to the reference source code for the interpretation of ipiv. As you don't give anything to check, there are several other points on which you could make mistakes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oleg, there are some Lapack examples where you can find how these routines calling the right way.
Please see:
--Gennady

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page