]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard isSupported check in preconditioners to Trilinos >=13.0.0 17313/head
authorJan Philipp Thiele <thiele@wias-berlin.de>
Fri, 19 Jul 2024 18:07:15 +0000 (20:07 +0200)
committerJan Philipp Thiele <thiele@wias-berlin.de>
Fri, 19 Jul 2024 20:51:05 +0000 (22:51 +0200)
include/deal.II/lac/trilinos_tpetra_precondition.templates.h
tests/trilinos_tpetra/precondition.cc
tests/trilinos_tpetra/precondition.with_trilinos.geq.13.output [moved from tests/trilinos_tpetra/precondition.output with 100% similarity]
tests/trilinos_tpetra/precondition.with_trilinos.le.13.output [new file with mode: 0644]

index 554f6236a3a063a7448a2d3a92c6eeeb110ff884..fc4a9c1250834bfb30db2a1841044fc4da25dc7d 100644 (file)
@@ -259,13 +259,13 @@ namespace LinearAlgebra
       const std::string &preconditioner_type)
       : preconditioner_type(preconditioner_type)
     {
+#    if DEAL_II_TRILINOS_VERSION_GTE(13, 0, 0)
       Ifpack2::Factory factory;
-      bool             supported =
-        factory.isSupported<TpetraTypes::MatrixType<Number, MemorySpace>>(
-          preconditioner_type);
-      AssertThrow(supported,
-                  ExcTrilinosIpack2PreconditionerUnsupported(
-                    preconditioner_type));
+      AssertThrow(
+        (factory.isSupported<TpetraTypes::MatrixType<Number, MemorySpace>>(
+          preconditioner_type)),
+        ExcTrilinosIpack2PreconditionerUnsupported(preconditioner_type));
+#    endif
     }
 
 
index efbdcc81e3b4e7a294c8ee58d58e2ae6913d0005..3104e0c01dfcaef848905eae95aa72187a9821f1 100644 (file)
@@ -500,6 +500,7 @@ Step4<dim>::solve(int cycle)
   //     deallog.pop();
   //   }
 
+#if DEAL_II_TRILINOS_VERSION_GTE(13, 0, 0)
   {
     // Make sure the general Ifpack preconditioner throws an Exception for an
     // unsupported solver.
@@ -519,6 +520,7 @@ Step4<dim>::solve(int cycle)
       }
     deallog.pop();
   }
+#endif
 
   deallog.pop();
 }
diff --git a/tests/trilinos_tpetra/precondition.with_trilinos.le.13.output b/tests/trilinos_tpetra/precondition.with_trilinos.le.13.output
new file mode 100644 (file)
index 0000000..30f6004
--- /dev/null
@@ -0,0 +1,43 @@
+
+DEAL:01089:Identity::Solver stopped within 49 - 51 iterations
+DEAL:01089:CustomSGS::Solver stopped after 41 iterations
+DEAL:01089:Jacobi::Solver stopped within 49 - 51 iterations
+DEAL:01089:l1Jacobi::Solver stopped within 49 - 51 iterations
+DEAL:01089:l1GaussSeidel::Solver stopped after 48 iterations
+DEAL:01089:SOR::Solver stopped after 25 iterations
+DEAL:01089:SSOR::Solver stopped within 40 - 42 iterations
+DEAL:01089:BlockJacobi::Solver stopped after 58 iterations
+DEAL:01089:BlockSOR::Solver stopped after 16 iterations
+DEAL:01089:BlockSSOR::Solver stopped after 28 iterations
+DEAL:01089:ILU::Solver stopped within 30 - 32 iterations
+DEAL:01089:ILUT::Solver stopped after 5 iterations
+DEAL:01089:Chebyshev::Solver stopped after 38 iterations
+DEAL:01089:CustomIGLOO::Error: 
+    You tried to select the preconditioner type <IGLOO>
+but this preconditioner is not supported by Trilinos/Ifpack22
+due to one of the following reasons:
+* This preconditioner does not exist
+* This preconditioner has a specialized constructor not supported by the Ifpack2 Factory.
+* This preconditioner is not (yet) supported by Trilinos/Ifpack2
+* Trilinos/Ifpack2 was not configured for its use.
+DEAL:04225:Identity::Solver stopped within 100 - 102 iterations
+DEAL:04225:CustomSGS::Solver stopped after 78 iterations
+DEAL:04225:Jacobi::Solver stopped within 100 - 102 iterations
+DEAL:04225:l1Jacobi::Solver stopped within 100 - 102 iterations
+DEAL:04225:l1GaussSeidel::Solver stopped after 98 iterations
+DEAL:04225:SOR::Solver stopped after 46 iterations
+DEAL:04225:SSOR::Solver stopped within 77 - 79 iterations
+DEAL:04225:BlockJacobi::Solver stopped after 82 iterations
+DEAL:04225:BlockSOR::Solver stopped after 20 iterations
+DEAL:04225:BlockSSOR::Solver stopped after 40 iterations
+DEAL:04225:ILU::Solver stopped within 56 - 58 iterations
+DEAL:04225:ILUT::Solver stopped after 10 iterations
+DEAL:04225:Chebyshev::Solver stopped after 75 iterations
+DEAL:04225:CustomIGLOO::Error: 
+    You tried to select the preconditioner type <IGLOO>
+but this preconditioner is not supported by Trilinos/Ifpack22
+due to one of the following reasons:
+* This preconditioner does not exist
+* This preconditioner has a specialized constructor not supported by the Ifpack2 Factory.
+* This preconditioner is not (yet) supported by Trilinos/Ifpack2
+* Trilinos/Ifpack2 was not configured for its use.
\ No newline at end of file

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.