]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard relevant blocks against case where only PETSc or Trilinos is active 18590/head
authorRyan Moulday <RyanMoulday@outlook.com>
Fri, 27 Jun 2025 05:03:29 +0000 (01:03 -0400)
committerRyan Moulday <RyanMoulday@outlook.com>
Fri, 27 Jun 2025 23:06:34 +0000 (19:06 -0400)
source/lac/sparse_direct.cc

index 75e46da54b105fba109915acff5ddd7fbe641a68..f873796bc0cc3bdb334f30db304b22a7a7ae391c 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
+namespace TrilinosWrappers
+{
+  class SparseMatrix;
+  namespace MPI
+  {
+    class SparseMatrix;
+    class Vector;
+  } // namespace MPI
+} // namespace TrilinosWrappers
+namespace PETScWrappers
+{
+  namespace MPI
+  {
+    class SparseMatrix;
+    class Vector;
+  } // namespace MPI
+} // namespace PETScWrappers
+
 namespace
 {
   /**
@@ -1442,9 +1460,12 @@ InstantiateUMFPACK(BlockSparseMatrix<std::complex<float>>);
 #  define InstantiateMUMPSMatVec(VECTOR)                                    \
     template void SparseDirectMUMPS::vmult(VECTOR &, const VECTOR &) const; \
     template void SparseDirectMUMPS::Tvmult(VECTOR &, const VECTOR &) const;
-
+#  ifdef DEAL_II_WITH_TRILINOS
 InstantiateMUMPSMatVec(TrilinosWrappers::MPI::Vector)
+#  endif
+#  ifdef DEAL_II_WITH_PETSC
   InstantiateMUMPSMatVec(PETScWrappers::MPI::Vector)
+#  endif
     InstantiateMUMPSMatVec(Vector<double>)
 
 #  define InstantiateMUMPS(MATRIX) \
@@ -1452,9 +1473,13 @@ InstantiateMUMPSMatVec(TrilinosWrappers::MPI::Vector)
 
       InstantiateMUMPS(SparseMatrix<double>)
         InstantiateMUMPS(SparseMatrix<float>)
+#  ifdef DEAL_II_WITH_TRILINOS
           InstantiateMUMPS(TrilinosWrappers::SparseMatrix)
+#  endif
+#  ifdef DEAL_II_WITH_PETSC
             InstantiateMUMPS(PETScWrappers::SparseMatrix)
               InstantiateMUMPS(PETScWrappers::MPI::SparseMatrix)
+#  endif
   // InstantiateMUMPS(SparseMatrixEZ<double>)
   // InstantiateMUMPS(SparseMatrixEZ<float>)
   InstantiateMUMPS(BlockSparseMatrix<double>)

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.