#include "gmx_blas.h"
#include "gmx_lapack.h"
-static void
-F77_FUNC(dstqrb, DSTQRB) (int * n,
- double * d__,
- double * e,
- double * z__,
- double * work,
- int * info)
+#ifndef DOXYGEN
+
+static void F77_FUNC(dstqrb, DSTQRB)(int* n, double* d__, double* e, double* z__, double* work, int* info)
{
int i__1, i__2;
double d__1, d__2;
for (j = 1; j <= i__1; ++j)
{
z__[j] = 0.;
-
}
z__[*n] = 1.;
{
goto L30;
}
- if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m+1])) * eps)
+ if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m + 1])) * eps)
{
e[m] = 0.;
goto L30;
}
i__1 = lend - l + 1;
- anorm = F77_FUNC(dlanst, DLANST) ("i", &i__1, &d__[l], &e[l]);
+ anorm = F77_FUNC(dlanst, DLANST)("i", &i__1, &d__[l], &e[l]);
iscale = 0;
if (anorm == 0.)
{
{
iscale = 1;
i__1 = lend - l + 1;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n,
- info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n, info);
i__1 = lend - l;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n,
- info);
+ F77_FUNC(dlascl, DLASCL)("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n, info);
}
else if (anorm < ssfmin)
{
iscale = 2;
i__1 = lend - l + 1;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n,
- info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n, info);
i__1 = lend - l;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n,
- info);
+ F77_FUNC(dlascl, DLASCL)("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n, info);
}
if (std::abs(d__[lend]) < std::abs(d__[l]))
if (lend > l)
{
-L40:
+ L40:
if (l != lend)
{
lendm1 = lend - 1;
m = lend;
-L60:
+ L60:
if (m < lend)
{
e[m] = 0.;
{
if (icompz > 0)
{
- F77_FUNC(dlaev2, DLAEV2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
+ F77_FUNC(dlaev2, DLAEV2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
work[l] = c__;
work[*n - 1 + l] = s;
}
else
{
- F77_FUNC(dlae2, DLAE2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
+ F77_FUNC(dlae2, DLAE2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
}
d__[l] = rt1;
d__[l + 1] = rt2;
e[l] = 0.;
- l += 2;
+ l += 2;
if (l <= lend)
{
goto L40;
++jtot;
g = (d__[l + 1] - p) / (e[l] * 2.);
- r__ = F77_FUNC(dlapy2, DLAPY2) (&g, &c_b31);
- g = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__ ));
+ r__ = F77_FUNC(dlapy2, DLAPY2)(&g, &c_b31);
+ g = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__));
s = 1.;
c__ = 1.;
{
f = s * e[i__];
b = c__ * e[i__];
- F77_FUNC(dlartg, DLARTG) (&g, &f, &c__, &s, &r__);
+ F77_FUNC(dlartg, DLARTG)(&g, &f, &c__, &s, &r__);
if (i__ != m - 1)
{
e[i__ + 1] = r__;
work[i__] = c__;
work[*n - 1 + i__] = -s;
}
-
}
if (icompz > 0)
{
mm = m - l + 1;
- F77_FUNC(dlasr, DLASR) ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &
- z__[l], &c__1);
+ F77_FUNC(dlasr, DLASR)
+ ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &z__[l], &c__1);
}
d__[l] -= p;
- e[l] = g;
+ e[l] = g;
goto L40;
-L80:
+ L80:
d__[l] = p;
++l;
goto L40;
}
goto L140;
-
}
else
{
-L90:
+ L90:
if (l != lend)
{
lendp1 = lend + 1;
{
d__2 = std::abs(e[m - 1]);
tst = d__2 * d__2;
- if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m- 1]) + safmin)
+ if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m - 1]) + safmin)
{
goto L110;
}
m = lend;
-L110:
+ L110:
if (m > lend)
{
e[m - 1] = 0.;
{
if (icompz > 0)
{
- F77_FUNC(dlaev2, DLAEV2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s)
- ;
+ F77_FUNC(dlaev2, DLAEV2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s);
tst = z__[l];
z__[l] = c__ * tst - s * z__[l - 1];
}
else
{
- F77_FUNC(dlae2, DLAE2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
+ F77_FUNC(dlae2, DLAE2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
}
d__[l - 1] = rt1;
d__[l] = rt2;
e[l - 1] = 0.;
- l += -2;
+ l += -2;
if (l >= lend)
{
goto L90;
g = (d__[l - 1] - p) / (e[l - 1] * 2.);
- r__ = F77_FUNC(dlapy2, DLAPY2) (&g, &c_b31);
- g = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__ ));
+ r__ = F77_FUNC(dlapy2, DLAPY2)(&g, &c_b31);
+ g = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__));
s = 1.;
c__ = 1.;
{
f = s * e[i__];
b = c__ * e[i__];
- F77_FUNC(dlartg, DLARTG) (&g, &f, &c__, &s, &r__);
+ F77_FUNC(dlartg, DLARTG)(&g, &f, &c__, &s, &r__);
if (i__ != m)
{
e[i__ - 1] = r__;
work[i__] = c__;
work[*n - 1 + i__] = s;
}
-
}
if (icompz > 0)
{
mm = l - m + 1;
- F77_FUNC(dlasr, DLASR) ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &
- z__[m], &c__1);
+ F77_FUNC(dlasr, DLASR)
+ ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &z__[m], &c__1);
}
d__[l] -= p;
- e[lm1] = g;
+ e[lm1] = g;
goto L90;
-L130:
+ L130:
d__[l] = p;
--l;
goto L90;
}
goto L140;
-
}
L140:
if (iscale == 1)
{
i__1 = lendsv - lsv + 1;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv],
- n, info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv], n, info);
i__1 = lendsv - lsv;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n,
- info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n, info);
}
else if (iscale == 2)
{
i__1 = lendsv - lsv + 1;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv],
- n, info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv], n, info);
i__1 = lendsv - lsv;
- F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n,
- info);
+ F77_FUNC(dlascl, DLASCL)
+ ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n, info);
}
if (jtot < nmaxit)
if (icompz == 0)
{
- F77_FUNC(dlasrt, DLASRT) ("i", n, &d__[1], info);
-
+ F77_FUNC(dlasrt, DLASRT)("i", n, &d__[1], info);
}
else
{
L190:
return;
-
}
-static void
-F77_FUNC(dgetv0, DGETV0) (int * ido,
- const char * bmat,
- int gmx_unused * itry,
- int * initv,
- int * n,
- int * j,
- double * v,
- int * ldv,
- double * resid,
- double * rnorm,
- int * ipntr,
- double * workd,
- int * iwork,
- int * ierr)
+static void F77_FUNC(dgetv0, DGETV0)(int* ido,
+ const char* bmat,
+ int gmx_unused* itry,
+ int* initv,
+ int* n,
+ int* j,
+ double* v,
+ int* ldv,
+ double* resid,
+ double* rnorm,
+ int* ipntr,
+ double* workd,
+ int* iwork,
+ int* ierr)
{
int c__1 = 1;
double c_b22 = 1.;
double c_b27 = -1.;
int v_dim1, v_offset, i__1;
- int jj;
- int idist;
+ int jj;
+ int idist;
--workd;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--ipntr;
--iwork;
if (!(*initv))
{
idist = 2;
- F77_FUNC(dlarnv, DLARNV) (&idist, &iwork[1], n, &resid[1]);
+ F77_FUNC(dlarnv, DLARNV)(&idist, &iwork[1], n, &resid[1]);
}
if (*bmat == 'G')
{
ipntr[1] = 1;
ipntr[2] = *n + 1;
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
*ido = -1;
goto L9000;
}
iwork[5] = 1;
if (*bmat == 'G')
{
- F77_FUNC(dcopy, DCOPY) (n, &workd[*n + 1], &c__1, &resid[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &workd[*n + 1], &c__1, &resid[1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L20:
iwork[5] = 0;
if (*bmat == 'G')
{
- workd[*n * 3 + 4] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ workd[*n * 3 + 4] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
workd[*n * 3 + 4] = std::sqrt(std::abs(workd[*n * 3 + 4]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 4] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 4] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
*rnorm = workd[*n * 3 + 4];
L30:
i__1 = *j - 1;
- F77_FUNC(dgemv, DGEMV) ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24,
- &workd[*n + 1], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24, &workd[*n + 1], &c__1);
i__1 = *j - 1;
- F77_FUNC(dgemv, DGEMV) ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &
- c_b22, &resid[1], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &c_b22, &resid[1], &c__1);
if (*bmat == 'G')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L40:
if (*bmat == 'G')
{
- *rnorm = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ *rnorm = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
*rnorm = std::sqrt(std::abs(*rnorm));
}
else if (*bmat == 'I')
{
- *rnorm = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ *rnorm = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
if (*rnorm > workd[*n * 3 + 4] * .717F)
}
-
-
-
-static void
-F77_FUNC(dsapps, DSAPPS) (int * n,
- int * kev,
- int * np,
- double * shift,
- double * v,
- int * ldv,
- double * h__,
- int * ldh,
- double * resid,
- double * q,
- int * ldq,
- double * workd)
+static void F77_FUNC(dsapps, DSAPPS)(int* n,
+ int* kev,
+ int* np,
+ double* shift,
+ double* v,
+ int* ldv,
+ double* h__,
+ int* ldh,
+ double* resid,
+ double* q,
+ int* ldq,
+ double* workd)
{
double c_b4 = 0.;
double c_b5 = 1.;
double c_b14 = -1.;
int c__1 = 1;
- int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
- i__3, i__4;
+ int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3, i__4;
double c__, f, g;
int i__, j;
double r__, s, a1, a2, a3, a4;
--shift;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
q_dim1 = *ldq;
q_offset = 1 + q_dim1;
- q -= q_offset;
+ q -= q_offset;
epsmch = GMX_DOUBLE_EPS;
itop = 1;
kplusp = *kev + *np;
- F77_FUNC(dlaset, DLASET) ("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
+ F77_FUNC(dlaset, DLASET)("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
if (*np == 0)
{
istart = itop;
-L20:
+ L20:
i__2 = kplusp - 1;
for (i__ = istart; i__ <= i__2; ++i__)
{
- big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__ + 1 + (h_dim1*2)]);
+ big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
if (h__[i__ + 1 + h_dim1] <= epsmch * big)
{
h__[i__ + 1 + h_dim1] = 0.;
}
}
iend = kplusp;
-L40:
+ L40:
if (istart < iend)
{
f = h__[istart + (h_dim1 << 1)] - shift[jj];
g = h__[istart + 1 + h_dim1];
- F77_FUNC(dlartg, DLARTG) (&f, &g, &c__, &s, &r__);
-
- a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 +
- h_dim1];
- a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (
- h_dim1 << 1)];
- a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 +
- h_dim1];
- a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 <<
- 1)];
+ F77_FUNC(dlartg, DLARTG)(&f, &g, &c__, &s, &r__);
+
+ a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 + h_dim1];
+ a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (h_dim1 << 1)];
+ a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 + h_dim1];
+ a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 << 1)];
h__[istart + (h_dim1 << 1)] = c__ * a1 + s * a2;
h__[istart + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
h__[istart + 1 + h_dim1] = c__ * a3 + s * a4;
i__2 = (i__3 < kplusp) ? i__3 : kplusp;
for (j = 1; j <= i__2; ++j)
{
- a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) *
- q_dim1];
- q[j + (istart + 1) * q_dim1] = -s * q[j + istart * q_dim1] +
- c__ * q[j + (istart + 1) * q_dim1];
+ a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) * q_dim1];
+ q[j + (istart + 1) * q_dim1] =
+ -s * q[j + istart * q_dim1] + c__ * q[j + (istart + 1) * q_dim1];
q[j + istart * q_dim1] = a1;
-
}
i__2 = iend - 1;
g = s * h__[i__ + 1 + h_dim1];
h__[i__ + 1 + h_dim1] = c__ * h__[i__ + 1 + h_dim1];
- F77_FUNC(dlartg, DLARTG) (&f, &g, &c__, &s, &r__);
+ F77_FUNC(dlartg, DLARTG)(&f, &g, &c__, &s, &r__);
if (r__ < 0.)
{
h__[i__ + h_dim1] = r__;
- a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 +
- h_dim1];
- a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1
- << 1)];
- a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)
- ];
- a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 +
- h_dim1];
+ a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 + h_dim1];
+ a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1 << 1)];
+ a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)];
+ a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 + h_dim1];
h__[i__ + (h_dim1 << 1)] = c__ * a1 + s * a2;
h__[i__ + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
i__3 = (i__4 < kplusp) ? i__4 : kplusp;
for (j = 1; j <= i__3; ++j)
{
- a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) *
- q_dim1];
- q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] +
- c__ * q[j + (i__ + 1) * q_dim1];
+ a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) * q_dim1];
+ q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] + c__ * q[j + (i__ + 1) * q_dim1];
q[j + i__ * q_dim1] = a1;
}
-
}
-
}
istart = iend + 1;
if (h__[iend + h_dim1] < 0.)
{
h__[iend + h_dim1] = -h__[iend + h_dim1];
- F77_FUNC(dscal, DSCAL) (&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
+ F77_FUNC(dscal, DSCAL)(&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
}
if (iend < kplusp)
++itop;
}
-L90:
- ;
+ L90:;
}
i__1 = kplusp - 1;
for (i__ = itop; i__ <= i__1; ++i__)
{
- big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__+ 1 + (h_dim1*2)]);
+ big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
if (h__[i__ + 1 + h_dim1] <= epsmch * big)
{
h__[i__ + 1 + h_dim1] = 0.;
}
-
}
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(dgemv, DGEMV) ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) *
- q_dim1 + 1], &c__1, &c_b4, &workd[*n + 1], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) * q_dim1 + 1], &c__1, &c_b4,
+ &workd[*n + 1], &c__1);
}
i__1 = *kev;
for (i__ = 1; i__ <= i__1; ++i__)
{
i__2 = kplusp - i__ + 1;
- F77_FUNC(dgemv, DGEMV) ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) *
- q_dim1 + 1], &c__1, &c_b4, &workd[1], &c__1);
- F77_FUNC(dcopy, DCOPY) (n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &
- c__1);
-
+ F77_FUNC(dgemv, DGEMV)
+ ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) * q_dim1 + 1], &c__1, &c_b4,
+ &workd[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &c__1);
}
- F77_FUNC(dlacpy, DLACPY) ("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
+ F77_FUNC(dlacpy, DLACPY)("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(dcopy, DCOPY) (n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
}
- F77_FUNC(dscal, DSCAL) (n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
+ F77_FUNC(dscal, DSCAL)(n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(daxpy, DAXPY) (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1,
- &resid[1], &c__1);
+ F77_FUNC(daxpy, DAXPY)
+ (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1, &resid[1], &c__1);
}
-
L9000:
return;
-
}
-
-static void
-F77_FUNC(dsortr, DSORTR) (const char * which,
- int * apply,
- int * n,
- double * x1,
- double * x2)
+static void F77_FUNC(dsortr, DSORTR)(const char* which, int* apply, int* n, double* x1, double* x2)
{
- int i__1;
+ int i__1;
int i__, j, igap;
double temp;
-
igap = *n / 2;
if (!std::strncmp(which, "SA", 2))
{
-L10:
+ L10:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L20:
+ L20:
if (j < 0)
{
}
j -= igap;
goto L20;
-L30:
- ;
+ L30:;
}
igap /= 2;
goto L10;
-
}
else if (!std::strncmp(which, "SM", 2))
{
-L40:
+ L40:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L50:
+ L50:
if (j < 0)
{
}
j -= igap;
goto L50;
-L60:
- ;
+ L60:;
}
igap /= 2;
goto L40;
-
}
else if (!std::strncmp(which, "LA", 2))
{
-L70:
+ L70:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L80:
+ L80:
if (j < 0)
{
}
j -= igap;
goto L80;
-L90:
- ;
+ L90:;
}
igap /= 2;
goto L70;
-
}
else if (!std::strncmp(which, "LM", 2))
{
-L100:
+ L100:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L110:
+ L110:
if (j < 0)
{
}
j -= igap;
goto L110;
-L120:
- ;
+ L120:;
}
igap /= 2;
goto L100;
L9000:
return;
-
}
-
-
-static void
-F77_FUNC(dsesrt, DSESRT) (const char * which,
- int * apply,
- int * n,
- double * x,
- int * na,
- double * a,
- int * lda)
+static void F77_FUNC(dsesrt,
+ DSESRT)(const char* which, int* apply, int* n, double* x, int* na, double* a, int* lda)
{
- int a_dim1, a_offset, i__1;
- int c__1 = 1;
+ int a_dim1, a_offset, i__1;
+ int c__1 = 1;
int i__, j, igap;
double temp;
a_dim1 = *lda;
a_offset = 1 + a_dim1 * 0;
- a -= a_offset;
+ a -= a_offset;
igap = *n / 2;
if (!std::strncmp(which, "SA", 2))
{
-L10:
+ L10:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L20:
+ L20:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L20;
-L30:
- ;
+ L30:;
}
igap /= 2;
goto L10;
-
}
else if (!std::strncmp(which, "SM", 2))
{
-L40:
+ L40:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L50:
+ L50:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L50;
-L60:
- ;
+ L60:;
}
igap /= 2;
goto L40;
-
}
else if (!std::strncmp(which, "LA", 2))
{
-L70:
+ L70:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L80:
+ L80:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L80;
-L90:
- ;
+ L90:;
}
igap /= 2;
goto L70;
-
}
else if (!std::strncmp(which, "LM", 2))
{
-L100:
+ L100:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L110:
+ L110:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L110;
-L120:
- ;
+ L120:;
}
igap /= 2;
goto L100;
L9000:
return;
-
}
-
-
-static void
-F77_FUNC(dsgets, DSGETS) (int * ishift,
- const char * which,
- int * kev,
- int * np,
- double * ritz,
- double * bounds,
- double * shifts)
+static void F77_FUNC(dsgets,
+ DSGETS)(int* ishift, const char* which, int* kev, int* np, double* ritz, double* bounds, double* shifts)
{
int c__1 = 1;
int i__1, i__2;
if (!std::strncmp(which, "BE", 2))
{
i__1 = *kev + *np;
- F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
+ F77_FUNC(dsortr, DSORTR)("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
kevd2 = *kev / 2;
if (*kev > 1)
{
i__1 = (kevd2 < *np) ? kevd2 : *np;
i__2 = (kevd2 > *np) ? kevd2 : *np;
- F77_FUNC(dswap, DSWAP) (&i__1, &ritz[1], &c__1,
- &ritz[i__2 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)(&i__1, &ritz[1], &c__1, &ritz[i__2 + 1], &c__1);
i__1 = (kevd2 < *np) ? kevd2 : *np;
i__2 = (kevd2 > *np) ? kevd2 : *np;
- F77_FUNC(dswap, DSWAP) (&i__1, &bounds[1], &c__1,
- &bounds[i__2 + 1], &c__1);
+ F77_FUNC(dswap, DSWAP)(&i__1, &bounds[1], &c__1, &bounds[i__2 + 1], &c__1);
}
-
}
else
{
i__1 = *kev + *np;
- F77_FUNC(dsortr, DSORTR) (which, &c__1, &i__1, &ritz[1], &bounds[1]);
+ F77_FUNC(dsortr, DSORTR)(which, &c__1, &i__1, &ritz[1], &bounds[1]);
}
if (*ishift == 1 && *np > 0)
{
- F77_FUNC(dsortr, DSORTR) ("SM", &c__1, np, &bounds[1], &ritz[1]);
- F77_FUNC(dcopy, DCOPY) (np, &ritz[1], &c__1, &shifts[1], &c__1);
+ F77_FUNC(dsortr, DSORTR)("SM", &c__1, np, &bounds[1], &ritz[1]);
+ F77_FUNC(dcopy, DCOPY)(np, &ritz[1], &c__1, &shifts[1], &c__1);
}
}
-
-static void
-F77_FUNC(dsconv, DSCONV) (int * n,
- double * ritz,
- double * bounds,
- double * tol,
- int * nconv)
+static void F77_FUNC(dsconv, DSCONV)(int* n, double* ritz, double* bounds, double* tol, int* nconv)
{
- double c_b3 = 2/3.;
+ double c_b3 = 2 / 3.;
int i__1;
double d__2, d__3;
}
-static void
-F77_FUNC(dseigt, DSEIGT) (double * rnorm,
- int * n,
- double * h__,
- int * ldh,
- double * eig,
- double * bounds,
- double * workl,
- int * ierr)
+static void F77_FUNC(dseigt, DSEIGT)(double* rnorm,
+ int* n,
+ double* h__,
+ int* ldh,
+ double* eig,
+ double* bounds,
+ double* workl,
+ int* ierr)
{
int c__1 = 1;
int h_dim1, h_offset, i__1;
--eig;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
- F77_FUNC(dcopy, DCOPY) (n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
i__1 = *n - 1;
- F77_FUNC(dcopy, DCOPY) (&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
- F77_FUNC(dstqrb, DSTQRB) (n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
+ F77_FUNC(dcopy, DCOPY)(&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
+ F77_FUNC(dstqrb, DSTQRB)(n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
if (*ierr != 0)
{
goto L9000;
for (k = 1; k <= i__1; ++k)
{
bounds[k] = *rnorm * std::abs(bounds[k]);
-
}
}
-
-
-static void
-F77_FUNC(dsaitr, DSAITR) (int * ido,
- const char * bmat,
- int * n,
- int * k,
- int * np,
- int * mode,
- double * resid,
- double * rnorm,
- double * v,
- int * ldv,
- double * h__,
- int * ldh,
- int * ipntr,
- double * workd,
- int * iwork,
- int * info)
+static void F77_FUNC(dsaitr, DSAITR)(int* ido,
+ const char* bmat,
+ int* n,
+ int* k,
+ int* np,
+ int* mode,
+ double* resid,
+ double* rnorm,
+ double* v,
+ int* ldv,
+ double* h__,
+ int* ldh,
+ int* ipntr,
+ double* workd,
+ int* iwork,
+ int* info)
{
int c__0 = 0;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
--ipntr;
--iwork;
minval = GMX_DOUBLE_MIN;
*ido = 0;
L30:
- F77_FUNC(dgetv0, DGETV0) (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv,
- &resid[1], rnorm, &ipntr[1], &workd[1], &iwork[21], &iwork[7]);
+ F77_FUNC(dgetv0, DGETV0)
+ (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv, &resid[1], rnorm, &ipntr[1],
+ &workd[1], &iwork[21], &iwork[7]);
if (*ido != 99)
{
goto L9000;
L40:
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
if (*rnorm >= safmin)
{
temp1 = 1. / *rnorm;
- F77_FUNC(dscal, DSCAL) (n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
- F77_FUNC(dscal, DSCAL) (n, &temp1, &workd[iwork[8]], &c__1);
+ F77_FUNC(dscal, DSCAL)(n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
+ F77_FUNC(dscal, DSCAL)(n, &temp1, &workd[iwork[8]], &c__1);
}
else
{
- F77_FUNC(dlascl, DLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] *
- v_dim1 + 1], n, &infol);
- F77_FUNC(dlascl, DLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[
- 8]], n, &infol);
+ F77_FUNC(dlascl, DLASCL)
+ ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] * v_dim1 + 1], n, &infol);
+ F77_FUNC(dlascl, DLASCL)
+ ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[8]], n, &infol);
}
iwork[5] = 1;
- F77_FUNC(dcopy, DCOPY) (n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
ipntr[1] = iwork[10];
ipntr[2] = iwork[9];
ipntr[3] = iwork[8];
iwork[5] = 0;
- F77_FUNC(dcopy, DCOPY) (n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
if (*mode == 2)
{
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L60:
if (*mode == 2)
{
- workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[10]], &
- c__1);
+ workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[10]], &c__1);
workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
}
else if (*bmat == 'G')
{
- workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
- c__1);
+ workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 3] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 3] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
if (*mode != 2)
{
- F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]],
- &c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
}
else
{
- F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]
- ], &c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
}
- F77_FUNC(dgemv, DGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
- c__1, &c_b18, &resid[1], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
h__[iwork[12] + (h_dim1 << 1)] = workd[iwork[9] + iwork[12] - 1];
if (iwork[12] == 1 || iwork[4] == 1)
if (*bmat == 'G')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
ipntr[1] = iwork[9];
ipntr[2] = iwork[8];
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L70:
if (*bmat == 'G')
{
- *rnorm = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ *rnorm = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
*rnorm = std::sqrt(std::abs(*rnorm));
}
else if (*bmat == 'I')
{
- *rnorm = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ *rnorm = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
if (*rnorm > workd[*n * 3 + 3] * .717F)
L80:
- F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &
- c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
- F77_FUNC(dgemv, DGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
- c__1, &c_b18, &resid[1], &c__1);
+ F77_FUNC(dgemv, DGEMV)
+ ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
if (iwork[12] == 1 || iwork[4] == 1)
{
iwork[3] = 1;
if (*bmat == 'G')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
ipntr[1] = iwork[9];
ipntr[2] = iwork[8];
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L90:
if (*bmat == 'G')
{
- workd[*n * 3 + 2] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
- c__1);
+ workd[*n * 3 + 2] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
workd[*n * 3 + 2] = std::sqrt(std::abs(workd[*n * 3 + 2]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 2] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 2] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
{
*rnorm = workd[*n * 3 + 2];
-
}
else
{
h__[iwork[12] + h_dim1] = -h__[iwork[12] + h_dim1];
if (iwork[12] < *k + *np)
{
- F77_FUNC(dscal, DSCAL) (n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
+ F77_FUNC(dscal, DSCAL)(n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
}
else
{
- F77_FUNC(dscal, DSCAL) (n, &c_b50, &resid[1], &c__1);
+ F77_FUNC(dscal, DSCAL)(n, &c_b50, &resid[1], &c__1);
}
}
}
-
-
-
-
-static void
-F77_FUNC(dsaup2, DSAUP2) (int * ido,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- int * np,
- double * tol,
- double * resid,
- int * mode,
- int gmx_unused * iupd,
- int * ishift,
- int * mxiter,
- double * v,
- int * ldv,
- double * h__,
- int * ldh,
- double * ritz,
- double * bounds,
- double * q,
- int * ldq,
- double * workl,
- int * ipntr,
- double * workd,
- int * iwork,
- int * info)
+static void F77_FUNC(dsaup2, DSAUP2)(int* ido,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ int* np,
+ double* tol,
+ double* resid,
+ int* mode,
+ int gmx_unused* iupd,
+ int* ishift,
+ int* mxiter,
+ double* v,
+ int* ldv,
+ double* h__,
+ int* ldh,
+ double* ritz,
+ double* bounds,
+ double* q,
+ int* ldq,
+ double* workl,
+ int* ipntr,
+ double* workd,
+ int* iwork,
+ int* info)
{
- double c_b3 = 2/3.;
+ double c_b3 = 2 / 3.;
int c__1 = 1;
int c__0 = 0;
- int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
- i__3;
+ int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3;
double d__2, d__3;
int j;
double eps23;
--ritz;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
q_dim1 = *ldq;
q_offset = 1 + q_dim1;
- q -= q_offset;
+ q -= q_offset;
--ipntr;
--iwork;
eps23 = GMX_DOUBLE_EPS;
if (iwork[2] == 1)
{
- F77_FUNC(dgetv0, DGETV0) (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &
- resid[1], &workd[*n * 3 + 1], &ipntr[1], &workd[1], &iwork[41],
- info);
+ F77_FUNC(dgetv0, DGETV0)
+ (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &resid[1], &workd[*n * 3 + 1],
+ &ipntr[1], &workd[1], &iwork[41], info);
if (*ido != 99)
{
goto L100;
}
- F77_FUNC(dsaitr, DSAITR) (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 +
- 1], &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
- &iwork[21], info);
+ F77_FUNC(dsaitr, DSAITR)
+ (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv,
+ &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[21], info);
if (*ido != 99)
{
L20:
iwork[4] = 1;
- F77_FUNC(dsaitr, DSAITR) (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1],
- &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
- &iwork[21], info);
+ F77_FUNC(dsaitr, DSAITR)
+ (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv, &h__[h_offset],
+ ldh, &ipntr[1], &workd[1], &iwork[21], info);
if (*ido != 99)
{
}
iwork[4] = 0;
- F77_FUNC(dseigt, DSEIGT) (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &
- bounds[1], &workl[1], &ierr);
+ F77_FUNC(dseigt, DSEIGT)
+ (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &bounds[1], &workl[1], &ierr);
if (ierr != 0)
{
goto L1200;
}
- F77_FUNC(dcopy, DCOPY) (&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
- F77_FUNC(dcopy, DCOPY) (&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
*nev = iwork[9];
*np = iwork[10];
- F77_FUNC(dsgets, DSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+ F77_FUNC(dsgets, DSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
- F77_FUNC(dcopy, DCOPY) (nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
- F77_FUNC(dsconv, DSCONV) (nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
+ F77_FUNC(dcopy, DCOPY)(nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
+ F77_FUNC(dsconv, DSCONV)(nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
nptemp = *np;
i__1 = nptemp;
{
std::strncpy(wprime, "SA", 2);
- F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
+ F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
nevd2 = *nev / 2;
nevm2 = *nev - nevd2;
if (*nev > 1)
{
i__1 = (nevd2 < *np) ? nevd2 : *np;
i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np + 1;
- F77_FUNC(dswap, DSWAP) (&i__1, &ritz[nevm2 + 1], &c__1,
- &ritz[((i__2 > i__3) ? i__2 : i__3)],
- &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (&i__1, &ritz[nevm2 + 1], &c__1, &ritz[((i__2 > i__3) ? i__2 : i__3)], &c__1);
i__1 = (nevd2 < *np) ? nevd2 : *np;
i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np;
- F77_FUNC(dswap, DSWAP) (&i__1, &bounds[nevm2 + 1], &c__1,
- &bounds[((i__2 > i__3) ? i__2 : i__3) + 1],
- &c__1);
+ F77_FUNC(dswap, DSWAP)
+ (&i__1, &bounds[nevm2 + 1], &c__1, &bounds[((i__2 > i__3) ? i__2 : i__3) + 1], &c__1);
}
-
}
else
{
std::strncpy(wprime, "LA", 2);
}
- F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
-
+ F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
}
i__1 = iwork[9];
for (j = 1; j <= i__1; ++j)
{
- d__2 = eps23;
- d__3 = std::abs(ritz[j]);
- temp = (d__2 > d__3) ? d__2 : d__3;
+ d__2 = eps23;
+ d__3 = std::abs(ritz[j]);
+ temp = (d__2 > d__3) ? d__2 : d__3;
bounds[j] /= temp;
}
std::strncpy(wprime, "LA", 2);
- F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
+ F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
i__1 = iwork[9];
for (j = 1; j <= i__1; ++j)
{
- d__2 = eps23;
- d__3 = std::abs(ritz[j]);
- temp = (d__2 > d__3) ? d__2 : d__3;
+ d__2 = eps23;
+ d__3 = std::abs(ritz[j]);
+ temp = (d__2 > d__3) ? d__2 : d__3;
bounds[j] *= temp;
}
{
std::strncpy(wprime, "LA", 2);
- F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+ F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
}
else
{
- F77_FUNC(dsortr, DSORTR) (which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+ F77_FUNC(dsortr, DSORTR)(which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
}
h__[h_dim1 + 1] = workd[*n * 3 + 1];
*np = iwork[8];
goto L1100;
-
}
else if (iwork[8] < *nev && *ishift == 1)
{
nevbef = *nev;
- i__1 = iwork[8], i__2 = *np / 2;
- *nev += (i__1 < i__2) ? i__1 : i__2;
+ i__1 = iwork[8], i__2 = *np / 2;
+ *nev += (i__1 < i__2) ? i__1 : i__2;
if (*nev == 1 && iwork[7] >= 6)
{
*nev = iwork[7] / 2;
if (nevbef < *nev)
{
- F77_FUNC(dsgets, DSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+ F77_FUNC(dsgets, DSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
}
-
}
if (*ishift == 0)
{
- F77_FUNC(dcopy, DCOPY) (np, &workl[1], &c__1, &ritz[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(np, &workl[1], &c__1, &ritz[1], &c__1);
}
- F77_FUNC(dsapps, DSAPPS) (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &
- resid[1], &q[q_offset], ldq, &workd[1]);
+ F77_FUNC(dsapps, DSAPPS)
+ (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &resid[1], &q[q_offset], ldq,
+ &workd[1]);
iwork[1] = 1;
if (*bmat == 'G')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L100:
if (*bmat == 'G')
{
- workd[*n * 3 + 1] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ workd[*n * 3 + 1] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
workd[*n * 3 + 1] = std::sqrt(std::abs(workd[*n * 3 + 1]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 1] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 1] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
}
iwork[1] = 0;
L9000:
return;
-
}
-
-void
-F77_FUNC(dsaupd, DSAUPD) (int * ido,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- double * tol,
- double * resid,
- int * ncv,
- double * v,
- int * ldv,
- int * iparam,
- int * ipntr,
- double * workd,
- int * iwork,
- double * workl,
- int * lworkl,
- int * info)
+void F77_FUNC(dsaupd, DSAUPD)(int* ido,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ double* tol,
+ double* resid,
+ int* ncv,
+ double* v,
+ int* ldv,
+ int* iparam,
+ int* ipntr,
+ double* workd,
+ int* iwork,
+ double* workl,
+ int* lworkl,
+ int* info)
{
int v_dim1, v_offset, i__1, i__2;
int j;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--iparam;
--ipntr;
--iwork;
{
iwork[2] = -4;
}
- if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
- std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
- std::strncmp(which, "BE", 2))
+ if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+ && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
{
iwork[2] = -5;
}
ipntr[11] = iwork[7];
}
- F77_FUNC(dsaup2, DSAUP2) (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &
- iwork[11], &iwork[6], &iwork[5], &iwork[10], &v[v_offset], ldv, &
- workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]], &
- workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1],
- &iwork[21], info);
+ F77_FUNC(dsaup2, DSAUP2)
+ (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &iwork[11], &iwork[6], &iwork[5],
+ &iwork[10], &v[v_offset], ldv, &workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]],
+ &workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1], &iwork[21], info);
if (*ido == 3)
{
L9000:
return;
-
}
-
-void
-F77_FUNC(dseupd, DSEUPD) (int * rvec,
- const char * howmny,
- int * select,
- double * d__,
- double * z__,
- int * ldz,
- double * sigma,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- double * tol,
- double * resid,
- int * ncv,
- double * v,
- int * ldv,
- int * iparam,
- int * ipntr,
- double * workd,
- double * workl,
- int * lworkl,
- int * info)
+void F77_FUNC(dseupd, DSEUPD)(int* rvec,
+ const char* howmny,
+ int* select,
+ double* d__,
+ double* z__,
+ int* ldz,
+ double* sigma,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ double* tol,
+ double* resid,
+ int* ncv,
+ double* v,
+ int* ldv,
+ int* iparam,
+ int* ipntr,
+ double* workd,
+ double* workl,
+ int* lworkl,
+ int* info)
{
- double c_b21 = 2/3.;
+ double c_b21 = 2 / 3.;
int c__1 = 1;
double c_b102 = 1.;
int v_dim1, v_offset, z_dim1, z_offset, i__1;
--resid;
z_dim1 = *ldz;
z_offset = 1 + z_dim1;
- z__ -= z_offset;
+ z__ -= z_offset;
--d__;
--select;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--iparam;
--ipntr;
--workl;
{
ierr = -3;
}
- if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
- std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
- std::strncmp(which, "BE", 2))
+ if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+ && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
{
ierr = -5;
}
{
ierr = -6;
}
- if (*howmny != 'A' && *howmny != 'P' &&
- *howmny != 'S' && *rvec)
+ if (*howmny != 'A' && *howmny != 'P' && *howmny != 'S' && *rvec)
{
ierr = -15;
}
}
else if (*bmat == 'G')
{
- bnorm2 = F77_FUNC(dnrm2, DNRM2) (n, &workd[1], &c__1);
+ bnorm2 = F77_FUNC(dnrm2, DNRM2)(n, &workd[1], &c__1);
}
if (*rvec)
{
- if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2) ||
- !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
- {
-
- }
+ if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2)
+ || !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
+ {}
else if (!std::strncmp(which, "BE", 2))
{
- ism = (*nev > nconv) ? *nev : nconv;
- ism /= 2;
+ ism = (*nev > nconv) ? *nev : nconv;
+ ism /= 2;
ilg = ism + 1;
thres1 = workl[ism];
thres2 = workl[ilg];
-
-
}
reord = 0;
}
i__1 = *ncv - 1;
- F77_FUNC(dcopy, DCOPY) (&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
+ F77_FUNC(dcopy, DCOPY)(&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(dcopy, DCOPY)(ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
- F77_FUNC(dsteqr, DSTEQR) ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &
- workl[iw], &ierr);
+ F77_FUNC(dsteqr, DSTEQR)
+ ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &workl[iw], &ierr);
if (ierr != 0)
{
goto L30;
}
-L20:
+ L20:
if (select[leftptr])
{
++leftptr;
-
}
else if (!select[rghtptr])
{
--rghtptr;
-
}
else
{
temp = workl[ihd + leftptr - 1];
workl[ihd + leftptr - 1] = workl[ihd + rghtptr - 1];
workl[ihd + rghtptr - 1] = temp;
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[
- iw], &c__1);
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[
- iq + *ncv * (leftptr - 1)], &c__1);
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr -
- 1)], &c__1);
+ F77_FUNC(dcopy, DCOPY)
+ (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[iw], &c__1);
+ F77_FUNC(dcopy, DCOPY)
+ (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[iq + *ncv * (leftptr - 1)], &c__1);
+ F77_FUNC(dcopy, DCOPY)
+ (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr - 1)], &c__1);
++leftptr;
--rghtptr;
-
}
if (leftptr < rghtptr)
goto L20;
}
-L30:
- ;
+ L30:;
}
- F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-
+ F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
}
else
{
- F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
-
+ F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
+ F77_FUNC(dcopy, DCOPY)(ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
}
if (!std::strncmp(type__, "REGULR", 6))
{
if (*rvec)
{
- F77_FUNC(dsesrt, DSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+ F77_FUNC(dsesrt, DSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
}
else
{
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(dcopy, DCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
}
-
}
else
{
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
+ F77_FUNC(dcopy, DCOPY)(ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
if (!std::strncmp(type__, "SHIFTI", 6))
{
i__1 = *ncv;
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd
- + k - 1] - 1.);
+ workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd + k - 1] - 1.);
}
}
else if (!std::strncmp(type__, "CAYLEY", 6))
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (
- workl[ihd + k - 1] - 1.);
+ workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (workl[ihd + k - 1] - 1.);
}
}
- F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
- F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
+ F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
+ F77_FUNC(dsortr, DSORTR)("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
if (*rvec)
{
- F77_FUNC(dsesrt, DSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+ F77_FUNC(dsesrt, DSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
}
else
{
- F77_FUNC(dcopy, DCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(dcopy, DCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
d__1 = bnorm2 / rnorm;
- F77_FUNC(dscal, DSCAL) (ncv, &d__1, &workl[ihb], &c__1);
- F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
+ F77_FUNC(dscal, DSCAL)(ncv, &d__1, &workl[ihb], &c__1);
+ F77_FUNC(dsortr, DSORTR)("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
}
-
}
if (*rvec && *howmny == 'A')
{
- F77_FUNC(dgeqr2, DGEQR2) (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
- &ierr);
+ F77_FUNC(dgeqr2, DGEQR2)
+ (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb], &ierr);
- F77_FUNC(dorm2r, DORM2R) ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &
- workl[iw + *ncv], &v[v_offset], ldv, &workd[*n + 1], &ierr);
- F77_FUNC(dlacpy, DLACPY) ("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
+ F77_FUNC(dorm2r, DORM2R)
+ ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &v[v_offset],
+ ldv, &workd[*n + 1], &ierr);
+ F77_FUNC(dlacpy, DLACPY)("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
i__1 = *ncv - 1;
for (j = 1; j <= i__1; ++j)
workl[ihb + j - 1] = 0.;
}
workl[ihb + *ncv - 1] = 1.;
- F77_FUNC(dorm2r, DORM2R) ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &
- workl[iw + *ncv], &workl[ihb], ncv, &temp, &ierr);
-
+ F77_FUNC(dorm2r, DORM2R)
+ ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
+ ncv, &temp, &ierr);
}
else if (*rvec && *howmny == 'S')
{
-
}
if (!std::strncmp(type__, "REGULR", 6) && *rvec)
{
workl[ihb + j - 1] = rnorm * std::abs(workl[ihb + j - 1]);
}
-
}
else if (std::strncmp(type__, "REGULR", 6) && *rvec)
{
- F77_FUNC(dscal, DSCAL) (ncv, &bnorm2, &workl[ihb], &c__1);
+ F77_FUNC(dscal, DSCAL)(ncv, &bnorm2, &workl[ihb], &c__1);
if (!std::strncmp(type__, "SHIFTI", 6))
{
for (k = 1; k <= i__1; ++k)
{
d__2 = workl[iw + k - 1];
- workl[ihb + k - 1] = std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+ workl[ihb + k - 1] = std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
}
-
}
else if (!std::strncmp(type__, "BUCKLE", 6))
{
for (k = 1; k <= i__1; ++k)
{
d__2 = workl[iw + k - 1] - 1.;
- workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+ workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
}
-
}
else if (!std::strncmp(type__, "CAYLEY", 6))
{
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihb + k - 1] = std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
-
+ workl[ihb + k - 1] =
+ std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
}
-
}
-
}
if (*rvec && (!std::strncmp(type__, "SHIFTI", 6) || !std::strncmp(type__, "CAYLEY", 6)))
{
workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / workl[iw + k];
}
-
}
else if (*rvec && !std::strncmp(type__, "BUCKLE", 6))
{
i__1 = nconv - 1;
for (k = 0; k <= i__1; ++k)
{
- workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] -
- 1.);
+ workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] - 1.);
}
-
}
if (std::strncmp(type__, "REGULR", 6))
{
- F77_FUNC(dger, DGER) (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[
- z_offset], ldz);
+ F77_FUNC(dger, DGER)
+ (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[z_offset], ldz);
}
L9000:
return;
-
}
-
-
-
/* Selected single precision arpack routines */
-static void
-F77_FUNC(sstqrb, SSTQRB) (int * n,
- float * d__,
- float * e,
- float * z__,
- float * work,
- int * info)
+static void F77_FUNC(sstqrb, SSTQRB)(int* n, float* d__, float* e, float* z__, float* work, int* info)
{
int i__1, i__2;
float d__1, d__2;
for (j = 1; j <= i__1; ++j)
{
z__[j] = 0.;
-
}
z__[*n] = 1.;
{
goto L30;
}
- if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m+1])) * eps)
+ if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m + 1])) * eps)
{
e[m] = 0.;
goto L30;
}
i__1 = lend - l + 1;
- anorm = F77_FUNC(slanst, SLANST) ("i", &i__1, &d__[l], &e[l]);
+ anorm = F77_FUNC(slanst, SLANST)("i", &i__1, &d__[l], &e[l]);
iscale = 0;
if (anorm == 0.)
{
{
iscale = 1;
i__1 = lend - l + 1;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n,
- info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n, info);
i__1 = lend - l;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n,
- info);
+ F77_FUNC(slascl, SLASCL)("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n, info);
}
else if (anorm < ssfmin)
{
iscale = 2;
i__1 = lend - l + 1;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n,
- info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n, info);
i__1 = lend - l;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n,
- info);
+ F77_FUNC(slascl, SLASCL)("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n, info);
}
if (std::abs(d__[lend]) < std::abs(d__[l]))
if (lend > l)
{
-L40:
+ L40:
if (l != lend)
{
lendm1 = lend - 1;
m = lend;
-L60:
+ L60:
if (m < lend)
{
e[m] = 0.;
{
if (icompz > 0)
{
- F77_FUNC(slaev2, SLAEV2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
+ F77_FUNC(slaev2, SLAEV2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
work[l] = c__;
work[*n - 1 + l] = s;
}
else
{
- F77_FUNC(slae2, SLAE2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
+ F77_FUNC(slae2, SLAE2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
}
d__[l] = rt1;
d__[l + 1] = rt2;
e[l] = 0.;
- l += 2;
+ l += 2;
if (l <= lend)
{
goto L40;
++jtot;
g = (d__[l + 1] - p) / (e[l] * 2.);
- r__ = F77_FUNC(slapy2, SLAPY2) (&g, &c_b31);
- g = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__ ));
+ r__ = F77_FUNC(slapy2, SLAPY2)(&g, &c_b31);
+ g = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__));
s = 1.;
c__ = 1.;
{
f = s * e[i__];
b = c__ * e[i__];
- F77_FUNC(slartg, SLARTG) (&g, &f, &c__, &s, &r__);
+ F77_FUNC(slartg, SLARTG)(&g, &f, &c__, &s, &r__);
if (i__ != m - 1)
{
e[i__ + 1] = r__;
work[i__] = c__;
work[*n - 1 + i__] = -s;
}
-
}
if (icompz > 0)
{
mm = m - l + 1;
- F77_FUNC(slasr, SLASR) ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &
- z__[l], &c__1);
+ F77_FUNC(slasr, SLASR)
+ ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &z__[l], &c__1);
}
d__[l] -= p;
- e[l] = g;
+ e[l] = g;
goto L40;
-L80:
+ L80:
d__[l] = p;
++l;
goto L40;
}
goto L140;
-
}
else
{
-L90:
+ L90:
if (l != lend)
{
lendp1 = lend + 1;
{
d__2 = std::abs(e[m - 1]);
tst = d__2 * d__2;
- if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m- 1]) + safmin)
+ if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m - 1]) + safmin)
{
goto L110;
}
m = lend;
-L110:
+ L110:
if (m > lend)
{
e[m - 1] = 0.;
{
if (icompz > 0)
{
- F77_FUNC(slaev2, SLAEV2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s)
- ;
+ F77_FUNC(slaev2, SLAEV2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s);
tst = z__[l];
z__[l] = c__ * tst - s * z__[l - 1];
}
else
{
- F77_FUNC(slae2, SLAE2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
+ F77_FUNC(slae2, SLAE2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
}
d__[l - 1] = rt1;
d__[l] = rt2;
e[l - 1] = 0.;
- l += -2;
+ l += -2;
if (l >= lend)
{
goto L90;
g = (d__[l - 1] - p) / (e[l - 1] * 2.);
- r__ = F77_FUNC(slapy2, SLAPY2) (&g, &c_b31);
- g = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__ ));
+ r__ = F77_FUNC(slapy2, SLAPY2)(&g, &c_b31);
+ g = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__));
s = 1.;
c__ = 1.;
{
f = s * e[i__];
b = c__ * e[i__];
- F77_FUNC(slartg, SLARTG) (&g, &f, &c__, &s, &r__);
+ F77_FUNC(slartg, SLARTG)(&g, &f, &c__, &s, &r__);
if (i__ != m)
{
e[i__ - 1] = r__;
work[i__] = c__;
work[*n - 1 + i__] = s;
}
-
}
if (icompz > 0)
{
mm = l - m + 1;
- F77_FUNC(slasr, SLASR) ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &
- z__[m], &c__1);
+ F77_FUNC(slasr, SLASR)
+ ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &z__[m], &c__1);
}
d__[l] -= p;
- e[lm1] = g;
+ e[lm1] = g;
goto L90;
-L130:
+ L130:
d__[l] = p;
--l;
goto L90;
}
goto L140;
-
}
L140:
if (iscale == 1)
{
i__1 = lendsv - lsv + 1;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv],
- n, info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv], n, info);
i__1 = lendsv - lsv;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n,
- info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n, info);
}
else if (iscale == 2)
{
i__1 = lendsv - lsv + 1;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv],
- n, info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv], n, info);
i__1 = lendsv - lsv;
- F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n,
- info);
+ F77_FUNC(slascl, SLASCL)
+ ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n, info);
}
if (jtot < nmaxit)
if (icompz == 0)
{
- F77_FUNC(slasrt, SLASRT) ("i", n, &d__[1], info);
-
+ F77_FUNC(slasrt, SLASRT)("i", n, &d__[1], info);
}
else
{
L190:
return;
-
}
-static void
-F77_FUNC(sgetv0, SGETV0) (int * ido,
- const char * bmat,
- int gmx_unused * itry,
- int * initv,
- int * n,
- int * j,
- float * v,
- int * ldv,
- float * resid,
- float * rnorm,
- int * ipntr,
- float * workd,
- int * iwork,
- int * ierr)
+static void F77_FUNC(sgetv0, SGETV0)(int* ido,
+ const char* bmat,
+ int gmx_unused* itry,
+ int* initv,
+ int* n,
+ int* j,
+ float* v,
+ int* ldv,
+ float* resid,
+ float* rnorm,
+ int* ipntr,
+ float* workd,
+ int* iwork,
+ int* ierr)
{
int c__1 = 1;
float c_b22 = 1.;
float c_b27 = -1.;
int v_dim1, v_offset, i__1;
- int jj;
- int idist;
+ int jj;
+ int idist;
--workd;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--ipntr;
--iwork;
if (!(*initv))
{
idist = 2;
- F77_FUNC(slarnv, SLARNV) (&idist, &iwork[1], n, &resid[1]);
+ F77_FUNC(slarnv, SLARNV)(&idist, &iwork[1], n, &resid[1]);
}
if (*bmat == 'G')
{
ipntr[1] = 1;
ipntr[2] = *n + 1;
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
*ido = -1;
goto L9000;
}
iwork[5] = 1;
if (*bmat == 'G')
{
- F77_FUNC(scopy, SCOPY) (n, &workd[*n + 1], &c__1, &resid[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &workd[*n + 1], &c__1, &resid[1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L20:
iwork[5] = 0;
if (*bmat == 'G')
{
- workd[*n * 3 + 4] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ workd[*n * 3 + 4] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
workd[*n * 3 + 4] = std::sqrt(std::abs(workd[*n * 3 + 4]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 4] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 4] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
*rnorm = workd[*n * 3 + 4];
L30:
i__1 = *j - 1;
- F77_FUNC(sgemv, SGEMV) ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24,
- &workd[*n + 1], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24, &workd[*n + 1], &c__1);
i__1 = *j - 1;
- F77_FUNC(sgemv, SGEMV) ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &
- c_b22, &resid[1], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &c_b22, &resid[1], &c__1);
if (*bmat == 'G')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L40:
if (*bmat == 'G')
{
- *rnorm = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ *rnorm = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
*rnorm = std::sqrt(std::abs(*rnorm));
}
else if (*bmat == 'I')
{
- *rnorm = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ *rnorm = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
if (*rnorm > workd[*n * 3 + 4] * .717F)
}
-
-
-
-static void
-F77_FUNC(ssapps, SSAPPS) (int * n,
- int * kev,
- int * np,
- float * shift,
- float * v,
- int * ldv,
- float * h__,
- int * ldh,
- float * resid,
- float * q,
- int * ldq,
- float * workd)
+static void F77_FUNC(ssapps, SSAPPS)(int* n,
+ int* kev,
+ int* np,
+ float* shift,
+ float* v,
+ int* ldv,
+ float* h__,
+ int* ldh,
+ float* resid,
+ float* q,
+ int* ldq,
+ float* workd)
{
float c_b4 = 0.;
float c_b5 = 1.;
float c_b14 = -1.;
int c__1 = 1;
- int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
- i__3, i__4;
+ int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3, i__4;
float c__, f, g;
int i__, j;
float r__, s, a1, a2, a3, a4;
--shift;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
q_dim1 = *ldq;
q_offset = 1 + q_dim1;
- q -= q_offset;
+ q -= q_offset;
epsmch = GMX_FLOAT_EPS;
itop = 1;
kplusp = *kev + *np;
- F77_FUNC(slaset, SLASET) ("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
+ F77_FUNC(slaset, SLASET)("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
if (*np == 0)
{
istart = itop;
-L20:
+ L20:
i__2 = kplusp - 1;
for (i__ = istart; i__ <= i__2; ++i__)
{
- big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__ + 1 + (h_dim1*2)]);
+ big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
if (h__[i__ + 1 + h_dim1] <= epsmch * big)
{
h__[i__ + 1 + h_dim1] = 0.;
}
}
iend = kplusp;
-L40:
+ L40:
if (istart < iend)
{
f = h__[istart + (h_dim1 << 1)] - shift[jj];
g = h__[istart + 1 + h_dim1];
- F77_FUNC(slartg, SLARTG) (&f, &g, &c__, &s, &r__);
-
- a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 +
- h_dim1];
- a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (
- h_dim1 << 1)];
- a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 +
- h_dim1];
- a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 <<
- 1)];
+ F77_FUNC(slartg, SLARTG)(&f, &g, &c__, &s, &r__);
+
+ a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 + h_dim1];
+ a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (h_dim1 << 1)];
+ a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 + h_dim1];
+ a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 << 1)];
h__[istart + (h_dim1 << 1)] = c__ * a1 + s * a2;
h__[istart + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
h__[istart + 1 + h_dim1] = c__ * a3 + s * a4;
i__2 = (i__3 < kplusp) ? i__3 : kplusp;
for (j = 1; j <= i__2; ++j)
{
- a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) *
- q_dim1];
- q[j + (istart + 1) * q_dim1] = -s * q[j + istart * q_dim1] +
- c__ * q[j + (istart + 1) * q_dim1];
+ a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) * q_dim1];
+ q[j + (istart + 1) * q_dim1] =
+ -s * q[j + istart * q_dim1] + c__ * q[j + (istart + 1) * q_dim1];
q[j + istart * q_dim1] = a1;
-
}
i__2 = iend - 1;
g = s * h__[i__ + 1 + h_dim1];
h__[i__ + 1 + h_dim1] = c__ * h__[i__ + 1 + h_dim1];
- F77_FUNC(slartg, SLARTG) (&f, &g, &c__, &s, &r__);
+ F77_FUNC(slartg, SLARTG)(&f, &g, &c__, &s, &r__);
if (r__ < 0.)
{
h__[i__ + h_dim1] = r__;
- a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 +
- h_dim1];
- a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1
- << 1)];
- a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)
- ];
- a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 +
- h_dim1];
+ a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 + h_dim1];
+ a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1 << 1)];
+ a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)];
+ a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 + h_dim1];
h__[i__ + (h_dim1 << 1)] = c__ * a1 + s * a2;
h__[i__ + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
i__3 = (i__4 < kplusp) ? i__4 : kplusp;
for (j = 1; j <= i__3; ++j)
{
- a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) *
- q_dim1];
- q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] +
- c__ * q[j + (i__ + 1) * q_dim1];
+ a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) * q_dim1];
+ q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] + c__ * q[j + (i__ + 1) * q_dim1];
q[j + i__ * q_dim1] = a1;
}
-
}
-
}
istart = iend + 1;
if (h__[iend + h_dim1] < 0.)
{
h__[iend + h_dim1] = -h__[iend + h_dim1];
- F77_FUNC(sscal, SSCAL) (&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
+ F77_FUNC(sscal, SSCAL)(&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
}
if (iend < kplusp)
++itop;
}
-L90:
- ;
+ L90:;
}
i__1 = kplusp - 1;
for (i__ = itop; i__ <= i__1; ++i__)
{
- big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__+ 1 + (h_dim1*2)]);
+ big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
if (h__[i__ + 1 + h_dim1] <= epsmch * big)
{
h__[i__ + 1 + h_dim1] = 0.;
}
-
}
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(sgemv, SGEMV) ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) *
- q_dim1 + 1], &c__1, &c_b4, &workd[*n + 1], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) * q_dim1 + 1], &c__1, &c_b4,
+ &workd[*n + 1], &c__1);
}
i__1 = *kev;
for (i__ = 1; i__ <= i__1; ++i__)
{
i__2 = kplusp - i__ + 1;
- F77_FUNC(sgemv, SGEMV) ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) *
- q_dim1 + 1], &c__1, &c_b4, &workd[1], &c__1);
- F77_FUNC(scopy, SCOPY) (n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &
- c__1);
-
+ F77_FUNC(sgemv, SGEMV)
+ ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) * q_dim1 + 1], &c__1, &c_b4,
+ &workd[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &c__1);
}
- F77_FUNC(slacpy, SLACPY) ("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
+ F77_FUNC(slacpy, SLACPY)("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(scopy, SCOPY) (n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
}
- F77_FUNC(sscal, SSCAL) (n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
+ F77_FUNC(sscal, SSCAL)(n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
if (h__[*kev + 1 + h_dim1] > 0.)
{
- F77_FUNC(saxpy, SAXPY) (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1,
- &resid[1], &c__1);
+ F77_FUNC(saxpy, SAXPY)
+ (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1, &resid[1], &c__1);
}
-
L9000:
return;
-
}
-
-static void
-F77_FUNC(ssortr, SSORTR) (const char * which,
- int * apply,
- int * n,
- float * x1,
- float * x2)
+static void F77_FUNC(ssortr, SSORTR)(const char* which, int* apply, int* n, float* x1, float* x2)
{
- int i__1;
+ int i__1;
int i__, j, igap;
float temp;
-
igap = *n / 2;
if (!std::strncmp(which, "SA", 2))
{
-L10:
+ L10:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L20:
+ L20:
if (j < 0)
{
}
j -= igap;
goto L20;
-L30:
- ;
+ L30:;
}
igap /= 2;
goto L10;
-
}
else if (!std::strncmp(which, "SM", 2))
{
-L40:
+ L40:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L50:
+ L50:
if (j < 0)
{
}
j -= igap;
goto L50;
-L60:
- ;
+ L60:;
}
igap /= 2;
goto L40;
-
}
else if (!std::strncmp(which, "LA", 2))
{
-L70:
+ L70:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L80:
+ L80:
if (j < 0)
{
}
j -= igap;
goto L80;
-L90:
- ;
+ L90:;
}
igap /= 2;
goto L70;
-
}
else if (!std::strncmp(which, "LM", 2))
{
-L100:
+ L100:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L110:
+ L110:
if (j < 0)
{
}
j -= igap;
goto L110;
-L120:
- ;
+ L120:;
}
igap /= 2;
goto L100;
L9000:
return;
-
}
-
-
-static void
-F77_FUNC(ssesrt, SSESRT) (const char * which,
- int * apply,
- int * n,
- float * x,
- int * na,
- float * a,
- int * lda)
+static void F77_FUNC(ssesrt,
+ SSESRT)(const char* which, int* apply, int* n, float* x, int* na, float* a, int* lda)
{
- int a_dim1, a_offset, i__1;
- int c__1 = 1;
+ int a_dim1, a_offset, i__1;
+ int c__1 = 1;
int i__, j, igap;
float temp;
a_dim1 = *lda;
a_offset = 1 + a_dim1 * 0;
- a -= a_offset;
+ a -= a_offset;
igap = *n / 2;
if (!std::strncmp(which, "SA", 2))
{
-L10:
+ L10:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L20:
+ L20:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L20;
-L30:
- ;
+ L30:;
}
igap /= 2;
goto L10;
-
}
else if (!std::strncmp(which, "SM", 2))
{
-L40:
+ L40:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L50:
+ L50:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L50;
-L60:
- ;
+ L60:;
}
igap /= 2;
goto L40;
-
}
else if (!std::strncmp(which, "LA", 2))
{
-L70:
+ L70:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L80:
+ L80:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L80;
-L90:
- ;
+ L90:;
}
igap /= 2;
goto L70;
-
}
else if (!std::strncmp(which, "LM", 2))
{
-L100:
+ L100:
if (igap == 0)
{
goto L9000;
for (i__ = igap; i__ <= i__1; ++i__)
{
j = i__ - igap;
-L110:
+ L110:
if (j < 0)
{
x[j + igap] = temp;
if (*apply)
{
- F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
- a_dim1 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
}
}
else
}
j -= igap;
goto L110;
-L120:
- ;
+ L120:;
}
igap /= 2;
goto L100;
L9000:
return;
-
}
-
-
-static void
-F77_FUNC(ssgets, SSGETS) (int * ishift,
- const char * which,
- int * kev,
- int * np,
- float * ritz,
- float * bounds,
- float * shifts)
+static void F77_FUNC(ssgets,
+ SSGETS)(int* ishift, const char* which, int* kev, int* np, float* ritz, float* bounds, float* shifts)
{
int c__1 = 1;
int i__1, i__2;
if (!std::strncmp(which, "BE", 2))
{
i__1 = *kev + *np;
- F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
+ F77_FUNC(ssortr, SSORTR)("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
kevd2 = *kev / 2;
if (*kev > 1)
{
i__1 = (kevd2 < *np) ? kevd2 : *np;
i__2 = (kevd2 > *np) ? kevd2 : *np;
- F77_FUNC(sswap, SSWAP) (&i__1, &ritz[1], &c__1,
- &ritz[i__2 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)(&i__1, &ritz[1], &c__1, &ritz[i__2 + 1], &c__1);
i__1 = (kevd2 < *np) ? kevd2 : *np;
i__2 = (kevd2 > *np) ? kevd2 : *np;
- F77_FUNC(sswap, SSWAP) (&i__1, &bounds[1], &c__1,
- &bounds[i__2 + 1], &c__1);
+ F77_FUNC(sswap, SSWAP)(&i__1, &bounds[1], &c__1, &bounds[i__2 + 1], &c__1);
}
-
}
else
{
i__1 = *kev + *np;
- F77_FUNC(ssortr, SSORTR) (which, &c__1, &i__1, &ritz[1], &bounds[1]);
+ F77_FUNC(ssortr, SSORTR)(which, &c__1, &i__1, &ritz[1], &bounds[1]);
}
if (*ishift == 1 && *np > 0)
{
- F77_FUNC(ssortr, SSORTR) ("SM", &c__1, np, &bounds[1], &ritz[1]);
- F77_FUNC(scopy, SCOPY) (np, &ritz[1], &c__1, &shifts[1], &c__1);
+ F77_FUNC(ssortr, SSORTR)("SM", &c__1, np, &bounds[1], &ritz[1]);
+ F77_FUNC(scopy, SCOPY)(np, &ritz[1], &c__1, &shifts[1], &c__1);
}
}
-
-static void
-F77_FUNC(ssconv, SSCONV) (int * n,
- float * ritz,
- float * bounds,
- float * tol,
- int * nconv)
+static void F77_FUNC(ssconv, SSCONV)(int* n, float* ritz, float* bounds, float* tol, int* nconv)
{
- float c_b3 = 2/3.;
+ float c_b3 = 2 / 3.;
int i__1;
float d__2, d__3;
}
-static void
-F77_FUNC(sseigt, SSEIGT) (float * rnorm,
- int * n,
- float * h__,
- int * ldh,
- float * eig,
- float * bounds,
- float * workl,
- int * ierr)
+static void F77_FUNC(
+ sseigt,
+ SSEIGT)(float* rnorm, int* n, float* h__, int* ldh, float* eig, float* bounds, float* workl, int* ierr)
{
int c__1 = 1;
int h_dim1, h_offset, i__1;
--eig;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
- F77_FUNC(scopy, SCOPY) (n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
i__1 = *n - 1;
- F77_FUNC(scopy, SCOPY) (&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
- F77_FUNC(sstqrb, SSTQRB) (n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
+ F77_FUNC(scopy, SCOPY)(&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
+ F77_FUNC(sstqrb, SSTQRB)(n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
if (*ierr != 0)
{
goto L9000;
for (k = 1; k <= i__1; ++k)
{
bounds[k] = *rnorm * std::abs(bounds[k]);
-
}
}
-
-
-static void
-F77_FUNC(ssaitr, SSAITR) (int * ido,
- const char * bmat,
- int * n,
- int * k,
- int * np,
- int * mode,
- float * resid,
- float * rnorm,
- float * v,
- int * ldv,
- float * h__,
- int * ldh,
- int * ipntr,
- float * workd,
- int * iwork,
- int * info)
+static void F77_FUNC(ssaitr, SSAITR)(int* ido,
+ const char* bmat,
+ int* n,
+ int* k,
+ int* np,
+ int* mode,
+ float* resid,
+ float* rnorm,
+ float* v,
+ int* ldv,
+ float* h__,
+ int* ldh,
+ int* ipntr,
+ float* workd,
+ int* iwork,
+ int* info)
{
int c__0 = 0;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
--ipntr;
--iwork;
minval = GMX_FLOAT_MIN;
*ido = 0;
L30:
- F77_FUNC(sgetv0, sgetv0) (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv,
- &resid[1], rnorm, &ipntr[1], &workd[1], &iwork[21], &iwork[7]);
+ F77_FUNC(sgetv0, sgetv0)
+ (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv, &resid[1], rnorm, &ipntr[1],
+ &workd[1], &iwork[21], &iwork[7]);
if (*ido != 99)
{
goto L9000;
L40:
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
if (*rnorm >= safmin)
{
temp1 = 1. / *rnorm;
- F77_FUNC(sscal, SSCAL) (n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
- F77_FUNC(sscal, SSCAL) (n, &temp1, &workd[iwork[8]], &c__1);
+ F77_FUNC(sscal, SSCAL)(n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
+ F77_FUNC(sscal, SSCAL)(n, &temp1, &workd[iwork[8]], &c__1);
}
else
{
- F77_FUNC(slascl, SLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] *
- v_dim1 + 1], n, &infol);
- F77_FUNC(slascl, SLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[
- 8]], n, &infol);
+ F77_FUNC(slascl, SLASCL)
+ ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] * v_dim1 + 1], n, &infol);
+ F77_FUNC(slascl, SLASCL)
+ ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[8]], n, &infol);
}
iwork[5] = 1;
- F77_FUNC(scopy, SCOPY) (n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
ipntr[1] = iwork[10];
ipntr[2] = iwork[9];
ipntr[3] = iwork[8];
iwork[5] = 0;
- F77_FUNC(scopy, SCOPY) (n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
if (*mode == 2)
{
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L60:
if (*mode == 2)
{
- workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[10]], &
- c__1);
+ workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[10]], &c__1);
workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
}
else if (*bmat == 'G')
{
- workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
- c__1);
+ workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 3] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 3] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
if (*mode != 2)
{
- F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]],
- &c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
}
else
{
- F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]
- ], &c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
}
- F77_FUNC(sgemv, SGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
- c__1, &c_b18, &resid[1], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
h__[iwork[12] + (h_dim1 << 1)] = workd[iwork[9] + iwork[12] - 1];
if (iwork[12] == 1 || iwork[4] == 1)
if (*bmat == 'G')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
ipntr[1] = iwork[9];
ipntr[2] = iwork[8];
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L70:
if (*bmat == 'G')
{
- *rnorm = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ *rnorm = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
*rnorm = std::sqrt(std::abs(*rnorm));
}
else if (*bmat == 'I')
{
- *rnorm = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ *rnorm = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
if (*rnorm > workd[*n * 3 + 3] * .717F)
L80:
- F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &
- c__1, &c_b42, &workd[iwork[9]], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+ &workd[iwork[9]], &c__1);
- F77_FUNC(sgemv, SGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
- c__1, &c_b18, &resid[1], &c__1);
+ F77_FUNC(sgemv, SGEMV)
+ ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
if (iwork[12] == 1 || iwork[4] == 1)
{
iwork[3] = 1;
if (*bmat == 'G')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
ipntr[1] = iwork[9];
ipntr[2] = iwork[8];
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
}
L90:
if (*bmat == 'G')
{
- workd[*n * 3 + 2] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
- c__1);
+ workd[*n * 3 + 2] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
workd[*n * 3 + 2] = std::sqrt(std::abs(workd[*n * 3 + 2]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 2] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 2] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
{
*rnorm = workd[*n * 3 + 2];
-
}
else
{
h__[iwork[12] + h_dim1] = -h__[iwork[12] + h_dim1];
if (iwork[12] < *k + *np)
{
- F77_FUNC(sscal, SSCAL) (n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
+ F77_FUNC(sscal, SSCAL)(n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
}
else
{
- F77_FUNC(sscal, SSCAL) (n, &c_b50, &resid[1], &c__1);
+ F77_FUNC(sscal, SSCAL)(n, &c_b50, &resid[1], &c__1);
}
}
}
-
-
-
-
-static void
-F77_FUNC(ssaup2, SSAUP2) (int * ido,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- int * np,
- float * tol,
- float * resid,
- int * mode,
- int gmx_unused * iupd,
- int * ishift,
- int * mxiter,
- float * v,
- int * ldv,
- float * h__,
- int * ldh,
- float * ritz,
- float * bounds,
- float * q,
- int * ldq,
- float * workl,
- int * ipntr,
- float * workd,
- int * iwork,
- int * info)
+static void F77_FUNC(ssaup2, SSAUP2)(int* ido,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ int* np,
+ float* tol,
+ float* resid,
+ int* mode,
+ int gmx_unused* iupd,
+ int* ishift,
+ int* mxiter,
+ float* v,
+ int* ldv,
+ float* h__,
+ int* ldh,
+ float* ritz,
+ float* bounds,
+ float* q,
+ int* ldq,
+ float* workl,
+ int* ipntr,
+ float* workd,
+ int* iwork,
+ int* info)
{
- float c_b3 = 2/3.;
+ float c_b3 = 2 / 3.;
int c__1 = 1;
int c__0 = 0;
- int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
- i__3;
+ int h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3;
float d__2, d__3;
int j;
float eps23;
--ritz;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
h_dim1 = *ldh;
h_offset = 1 + h_dim1;
- h__ -= h_offset;
+ h__ -= h_offset;
q_dim1 = *ldq;
q_offset = 1 + q_dim1;
- q -= q_offset;
+ q -= q_offset;
--ipntr;
--iwork;
eps23 = GMX_FLOAT_EPS;
if (iwork[2] == 1)
{
- F77_FUNC(sgetv0, SGETV0) (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &
- resid[1], &workd[*n * 3 + 1], &ipntr[1], &workd[1], &iwork[41],
- info);
+ F77_FUNC(sgetv0, SGETV0)
+ (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &resid[1], &workd[*n * 3 + 1],
+ &ipntr[1], &workd[1], &iwork[41], info);
if (*ido != 99)
{
goto L100;
}
- F77_FUNC(ssaitr, SSAITR) (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 +
- 1], &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
- &iwork[21], info);
+ F77_FUNC(ssaitr, SSAITR)
+ (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv,
+ &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[21], info);
if (*ido != 99)
{
L20:
iwork[4] = 1;
- F77_FUNC(ssaitr, SSAITR) (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[
- v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[
- 21], info);
+ F77_FUNC(ssaitr, SSAITR)
+ (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv, &h__[h_offset],
+ ldh, &ipntr[1], &workd[1], &iwork[21], info);
if (*ido != 99)
{
}
iwork[4] = 0;
- F77_FUNC(sseigt, SSEIGT) (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &
- bounds[1], &workl[1], &ierr);
+ F77_FUNC(sseigt, SSEIGT)
+ (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &bounds[1], &workl[1], &ierr);
if (ierr != 0)
{
goto L1200;
}
- F77_FUNC(scopy, SCOPY) (&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
- F77_FUNC(scopy, SCOPY) (&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
*nev = iwork[9];
*np = iwork[10];
- F77_FUNC(ssgets, SSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+ F77_FUNC(ssgets, SSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
- F77_FUNC(scopy, SCOPY) (nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
- F77_FUNC(ssconv, SSCONV) (nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
+ F77_FUNC(scopy, SCOPY)(nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
+ F77_FUNC(ssconv, SSCONV)(nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
nptemp = *np;
{
std::strncpy(wprime, "SA", 2);
- F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
+ F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
nevd2 = *nev / 2;
nevm2 = *nev - nevd2;
if (*nev > 1)
{
i__1 = (nevd2 < *np) ? nevd2 : *np;
i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np + 1;
- F77_FUNC(sswap, SSWAP) (&i__1, &ritz[nevm2 + 1], &c__1,
- &ritz[((i__2 > i__3) ? i__2 : i__3)],
- &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (&i__1, &ritz[nevm2 + 1], &c__1, &ritz[((i__2 > i__3) ? i__2 : i__3)], &c__1);
i__1 = (nevd2 < *np) ? nevd2 : *np;
i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np;
- F77_FUNC(sswap, SSWAP) (&i__1, &bounds[nevm2 + 1], &c__1,
- &bounds[((i__2 > i__3) ? i__2 : i__3) + 1],
- &c__1);
+ F77_FUNC(sswap, SSWAP)
+ (&i__1, &bounds[nevm2 + 1], &c__1, &bounds[((i__2 > i__3) ? i__2 : i__3) + 1], &c__1);
}
-
}
else
{
std::strncpy(wprime, "LA", 2);
}
- F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
-
+ F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
}
i__1 = iwork[9];
for (j = 1; j <= i__1; ++j)
{
- d__2 = eps23;
- d__3 = std::abs(ritz[j]);
- temp = (d__2 > d__3) ? d__2 : d__3;
+ d__2 = eps23;
+ d__3 = std::abs(ritz[j]);
+ temp = (d__2 > d__3) ? d__2 : d__3;
bounds[j] /= temp;
}
std::strncpy(wprime, "LA", 2);
- F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
+ F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
i__1 = iwork[9];
for (j = 1; j <= i__1; ++j)
{
- d__2 = eps23;
- d__3 = std::abs(ritz[j]);
- temp = (d__2 > d__3) ? d__2 : d__3;
+ d__2 = eps23;
+ d__3 = std::abs(ritz[j]);
+ temp = (d__2 > d__3) ? d__2 : d__3;
bounds[j] *= temp;
}
{
std::strncpy(wprime, "LA", 2);
- F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+ F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
}
else
{
- F77_FUNC(ssortr, SSORTR) (which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+ F77_FUNC(ssortr, SSORTR)(which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
}
h__[h_dim1 + 1] = workd[*n * 3 + 1];
*np = iwork[8];
goto L1100;
-
}
else if (iwork[8] < *nev && *ishift == 1)
{
nevbef = *nev;
- i__1 = iwork[8], i__2 = *np / 2;
- *nev += (i__1 < i__2) ? i__1 : i__2;
+ i__1 = iwork[8], i__2 = *np / 2;
+ *nev += (i__1 < i__2) ? i__1 : i__2;
if (*nev == 1 && iwork[7] >= 6)
{
*nev = iwork[7] / 2;
if (nevbef < *nev)
{
- F77_FUNC(ssgets, SSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+ F77_FUNC(ssgets, SSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
}
-
}
if (*ishift == 0)
{
- F77_FUNC(scopy, SCOPY) (np, &workl[1], &c__1, &ritz[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(np, &workl[1], &c__1, &ritz[1], &c__1);
}
- F77_FUNC(ssapps, SSAPPS) (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &
- resid[1], &q[q_offset], ldq, &workd[1]);
+ F77_FUNC(ssapps, SSAPPS)
+ (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &resid[1], &q[q_offset], ldq,
+ &workd[1]);
iwork[1] = 1;
if (*bmat == 'G')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
ipntr[1] = *n + 1;
ipntr[2] = 1;
*ido = 2;
}
else if (*bmat == 'I')
{
- F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
}
L100:
if (*bmat == 'G')
{
- workd[*n * 3 + 1] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+ workd[*n * 3 + 1] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
workd[*n * 3 + 1] = std::sqrt(std::abs(workd[*n * 3 + 1]));
}
else if (*bmat == 'I')
{
- workd[*n * 3 + 1] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+ workd[*n * 3 + 1] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
}
iwork[1] = 0;
L9000:
return;
-
}
-
-void
-F77_FUNC(ssaupd, SSAUPD) (int * ido,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- float * tol,
- float * resid,
- int * ncv,
- float * v,
- int * ldv,
- int * iparam,
- int * ipntr,
- float * workd,
- int * iwork,
- float * workl,
- int * lworkl,
- int * info)
+void F77_FUNC(ssaupd, SSAUPD)(int* ido,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ float* tol,
+ float* resid,
+ int* ncv,
+ float* v,
+ int* ldv,
+ int* iparam,
+ int* ipntr,
+ float* workd,
+ int* iwork,
+ float* workl,
+ int* lworkl,
+ int* info)
{
int v_dim1, v_offset, i__1, i__2;
int j;
--resid;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--iparam;
--ipntr;
--iwork;
{
iwork[2] = -4;
}
- if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
- std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
- std::strncmp(which, "BE", 2))
+ if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+ && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
{
iwork[2] = -5;
}
ipntr[11] = iwork[7];
}
- F77_FUNC(ssaup2, SSAUP2) (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &
- iwork[11], &iwork[6], &iwork[5], &iwork[10], &v[v_offset], ldv, &
- workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]], &
- workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1],
- &iwork[21], info);
+ F77_FUNC(ssaup2, SSAUP2)
+ (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &iwork[11], &iwork[6], &iwork[5],
+ &iwork[10], &v[v_offset], ldv, &workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]],
+ &workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1], &iwork[21], info);
if (*ido == 3)
{
L9000:
return;
-
}
-
-void
-F77_FUNC(sseupd, SSEUPD) (int * rvec,
- const char * howmny,
- int * select,
- float * d__,
- float * z__,
- int * ldz,
- float * sigma,
- const char * bmat,
- int * n,
- const char * which,
- int * nev,
- float * tol,
- float * resid,
- int * ncv,
- float * v,
- int * ldv,
- int * iparam,
- int * ipntr,
- float * workd,
- float * workl,
- int * lworkl,
- int * info)
+void F77_FUNC(sseupd, SSEUPD)(int* rvec,
+ const char* howmny,
+ int* select,
+ float* d__,
+ float* z__,
+ int* ldz,
+ float* sigma,
+ const char* bmat,
+ int* n,
+ const char* which,
+ int* nev,
+ float* tol,
+ float* resid,
+ int* ncv,
+ float* v,
+ int* ldv,
+ int* iparam,
+ int* ipntr,
+ float* workd,
+ float* workl,
+ int* lworkl,
+ int* info)
{
- float c_b21 = 2/3.;
+ float c_b21 = 2 / 3.;
int c__1 = 1;
float c_b102 = 1.;
int v_dim1, v_offset, z_dim1, z_offset, i__1;
--resid;
z_dim1 = *ldz;
z_offset = 1 + z_dim1;
- z__ -= z_offset;
+ z__ -= z_offset;
--d__;
--select;
v_dim1 = *ldv;
v_offset = 1 + v_dim1;
- v -= v_offset;
+ v -= v_offset;
--iparam;
--ipntr;
--workl;
{
ierr = -3;
}
- if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
- std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
- std::strncmp(which, "BE", 2))
+ if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+ && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
{
ierr = -5;
}
{
ierr = -6;
}
- if (*howmny != 'A' && *howmny != 'P' &&
- *howmny != 'S' && *rvec)
+ if (*howmny != 'A' && *howmny != 'P' && *howmny != 'S' && *rvec)
{
ierr = -15;
}
}
else if (*bmat == 'G')
{
- bnorm2 = F77_FUNC(snrm2, SNRM2) (n, &workd[1], &c__1);
+ bnorm2 = F77_FUNC(snrm2, SNRM2)(n, &workd[1], &c__1);
}
if (*rvec)
{
- if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2) ||
- !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
- {
-
- }
+ if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2)
+ || !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
+ {}
else if (!std::strncmp(which, "BE", 2))
{
- ism = (*nev > nconv) ? *nev : nconv;
- ism /= 2;
+ ism = (*nev > nconv) ? *nev : nconv;
+ ism /= 2;
ilg = ism + 1;
thres1 = workl[ism];
thres2 = workl[ilg];
-
-
}
reord = 0;
}
i__1 = *ncv - 1;
- F77_FUNC(scopy, SCOPY) (&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
- F77_FUNC(scopy, SCOPY) (ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
+ F77_FUNC(scopy, SCOPY)(&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(scopy, SCOPY)(ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
- F77_FUNC(ssteqr, SSTEQR) ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &
- workl[iw], &ierr);
+ F77_FUNC(ssteqr, SSTEQR)
+ ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &workl[iw], &ierr);
if (ierr != 0)
{
goto L30;
}
-L20:
+ L20:
if (select[leftptr])
{
++leftptr;
-
}
else if (!select[rghtptr])
{
--rghtptr;
-
}
else
{
temp = workl[ihd + leftptr - 1];
workl[ihd + leftptr - 1] = workl[ihd + rghtptr - 1];
workl[ihd + rghtptr - 1] = temp;
- F77_FUNC(scopy, SCOPY) (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[
- iw], &c__1);
- F77_FUNC(scopy, SCOPY) (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[
- iq + *ncv * (leftptr - 1)], &c__1);
- F77_FUNC(scopy, SCOPY) (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr -
- 1)], &c__1);
+ F77_FUNC(scopy, SCOPY)
+ (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[iw], &c__1);
+ F77_FUNC(scopy, SCOPY)
+ (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[iq + *ncv * (leftptr - 1)], &c__1);
+ F77_FUNC(scopy, SCOPY)
+ (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr - 1)], &c__1);
++leftptr;
--rghtptr;
-
}
if (leftptr < rghtptr)
goto L20;
}
-L30:
- ;
+ L30:;
}
- F77_FUNC(scopy, SCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-
+ F77_FUNC(scopy, SCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
}
else
{
- F77_FUNC(scopy, SCOPY) (&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
- F77_FUNC(scopy, SCOPY) (ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
-
+ F77_FUNC(scopy, SCOPY)(&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
+ F77_FUNC(scopy, SCOPY)(ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
}
if (!std::strncmp(type__, "REGULR", 6))
{
if (*rvec)
{
- F77_FUNC(ssesrt, SSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+ F77_FUNC(ssesrt, SSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
}
else
{
- F77_FUNC(scopy, SCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(scopy, SCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
}
-
}
else
{
- F77_FUNC(scopy, SCOPY) (ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
+ F77_FUNC(scopy, SCOPY)(ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
if (!std::strncmp(type__, "SHIFTI", 6))
{
i__1 = *ncv;
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd
- + k - 1] - 1.);
+ workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd + k - 1] - 1.);
}
}
else if (!std::strncmp(type__, "CAYLEY", 6))
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (
- workl[ihd + k - 1] - 1.);
+ workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (workl[ihd + k - 1] - 1.);
}
}
- F77_FUNC(scopy, SCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
- F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
+ F77_FUNC(scopy, SCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
+ F77_FUNC(ssortr, SSORTR)("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
if (*rvec)
{
- F77_FUNC(ssesrt, SSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+ F77_FUNC(ssesrt, SSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
}
else
{
- F77_FUNC(scopy, SCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+ F77_FUNC(scopy, SCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
d__1 = bnorm2 / rnorm;
- F77_FUNC(sscal, SSCAL) (ncv, &d__1, &workl[ihb], &c__1);
- F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
+ F77_FUNC(sscal, SSCAL)(ncv, &d__1, &workl[ihb], &c__1);
+ F77_FUNC(ssortr, SSORTR)("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
}
-
}
if (*rvec && *howmny == 'A')
{
- F77_FUNC(sgeqr2, SGEQR2) (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
- &ierr);
+ F77_FUNC(sgeqr2, SGEQR2)
+ (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb], &ierr);
- F77_FUNC(sorm2r, SORM2R) ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &
- workl[iw + *ncv], &v[v_offset], ldv, &workd[*n + 1], &ierr);
- F77_FUNC(slacpy, SLACPY) ("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
+ F77_FUNC(sorm2r, SORM2R)
+ ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &v[v_offset],
+ ldv, &workd[*n + 1], &ierr);
+ F77_FUNC(slacpy, SLACPY)("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
i__1 = *ncv - 1;
for (j = 1; j <= i__1; ++j)
workl[ihb + j - 1] = 0.;
}
workl[ihb + *ncv - 1] = 1.;
- F77_FUNC(sorm2r, SORM2R) ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &
- workl[iw + *ncv], &workl[ihb], ncv, &temp, &ierr);
-
+ F77_FUNC(sorm2r, SORM2R)
+ ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
+ ncv, &temp, &ierr);
}
else if (*rvec && *howmny == 'S')
{
-
}
if (!std::strncmp(type__, "REGULR", 6) && *rvec)
{
workl[ihb + j - 1] = rnorm * std::abs(workl[ihb + j - 1]);
}
-
}
else if (std::strncmp(type__, "REGULR", 6) && *rvec)
{
- F77_FUNC(sscal, SSCAL) (ncv, &bnorm2, &workl[ihb], &c__1);
+ F77_FUNC(sscal, SSCAL)(ncv, &bnorm2, &workl[ihb], &c__1);
if (!std::strncmp(type__, "SHIFTI", 6))
{
for (k = 1; k <= i__1; ++k)
{
d__2 = workl[iw + k - 1];
- workl[ihb + k - 1] = std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+ workl[ihb + k - 1] = std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
}
-
}
else if (!std::strncmp(type__, "BUCKLE", 6))
{
for (k = 1; k <= i__1; ++k)
{
d__2 = workl[iw + k - 1] - 1.;
- workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+ workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
}
-
}
else if (!std::strncmp(type__, "CAYLEY", 6))
{
i__1 = *ncv;
for (k = 1; k <= i__1; ++k)
{
- workl[ihb + k - 1] = std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
-
+ workl[ihb + k - 1] =
+ std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
}
-
}
-
}
if (*rvec && (!std::strncmp(type__, "SHIFTI", 6) || !std::strncmp(type__, "CAYLEY", 6)))
{
workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / workl[iw + k];
}
-
}
else if (*rvec && !std::strncmp(type__, "BUCKLE", 6))
{
i__1 = nconv - 1;
for (k = 0; k <= i__1; ++k)
{
- workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] -
- 1.);
+ workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] - 1.);
}
-
}
if (std::strncmp(type__, "REGULR", 6))
{
- F77_FUNC(sger, SGER) (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[
- z_offset], ldz);
+ F77_FUNC(sger, SGER)
+ (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[z_offset], ldz);
}
L9000:
return;
-
}
+
+#endif