]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Sundials detection mechanism.
authorLuca Heltai <luca.heltai@sissa.it>
Mon, 14 Aug 2017 21:13:02 +0000 (15:13 -0600)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 14 Aug 2017 21:14:26 +0000 (15:14 -0600)
cmake/configure/configure_sundials.cmake [new file with mode: 0644]
cmake/modules/FindSUNDIALS.cmake [new file with mode: 0644]
doc/doxygen/options.dox.in
include/deal.II/base/config.h.in

diff --git a/cmake/configure/configure_sundials.cmake b/cmake/configure/configure_sundials.cmake
new file mode 100644 (file)
index 0000000..aec7794
--- /dev/null
@@ -0,0 +1,20 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2017 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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Configuration for the SUNDIALS library:
+#
+
+CONFIGURE_FEATURE(SUNDIALS)
diff --git a/cmake/modules/FindSUNDIALS.cmake b/cmake/modules/FindSUNDIALS.cmake
new file mode 100644 (file)
index 0000000..731d93a
--- /dev/null
@@ -0,0 +1,87 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2015-2016 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal2lkit 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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Try to find the SUNDIALS libraries
+#
+# This module exports
+#
+#   SUNDIALS_LIBRARIES
+#   SUNDIALS_INCLUDE_DIRS
+#
+
+SET(SUNDIALS_DIR "" CACHE PATH "An optional hint to a SUNDIALS_DIR installation")
+SET_IF_EMPTY(SUNDIALS_DIR "$ENV{SUNDIALS_DIR}")
+
+DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_IDA NAMES sundials_ida
+  HINTS ${SUNDIALS_DIR}
+  PATH_SUFFIXES lib
+  )
+
+DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_KINSOL NAMES sundials_kinsol
+  HINTS ${SUNDIALS_DIR}
+  PATH_SUFFIXES lib
+  )
+
+DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_SER NAMES sundials_nvecserial
+  HINTS ${SUNDIALS_DIR}
+  PATH_SUFFIXES lib
+  )
+
+SET(SUN_INC "${SUNDIALS_DIR}/include")
+
+IF(DEAL_II_WITH_MPI)
+  DEAL_II_FIND_LIBRARY(SUNDIALS_LIB_PAR NAMES sundials_nvecparallel
+    HINTS ${SUNDIALS_DIR}
+    PATH_SUFFIXES lib
+    )
+
+  DEAL_II_PACKAGE_HANDLE(SUNDIALS
+    LIBRARIES REQUIRED
+    SUNDIALS_LIB_IDA
+    SUNDIALS_LIB_KINSOL
+    SUNDIALS_LIB_SER
+    SUNDIALS_LIB_PAR
+    INCLUDE_DIRS
+    REQUIRED SUN_INC
+    USER_INCLUDE_DIRS
+    REQUIRED SUN_INC
+    CLEAR
+    SUNDIALS_LIB_IDA
+    SUNDIALS_LIB_KINSOL
+    SUNDIALS_LIB_SER
+    SUNDIALS_LIB_PAR
+    SUN_INC
+    )
+
+ELSE()
+
+  DEAL_II_PACKAGE_HANDLE(SUNDIALS
+    LIBRARIES REQUIRED
+    SUNDIALS_LIB_IDA
+    SUNDIALS_LIB_KINSOL
+    SUNDIALS_LIB_SER
+    INCLUDE_DIRS
+    REQUIRED SUN_INC
+    USER_INCLUDE_DIRS
+    REQUIRED SUN_INC
+    CLEAR
+    SUNDIALS_LIB_IDA
+    SUNDIALS_LIB_KINSOL
+    SUNDIALS_LIB_SER
+    SUN_INC
+    )
+
+ENDIF()
index b01d714ecce9f1f563028821fa7ae2125814e59b..4a2ebca021e68c07d1f21522719bc111ea03c375 100644 (file)
@@ -186,6 +186,7 @@ PREDEFINED             = DOXYGEN=1 \
                          DEAL_II_WITH_P4EST=1 \
                          DEAL_II_WITH_PETSC=1 \
                          DEAL_II_WITH_SLEPC=1 \
+                         DEAL_II_WITH_SUNDIALS=1 \
                          DEAL_II_WITH_THREADS=1 \
                          DEAL_II_WITH_TRILINOS=1 \
                          DEAL_II_WITH_UMFPACK=1 \
index 2755ae740ab0f92c20f544b783b8cb66ebfbd982..6a922060c4d6ec703ab320bca2305cd4035eb884 100644 (file)
@@ -52,6 +52,7 @@
 #cmakedefine DEAL_II_WITH_P4EST
 #cmakedefine DEAL_II_WITH_PETSC
 #cmakedefine DEAL_II_WITH_SLEPC
+#cmakedefine DEAL_II_WITH_SUNDIALS
 #cmakedefine DEAL_II_WITH_THREADS
 #cmakedefine DEAL_II_WITH_TRILINOS
 #cmakedefine DEAL_II_WITH_UMFPACK

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.