+++ /dev/null
-// vector update of the form y += alpha*x with a scalar, x,y vectors
-void daxpy_ (const int* n, const double* alpha, const double* x,
- const int* incx, double* y, const int* incy);
-
-// General Matrix
-// Matrix vector product
-void dgemv_ (const char* trans, const int* m, const int* n,
- const double* alpha, const double* A, const int* lda,
- const double* x, const int* incx,
- const double* b, double* y, const int* incy);
-
-// Matrix matrix product
-void dgemm_ (const char* transa, const char* transb,
- const int* m, const int* n, const int* k,
- const double* alpha, const double* A, const int* lda,
- const double* B, const int* ldb,
- const double* beta, double* C, const int* ldc);
-
-// Compute LU factorization
-void dgetrf_ (const int* m, const int* n, double* A,
- const int* lda, int* ipiv, int* info);
-// Apply forward/backward substitution to LU factorization
-void dgetrs_ (const char* trans, const int* n, const int* nrhs,
- const double* A, const int* lda, const int* ipiv,
- double* b, const int* ldb, int* info);
-// Invert matrix from LU factorization
-void dgetri_ (const int* n, double* A, const int* lda,
- int* ipiv, double* inv_work, const int* lwork, int* info);
-
-// Compute QR factorization (Householder)
-void dgeqrf_ (const int* m, const int* n, double* A,
- const int* lda, double* tau, double* work,
- const int* lwork, int* info);
-// Compute vector Q^T B, where Q is the result from dgeqrf_
-void dormqr_ (const char* side, const char* trans, const int* m,
- const int* n, const int* k, const double* A, const int* lda,
- const double* tau, double* B, const int* ldb,
- double* work, const int* lwork, int* info);
-// Compute matrix Q from the result of dgeqrf_
-void dorgqr_ (const int* m, const int* n, const int* k, const double* A,
- const int* lda, const double* tau, double* work, const int* lwork,
- int* info);
-// Compute Rx = b
-void dtrtrs_ (const char* uplo, const char* trans,
- const char* diag, const int* n, const int* n_rhs,
- const double* A, const int* lda, double* B, const int* ldb,
- int* info);
-
-// Compute eigenvalues and vectors
-void dgeev_ (const char* jobvl, const char* jobvr,
- const int* n, double* A, const int* lda,
- double* lambda_re, double* lambda_im,
- double* vl, const int* ldvl,
- double* vr, const int* ldva,
- double* work, const int* lwork,
- int* info);
-// Compute eigenvalues and vectors (expert)
-void dgeevx_ (const char* balanc, const char* jobvl, const char* jobvr,
- const char* sense,
- const int* n, double* A, const int* lda,
- double* lambda_re, double* lambda_im,
- double* vl, const int* ldvl,
- double* vr, const int* ldvr,
- int* ilo, int* ihi,
- double* scale, double* abnrm,
- double* rconde, double* rcondv,
- double* work, const int* lwork,
- int* iwork, int* info);
-// Eigenvalues for a symmetric matrix
-void dsyev_ (const char *jobz, const char *uplo, const int *n,
- double *A, const int *lda, double *w,
- double *work, const int *lwork, int *info);
-// Same functionality as dsyev_ but with more options: E.g.
-// Compute only eigenvalues in a specific interval,
-// Compute only eigenvalues with a specific index,
-// Set tolerance for eigenvalue computation
-void dsyevx_ (const char* jobz, const char* range,
- const char* uplo, const int* n, double* A, const int* lda,
- const double* vl, const double* vu,
- const int* il, const int* iu, const double* abstol,
- int* m, double* w, double* z,
- const int* ldz, double* work, const int* lwork, int* iwork,
- int* ifail, int* info);
-// Generalized 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,
- const int* n, double* A, const int* lda, double* B,
- const int* ldb, double* w, double* work,
- const int* lwork, int* info);
-// Same functionality as dsygv_ but with more options: E.g.
-// Compute only eigenvalues in a specific interval,
-// Compute only eigenvalues with a specific index,
-// Set tolerance for eigenvalue computation
-void dsygvx_ (const int* itype, const char* jobz, const char* range,
- const char* uplo, const int* n, double* A, const int* lda,
- double* B, const int* ldb, const double* vl, const double* vu,
- const int* il, const int* iu, const double* abstol,
- int* m, double* w, double* z,
- const int* ldz, double* work, const int* lwork, int* iwork,
- int* ifail, int* info);
-
-// Compute singular value decomposition using divide and conquer
-void dgesdd_ (const char* jobz,
- const int* m, const int* n, double* A, const int* lda,
- double* s,
- double* u, const int* ldu,
- double* vt, const int* ldvt,
- double* work, const int* lwork,
- int* iwork,
- int* info);
-
-// Compute singular value decomposition
-void dgesvd_ (int* jobu, int* jobvt,
- const int* n, const int* m, double* A, const int* lda,
- double* s,
- double* u, const int* ldu,
- double* vt, const int* ldvt,
- double* work, const int* lwork,
- int* info);
-
-// Solve a least squares problem using SVD
-void dgelsd_ (const int* m, const int* n, const int* nrhs,
- const double* A, const int* lda,
- double* B, const int* ldb,
- double* s, const double* rcond,
- int* rank,
- double* work, const int* lwork, int* iwork,
- int* info);
-
-// Symmetric tridiagonal matrix
-void dstev_ (const char* jobz, const int* n,
- double* d, double* e, double* z,
- const int* ldz, double* work,
- int* info);
-
+++ /dev/null
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2005 - 2013 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-## The deal.II library is free software; you can use it, redistribute
-## it, and/or modify it under the terms of the GNU Lesser General
-## Public License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-## The full text of the license can be found in the file LICENSE at
-## the top level of the deal.II distribution.
-##
-## ---------------------------------------------------------------------
-
-#
-# 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;
-
-
-print << 'EOT'
-// ---------------------------------------------------------------------
-//
-// Copyright (C) 2005 - 2013 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// The deal.II library is free software; you can use it, redistribute
-// it, and/or modify it under the terms of the GNU Lesser General
-// Public License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// The full text of the license can be found in the file LICENSE at
-// the top level of the deal.II distribution.
-//
-// ---------------------------------------------------------------------
-
-#ifndef __LAPACK_TEMPLATES_H
-#define __LAPACK_TEMPLATES_H
-
-#include <deal.II/base/config.h>
-#include <deal.II/lac/lapack_support.h>
-
-extern "C"
-{
-EOT
- ;
-
-while(<>)
-{
- # Write comment lines literally
- if (m'^\s*//')
- {
- print;
- next;
- }
- # Lines of the form 'typename functionname (...'
- # where functionname is of the form d..._,
- # that is a double precision LAPACK function
- if (m'\s*(\w+)\s+d(\w+)_\s*\(')
- {
- $double = $_;
- my $type = $1;
- my $name = $2;
- my $capname = $name;
- $capname =~ tr/[a-z]/[A-Z]/;
- while (<>)
- {
- $double .= $_;
- last if (m';');
- }
- my $single = $double;
- $single =~ s/d$name/s$name/;
- $single =~ s/double/float/g;
- print $double,$single;
-
- $double =~ m/\(([^\)]*)/;
- my $args = $1;
- # The arglist for the C++ function
- $args =~ s/\s+/ /g;
- # The arglist handed down to the FORTRAN function
- $args2 = $args;
- # Fortunately, all arguments are pointers, so we can use the *
- # to separate data type and argument name
- $args2 =~ s/\w+\*//g;
- $args2 =~ s/const//g;
- $args2 =~ s/\s//g;
- # The arglist of the empty C++ function
- $args0 = $args;
- $args0 =~ s/\*[^,]*,/\*,/g;
- $args0 =~ s/\*[^,]*$/\*/g;
-
- # First, do the general template None of these functions is
- # implemented, but they allow us to link for instance with
- # long double lapack support
- my $numbers = 1;
- my $argst = $args0;
- my $typet = $type;
- while ($argst =~ s/double/number$numbers/)
- {
- $numbers++;
- }
- $typet =~ s/double/number1/g;
-
- $templates .= "\n\n/// Template wrapper for LAPACK functions d$name and s$name\n";
- $templates .= "template<typename number1";
- for (my $i=2;$i<$numbers;++$i)
- {
- $templates .= ", typename number$i";
- }
- $templates .= ">\ninline $typet\n$name ($argst)\n";
- $templates .= "{\n Assert (false, ExcNotImplemented());\n}";
-
- # The specialization for double. Note that we always have two
- # versions, one implemented and calling LAPACK, the other not
- # implemented
- $templates .= "\n\n#ifdef HAVE_D$capname\_";
- $templates .= "\ninline $type\n$name ($args)\n{\n d$name\_ ($args2);\n}\n";
- $templates .= "#else\ninline $type\n$name ($args0)\n";
- $templates .= "{\n Assert (false, LAPACKSupport::ExcMissing(\"d$name\"));\n}\n#endif\n";
-
- $args =~ s/double/float/g;
- $args0 =~ s/double/float/g;
- $type =~ s/double/float/g;
- $templates .= "\n\n#ifdef HAVE_S$capname\_";
- $templates .= "\ninline $type\n$name ($args)\n{\n s$name\_ ($args2);\n}\n";
- $templates .= "#else\ninline $type\n$name ($args0)\n";
- $templates .= "{\n Assert (false, LAPACKSupport::ExcMissing(\"s$name\"));\n}\n#endif\n";
- }
-}
-
-print "\n}\n\nDEAL_II_NAMESPACE_OPEN\n";
-
-print "$templates\n\nDEAL_II_NAMESPACE_CLOSE\n\n#endif\n";
+++ /dev/null
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2013 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-## The deal.II library is free software; you can use it, redistribute
-## it, and/or modify it under the terms of the GNU Lesser General
-## Public License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-## The full text of the license can be found in the file LICENSE at
-## the top level of the deal.II distribution.
-##
-## ---------------------------------------------------------------------
-
-ADD_CUSTOM_COMMAND(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h
- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/
- COMMAND perl
- ARGS ${CMAKE_SOURCE_DIR}/scripts/lapack_templates.pl
- ${CMAKE_CURRENT_SOURCE_DIR}/deal.II/lac/lapack_templates.h.in
- > ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h
- )
-
-ADD_CUSTOM_TARGET(lapack_templates ALL
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/deal.II/lac/lapack_templates.h
- )
ultimate preconditioner, namely a direct sparse LU decomposition of
the matrix. This is implemented using the SparseDirectUMFPACK class
that uses the UMFPACK direct solver to compute the decomposition. To
-use it, you will have to specify the <code>--with-umfpack</code>
-switch when configuring the deal.II library, see the <a
-href="../../readme.html#optional-software">ReadMe file</a> for
-instructions. With this, the inner solver converges in one iteration.
+use it, you will have to build deal.II with UMFPACK support (which is the
+default); see the <a href="../../readme.html#optional-software">ReadMe file</a>
+for instructions. With this, the inner solver converges in one iteration.
In 2d, we can do this sort of thing because even reasonably large problems
rarely have more than a few 100,000 unknowns with relatively few nonzero
// provided by UMFPACK (see the SparseDirectUMFPACK class), for which the
// following header file is needed. Note that in order to compile this
// tutorial program, the deal.II-library needs to be built with UMFPACK
-// support, which can be most easily achieved by giving the <code>
-// --with-umfpack</code> switch when configuring the library:
+// support, which is enabled by default:
#include <deal.II/lac/sparse_direct.h>
// The FESystem class allows us to stack several FE-objects to one compound,
// solve our linear system with just 3 lines of code.
// Note again that for compiling this example program, you need to have the
- // deal.II library built with UMFPACK support, which can be achieved by
- // providing the <code> --with-umfpack</code> switch to the configure script
- // prior to compilation of the library.
+ // deal.II library built with UMFPACK support.
template <int dim>
void UltrasoundProblem<dim>::solve ()
{
// #else
// #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
// #endif
-// In addition to checking the flags __AVX__ and __SSE2__, a configure test
-// ensures that these feature are not only present but also working properly.
+// In addition to checking the flags __AVX__ and __SSE2__, a CMake test,
+// 'check_01_cpu_features.cmake', ensures that these feature are not only
+// present but also working properly.
#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 // AVX, AVX-512
#include <immintrin.h>
types_are_equal<number,number2>::value)
if (this->n()*this->m()*src.n() > 300)
{
- // In case we have the BLAS function gemm detected at configure, we
+ // In case we have the BLAS function gemm detected by CMake, we
// use that algorithm for matrix-matrix multiplication since it
// provides better performance than the deal.II native function (it
// uses cache and register blocking in order to access local data).
types_are_equal<number,number2>::value)
if (this->n()*this->m()*src.n() > 300)
{
- // In case we have the BLAS function gemm detected at configure, we
+ // In case we have the BLAS function gemm detected by CMake, we
// use that algorithm for matrix-matrix multiplication since it
// provides better performance than the deal.II native function (it
// uses cache and register blocking in order to access local data).
types_are_equal<number,number2>::value)
if (this->n()*this->m()*src.m() > 300)
{
- // In case we have the BLAS function gemm detected at configure, we
+ // In case we have the BLAS function gemm detected by CMake, we
// use that algorithm for matrix-matrix multiplication since it
// provides better performance than the deal.II native function (it
// uses cache and register blocking in order to access local data).
types_are_equal<number,number2>::value)
if (this->n()*this->m()*src.m() > 300)
{
- // In case we have the BLAS function gemm detected at configure, we
+ // In case we have the BLAS function gemm detected by CMake, we
// use that algorithm for matrix-matrix multiplication since it
// provides better performance than the deal.II native function (it
// uses cache and register blocking in order to access local data).
if (this->n_cols() > 15)
{
// In case we have the LAPACK functions
- // getrf and getri detected at configure,
+ // getrf and getri detected by CMake,
// we use these algorithms for inversion
// since they provide better performance
// than the deal.II native functions.
* eigenvalues and the corresponding eigenvectors will be stored in the
* columns of eigenvectors, whose dimension is set accordingly.
*
- * @note Calls the LAPACK function Xsyevx. For this to work, ./configure has
- * to be told to use LAPACK.
+ * @note Calls the LAPACK function Xsyevx. For this to work, deal.II must
+ * be configured to use LAPACK.
*/
void compute_eigenvalues_symmetric (const number lower_bound,
const number upper_bound,
* eigenvalues and the corresponding eigenvectors will be stored in
* eigenvectors, whose dimension is set accordingly.
*
- * @note Calls the LAPACK function Xsygvx. For this to work, ./configure has
- * to be told to use LAPACK.
+ * @note Calls the LAPACK function Xsygvx. For this to work, deal.II must
+ * be configured to use LAPACK.
*/
void compute_generalized_eigenvalues_symmetric (LAPACKFullMatrix<number> &B,
const number lower_bound,
* be retrieved using the eigenvalue() function. The number of computed
* eigenvectors is equal to eigenvectors.size()
*
- * @note Calls the LAPACK function Xsygv. For this to work, ./configure has
- * to be told to use LAPACK.
+ * @note Calls the LAPACK function Xsygv. For this to work, deal.II must
+ * be configured to use LAPACK.
*/
void compute_generalized_eigenvalues_symmetric (LAPACKFullMatrix<number> &B,
std::vector<Vector<number> > &eigenvectors,
// ---------------------------------------------------------------------
//
-// Copyright (C) 1998 - 2014 by the deal.II authors
+// Copyright (C) 1998 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
* The iteration is also aborted if the residual becomes a denormalized
* value (@p NaN). Note, however, that this check is only performed if the
* @p isnan function is provided by the operating system, which is not
- * always true. The @p configure scripts checks for this and sets the flag
+ * always true. CMake checks this with the 'check_01_cxx_features.cmake'
+ * test and sets the flag
* @p DEAL_II_HAVE_ISNAN in the include file <tt>deal.II/base/config.h</tt>
* if this function was found.
*
* class provides an older interface, consisting of the functions factorize()
* and solve(). Both interfaces are interchangeable.
*
- * @note This class only exists if support for <a
- * href="http://www.cise.ufl.edu/research/sparse/umfpack">UMFPACK</a> was
- * enabled during configure and if the <a
- * href="http://www.cise.ufl.edu/research/sparse/umfpack">UMFPACK</a> library
- * was configured. The steps to do this are explained in the deal.II ReadMe
- * file. If you do nothing at the time you configure deal.II, then this class
- * will simply not work.
+ * @note This class exists if the <a
+ * href="http://faculty.cse.tamu.edu/davis/suitesparse.html">UMFPACK</a>
+ * interface was not explicitly disabled during configuration.
*
* @note UMFPACK has its own license, independent of that of deal.II. If you
* want to use the UMFPACK you have to accept that license. It is linked to
#ifdef DEAL_II_HAVE_JN
return jn(order, r*wave_number);
#else
- Assert(false, ExcMessage("Bessel function jn was not found by configure"));
+ Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
return r;
#endif
}
const double r = points[k].distance(center);
values[k] = jn(order, r*wave_number);
#else
- Assert(false, ExcMessage("Bessel function jn was not found by configure"));
+ Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
#endif
}
}
result[1] = wave_number * si * dJn;
return result;
#else
- Assert(false, ExcMessage("Bessel function jn was not found by configure"));
+ Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
return Tensor<1,dim>();
#endif
}
: (.5*(jn(order-1, wave_number*r) -jn(order+1, wave_number*r)));
#else
const double dJn = 0.;
- Assert(false, ExcMessage("Bessel function jn was not found by configure"));
+ Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
#endif
Tensor<1,dim> &result = gradients[k];
result[0] = wave_number * co * dJn;
#include <algorithm>
#include <stddef.h>
-// these includes should probably be properly
-// ./configure'd using the AC_HEADER_TIME macro:
-
#if defined(DEAL_II_HAVE_SYS_TIME_H) && defined(DEAL_II_HAVE_SYS_RESOURCE_H)
# include <sys/time.h>
# include <sys/resource.h>
echo "configure"
cd build
cmake ../deal.II || exit 2
- #./configure --disable-threads --with-petsc=no || exit 2
echo "compiling"
$MAKECMD || exit 3