- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Dear all,

I have a piece of code in Fortran90 in which I have to solve both a non-linear (for which I have to invert the Jacobian matrix) and a linear system of equations. When I say very small I mean *n* unknowns for both operations, with *n<=4*. Unfortunately, *n* is not known *a priori*. What do you think is the fastest option? I thought of writing explicit formulas for cases with *n=1,2* and using other methods for *n=3,4* (e.g. some functions of the Intel MKL libraries), for the sake of performance. Is this sensible or should I write explicit formulas for the inverse matrix also for *n=3,4*?

The code is going to be called very many times in a Finite Element Method analysis, for this reason I was looking for the fastest solution. I was also looking for a comparison chart of MKL matrix inversion routines for very small matrices versus explicit methods.

Regards,

N

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

dear N.

We know about such problem, but currently we don't provide optimization for such tiny cases and may be would worth for you to try implement the direct methods to make the inversion.

--Gennady

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

If you only need to solve simultaneous equations, you do not need to compute the inverse. It is more efficient to do an LU, LL^{T} or LDU decomposition and then solve. In your case, it may even be the case that you only need to do the decomposition once and can subsequently use the factors repeatedly to obtain solutions.

If you have, or can obtain and install, the Intel IPP library, there is a section called "Small Matrices and Realistic Rendering" that you can look up and see if there are routines there that suit your needs. This part of the IPP is "deprecated", but since you have an older version of MKL that may not be an obstacle.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

the original code was written on Fortran 90 but IPP supports only C API.

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