AC_SUBST(UMFPACK_INCLUDE_DIR)
AC_SUBST(USE_CONTRIB_UMFPACK)
-dnl Check for LAPACK
+dnl -------------------------------------------------------------
+dnl Check for LAPACK and the LAPACK functions being used
+dnl -------------------------------------------------------------
AC_ARG_WITH(lapack,
[ --with-lapack=lapacklib Use the lapack library lapacklib. Make sure the
path to the libary is searched by ld, since it is
AC_CHECK_FUNC(daxpy_,,[AC_MSG_ERROR([BLAS library not installed correctly($with_blas)])])
fi
+dnl Since we might have an incomplete LAPACK installation, check all
+dnl the functions we may want to use. If any of them is missing,
+dnl deal.II will not attempt to call it and rather throw and
+dnl exception.
+
AC_CHECK_FUNCS([daxpy_ saxpy_ dgemv_ sgemv_ dgeev_ sgeev_ dgeevx_ sgeevx_])
AC_CHECK_FUNCS([dgesvd_ sgesvd_ dgemm_ sgemm_ dgetrf_ sgetrf_ dgetri_ sgetri_])
AC_CHECK_FUNCS([dgeqrf_ sgeqrf_ dormqr_ sormqr_ dorgqr_ sorgqr_ dtrtrs_ strtrs_])
#
#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# This perl script translates lapack_templates.h.in to lapack_templates.h
+#
+# In the *.in file, every BLAS/LAPACK function which is defined for
+# double precision, i.e. having a name like 'dfoo_', is expanded to
+# itself plus the same function for single precision, namely
+# 'sfoo_'. Additionally, a C++ function 'foo' without the prefix
+# letter and the trailing underscore is generated, such that the
+# fortran functions can easily be called from templates. The
+# implementation of this function is modified due to the configure
+# variables 'HAVE_DFOO_' and 'HAVE_DFOO_': if these are set, then the
+# lapack functions 'dfoo_' and 'sfoo_' will be called, if not, an
+# exception will be thrown.
+#
+# Therefore, in order to be able to call a LAPACK function, the
+# functions have to be tested by configure. Search for the section
+# "Check for LAPACK..." in deal.II/configure.in and add the functions
+# 'dfoo_' and 'sfoo_' to the tests at the end of that section.
+#
+
+
my $templates;
my $double;
// This file was automatically generated from lapack_templates.h.in
// See blastemplates in the deal.II contrib directory
//
-// Copyright (C) 2005, 2006, 2007, 2008, 2009 by the deal authors
+// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//---------------------------------------------------------------------------
-// $Id$
-// Version: $Name$
//
// This file was automatically generated from lapack_templates.h.in
// See blastemplates in the deal.II contrib directory
void ssyev_ (const char *jobz, const char *uplo, const int *n,
float *A, const int *lda, float *w,
float *work, const int *lwork, int *info);
-// General eigenvalues and eigenvectors of
+// General eigenvalues and eigenvectors of
// 1: A*x = lambda*B*x; 2: A*B*x = lambda*x; 3: B*A*x = lambda*x
// A and B are symmetric and B is definite
void dsygv_ (const int* itype, const char* jobz, const char* uplo,
}
-
DEAL_II_NAMESPACE_OPEN
+
#ifdef HAVE_DAXPY_
inline void
axpy (const int* n, const double* alpha, const double* x, const int* incx, double* y, const int* incy)
inline void
sygv (const int* itype, const char* jobz, const char* uplo, const int* n, double* A, const int* lda, double* B, const int* ldb, double* w, double* work, const int* lwork, int* info)
{
- dsygv_(itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, info);
+ dsygv_ (itype,jobz,uplo,n,A,lda,B,ldb,w,work,lwork,info);
}
#else
inline void
inline void
sygv (const int* itype, const char* jobz, const char* uplo, const int* n, float* A, const int* lda, float* B, const int* ldb, float* w, float* work, const int* lwork, int* info)
{
- ssygv_(itype, jobz, uplo, n, A, lda, B, ldb, w, work, lwork, info);
+ ssygv_ (itype,jobz,uplo,n,A,lda,B,ldb,w,work,lwork,info);
}
#else
inline void
}
#endif
+
DEAL_II_NAMESPACE_CLOSE
#endif