#ifndef lint static char vcid[] = "$Id: dgedi.c,v 1.2 1996/03/04 05:16:18 bsmith Exp bsmith $"; #endif /* This file creating by running f2c linpack. this version dated 08/14/78 cleve moler, university of new mexico, argonne national lab. Computes the inverse of a matrix given its factors and pivots calculated by Linpack_DGEFA(). */ #include "petsc.h" int Linpack_DGEDI(Scalar *a,int n,int *ipvt,Scalar *work) { int i__2,kb, kp1, nm1,i, j, k, l, ll,kn,knp1,jn; Scalar t, *aa,*ax,*ay,tmp; --work; --ipvt; a -= n + 1; /* compute inverse(u) */ for (k = 1; k <= n; ++k) { kn = k*n; knp1 = kn + k; a[knp1] = 1.0 / a[knp1]; t = -a[knp1]; i__2 = k - 1; aa = &a[1 + kn]; for ( ll=0; ll