]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add PETSc check
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 27 Sep 2018 02:26:03 +0000 (04:26 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 5 Oct 2018 03:17:23 +0000 (05:17 +0200)
cmake/configure/configure_3_petsc.cmake

index 0f1e6433ec1991164b87120f56a11fae5c8e9e91..f95de0331a17f3e62a5c9cacc2842af07cf1346d 100644 (file)
@@ -94,6 +94,25 @@ MACRO(FEATURE_PETSC_FIND_EXTERNAL var)
       SET(${var} FALSE)
     ENDIF()
 
+    # If PETSc is compiled with complex scalar type we need to have support
+    # for complex values within deal.II as well.
+    #
+    IF( PETSC_WITH_COMPLEX AND NOT DEAL_II_WITH_COMPLEX_VALUES )
+        MESSAGE(STATUS "The PETSc configuration is incompatible with the deal.II configuration: "
+        "PETSc is compiled with complex scalar type. "
+        "This requites support for complex values in deal.II as well."
+        )
+      SET(PETSC_ADDITIONAL_ERROR_STRING
+        ${PETSC_ADDITIONAL_ERROR_STRING}
+        "The PETSc configuration is incompatible with the deal.II configuration:\n"
+        "PETSc is compiled with complex scalar type. "
+        "This requites support for complex values in deal.II as well.\n"
+        "  DEAL_II_WITH_COMPLEX_VALUES = ${DEAL_II_WITH_COMPLEX_VALUES}\n"
+        "  PETSC_WITH_COMPLEX = (${PETSC_WITH_COMPLEX})\n"
+        )
+      SET(${var} FALSE)
+    ENDIF()
+
     CHECK_MPI_INTERFACE(PETSC ${var})
   ENDIF()
 ENDMACRO()

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.