Ejemplo n.º 1
0
double NOX::LAPACK::Vector::norm(NOX::Abstract::Vector::NormType type) const
{

  if (n == 0)
    return 0.0;

  int i;            // counter
  double value;            // final answer

  switch (type) {
  case MaxNorm:
    value = fabs(x[0]);
    for (i = 1; i < n; i ++)
      if (value < fabs(x[i]))
    value = fabs(x[i]);
    break;
  case OneNorm:
    value = DASUM_F77(&n, &x[0], &i_one);
    break;
  case TwoNorm:
  default:
    value = DNRM2_F77(&n, &x[0], &i_one);
   break;
  }

  return value;
}
Ejemplo n.º 2
0
//=============================================================================
double Epetra_BLAS::ASUM(const int N, const double * X, const int INCX) const {
  return(DASUM_F77(&N, X, &INCX));
}
Ejemplo n.º 3
0
 double BLAS<int, double>::ASUM(const int n, const double* x, const int incx) const
 { return DASUM_F77(&n, x, &incx); }