]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add DEAL_II_WITH_PETSC_WITH_HYPRE. 5161/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 27 Sep 2017 00:34:14 +0000 (20:34 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 27 Sep 2017 02:03:00 +0000 (22:03 -0400)
This does not change any functionality but does make it easier to
disable (or enable) tests based on the availability of hypre within
PETSc.

31 files changed:
cmake/configure/configure_3_petsc.cmake
cmake/modules/FindPETSC.cmake
include/deal.II/base/config.h.in
source/lac/petsc_precondition.cc
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output with 100% similarity]
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=10.output.2 [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=10.output.2 with 100% similarity]
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output with 100% similarity]
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=3.output.2 [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=3.output.2 with 100% similarity]
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output with 100% similarity]
tests/mpi/hp_step-40.with_petsc_with_hypre=true.mpirun=4.output.2 [moved from tests/mpi/hp_step-40.with_petsc=true.mpirun=4.output.2 with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=3.output.2 [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=3.output.2 with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=5.output.2 [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=5.output.2 with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output with 100% similarity]
tests/mpi/periodicity_01.with_petsc_with_hypre=true.mpirun=7.output.2 [moved from tests/mpi/periodicity_01.with_petsc=true.mpirun=7.output.2 with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output [moved from tests/mpi/step-40.with_petsc=true.mpirun=10.output with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=10.output.2 [moved from tests/mpi/step-40.with_petsc=true.mpirun=10.output.2 with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output [moved from tests/mpi/step-40.with_petsc=true.mpirun=3.output with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=3.output.2 [moved from tests/mpi/step-40.with_petsc=true.mpirun=3.output.2 with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output [moved from tests/mpi/step-40.with_petsc=true.mpirun=4.output with 100% similarity]
tests/mpi/step-40.with_petsc_with_hypre=true.mpirun=4.output.2 [moved from tests/mpi/step-40.with_petsc=true.mpirun=4.output.2 with 100% similarity]
tests/petsc/different_matrix_preconditioner.with_mpi=true.with_petsc_with_hypre=true.output [moved from tests/petsc/different_matrix_preconditioner.with_mpi=true.output with 100% similarity]
tests/petsc/reinit_preconditioner_01.with_petsc_with_hypre=true.mpirun=3.output [moved from tests/petsc/reinit_preconditioner_01.mpirun=3.output with 100% similarity]
tests/petsc/reinit_preconditioner_02.with_petsc_with_hypre=true.with_mpi=true.output [moved from tests/petsc/reinit_preconditioner_02.with_mpi=true.output with 100% similarity]
tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.with_petsc_with_hypre=true.output [moved from tests/petsc/solver_03_precondition_boomeramg.with_mpi=true.output with 100% similarity]
tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.with_petsc_with_hypre=true.output [moved from tests/petsc/solver_03_precondition_boomeramg_symmetric.with_mpi=true.output with 100% similarity]
tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_petsc_with_hypre=true.with_mpi=true.output [moved from tests/petsc/solver_03_precondition_parasails.with_64bit_indices=off.with_mpi=true.output with 100% similarity]
tests/slepc/step-36_parallel.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output [moved from tests/slepc/step-36_parallel.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output with 100% similarity]
tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output [moved from tests/slepc/step-36_parallel_02.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output with 100% similarity]
tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc_with_hypre=true.with_slepc=true.mpirun=3.output [moved from tests/slepc/step-36_parallel_03.with_mpi=true.with_petsc=true.with_slepc=true.mpirun=3.output with 100% similarity]

index 8260927eb5b759e15e0e60391deeb97ad46e853f..81315831eaf95561ec49ff017d447609cd880271 100644 (file)
@@ -136,4 +136,5 @@ ENDMACRO()
 
 CONFIGURE_FEATURE(PETSC)
 SET(DEAL_II_PETSC_WITH_COMPLEX ${PETSC_WITH_COMPLEX})
+SET(DEAL_II_PETSC_WITH_HYPRE ${PETSC_WITH_HYPRE})
 SET(DEAL_II_PETSC_WITH_MUMPS ${PETSC_WITH_MUMPS})
index 690d82c3c30dbbbf1954b580c38d4b6e2cc31abd..90fb01a08d58e3573256fef6e92412e1c30e754e 100644 (file)
@@ -28,6 +28,7 @@
 #     PETSC_VERSION_PATCH
 #     PETSC_WITH_64BIT_INDICES
 #     PETSC_WITH_COMPLEX
+#     PETSC_WITH_HYPRE
 #     PETSC_WITH_MPIUNI
 #     PETSC_WITH_MUMPS
 #
@@ -67,6 +68,7 @@ ENDMACRO()
 IF(EXISTS ${PETSC_PETSCCONF_H})
   _petsc_feature_check(64BIT_INDICES "#define.*PETSC_USE_64BIT_INDICES 1")
   _petsc_feature_check(COMPLEX "#define.*PETSC_USE_COMPLEX 1")
+  _petsc_feature_check(HYPRE "#define.*PETSC_HAVE_HYPRE 1")
   _petsc_feature_check(MPIUNI "#define.*PETSC_HAVE_MPIUNI 1")
   _petsc_feature_check(MUMPS "#define.*PETSC_HAVE_MUMPS 1")
 ENDIF()
index 57612ab5438b8e3a45530b420f7a6e2225856215..65f4239bd527912632f692255a61921be92d9daf 100644 (file)
 #cmakedefine DEAL_II_ARPACK_WITH_PARPACK
 
 /* cmake/modules/FindPETSC.cmake */
+#cmakedefine DEAL_II_PETSC_WITH_HYPRE
 #cmakedefine DEAL_II_PETSC_WITH_MUMPS
 
 /* cmake/configure/configure_1_threads.cmake */
index e14cc07c0fef6564d8d123d70cdd4cb726576a59..b9f9ee83d59fc14fcf78eeee1b8a1b6c43ce71a2 100644 (file)
@@ -455,9 +455,9 @@ namespace PETScWrappers
     PetscErrorCode ierr = PCCreate(comm, &pc);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-#ifdef PETSC_HAVE_HYPRE
+#ifdef DEAL_II_PETSC_WITH_HYPRE
     initialize();
-#else // PETSC_HAVE_HYPRE
+#else // DEAL_II_PETSC_WITH_HYPRE
     (void)pc;
     Assert (false,
             ExcMessage ("Your PETSc installation does not include a copy of "
@@ -475,7 +475,7 @@ namespace PETScWrappers
   void
   PreconditionBoomerAMG::initialize ()
   {
-#ifdef PETSC_HAVE_HYPRE
+#ifdef DEAL_II_PETSC_WITH_HYPRE
     PetscErrorCode ierr = PCSetType (pc, const_cast<char *>(PCHYPRE));
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
@@ -524,7 +524,7 @@ namespace PETScWrappers
   PreconditionBoomerAMG::initialize (const MatrixBase     &matrix_,
                                      const AdditionalData &additional_data_)
   {
-#ifdef PETSC_HAVE_HYPRE
+#ifdef DEAL_II_PETSC_WITH_HYPRE
     clear ();
 
     matrix = static_cast<Mat>(matrix_);
@@ -536,7 +536,7 @@ namespace PETScWrappers
     PetscErrorCode ierr = PCSetUp (pc);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-#else // PETSC_HAVE_HYPRE
+#else // DEAL_II_PETSC_WITH_HYPRE
     (void)matrix_;
     (void)additional_data_;
     Assert (false,
@@ -580,7 +580,7 @@ namespace PETScWrappers
     matrix = static_cast<Mat>(matrix_);
     additional_data = additional_data_;
 
-#ifdef PETSC_HAVE_HYPRE
+#ifdef DEAL_II_PETSC_WITH_HYPRE
     create_pc();
 
     PetscErrorCode ierr = PCSetType (pc, const_cast<char *>(PCHYPRE));
@@ -645,7 +645,7 @@ namespace PETScWrappers
     ierr = PCSetUp (pc);
     AssertThrow (ierr == 0, ExcPETScError(ierr));
 
-#else // PETSC_HAVE_HYPRE
+#else // DEAL_II_PETSC_WITH_HYPRE
     (void)pc;
     Assert (false,
             ExcMessage ("Your PETSc installation does not include a copy of "

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.