]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use check_solver_within_range in PETSc(serial) tests 4724/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 8 Aug 2017 17:03:46 +0000 (19:03 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 8 Aug 2017 19:49:16 +0000 (21:49 +0200)
44 files changed:
tests/petsc/deal_solver_01.cc
tests/petsc/deal_solver_01.output
tests/petsc/deal_solver_02.cc
tests/petsc/deal_solver_03.cc
tests/petsc/deal_solver_03.output
tests/petsc/deal_solver_04.cc
tests/petsc/deal_solver_04.output
tests/petsc/deal_solver_05.cc
tests/petsc/deal_solver_05.output
tests/petsc/solver_03.cc
tests/petsc/solver_03.output
tests/petsc/solver_03_mf.cc
tests/petsc/solver_03_mf.output
tests/petsc/solver_03_precondition_eisenstat.cc
tests/petsc/solver_03_precondition_eisenstat.output
tests/petsc/solver_03_precondition_icc.cc
tests/petsc/solver_03_precondition_icc.output
tests/petsc/solver_03_precondition_ilu.cc
tests/petsc/solver_03_precondition_ilu.output
tests/petsc/solver_03_precondition_lu.cc
tests/petsc/solver_03_precondition_lu.output
tests/petsc/solver_03_precondition_parasails.cc
tests/petsc/solver_03_precondition_sor.cc
tests/petsc/solver_03_precondition_sor.output
tests/petsc/solver_03_precondition_ssor.cc
tests/petsc/solver_03_precondition_ssor.output
tests/petsc/solver_04.cc
tests/petsc/solver_04.output
tests/petsc/solver_05.cc
tests/petsc/solver_05.output
tests/petsc/solver_06.cc
tests/petsc/solver_06.output
tests/petsc/solver_07.cc
tests/petsc/solver_07.output
tests/petsc/solver_08.cc
tests/petsc/solver_08.output
tests/petsc/solver_09.cc
tests/petsc/solver_09.output
tests/petsc/solver_10.cc
tests/petsc/solver_10.output
tests/petsc/solver_12.cc
tests/petsc/solver_12.output
tests/petsc/solver_13.cc
tests/petsc/solver_13.output

index 44b2ef05e6ae35558661870e8600a5d1e05eaaec..3b7b33e09b26fc6ea6990a1c3e9080c660e0a7b6 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -94,7 +67,10 @@ int main(int argc, char **argv)
     GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
     SolverCG<PETScWrappers::MPI::Vector> solver(control,mem);
     PreconditionIdentity preconditioner;
-    check_solve (solver, control, A,u,f, preconditioner);
+
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 42, 44);
   }
   GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
 
index ec2fa4d95759760afb4a19b4b0081359ef31e520..c8fbf3f8106f725f6a2778f61afca48f05128cac 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii8SolverCGINS_13PETScWrappers3MPI6VectorEEE
-DEAL:cg::Starting value 31.00
-DEAL:cg::Convergence step 43 value 0.0008189
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
index 09e9c664eb6b15c6dcd56195898c0213dae1eb3e..8feb129750997f43df4eeb688144e40a089e94ee 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      check_solver_within_range(
-        solver.solve(A,u,f,P),
-        solver_control.last_step(), 48, 51);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-}
-
 
 int main(int argc, char **argv)
 {
@@ -95,7 +69,9 @@ int main(int argc, char **argv)
     GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
     SolverBicgstab<PETScWrappers::MPI::Vector> solver(control,mem);
     PreconditionIdentity preconditioner;
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 48, 51);
   }
   GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
 
index 268e208b0e61b5790a60a11ca82218079e3adfed..58893f133eb2bdc148bf4ec262418349854d5fc5 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -96,7 +69,9 @@ int main(int argc, char **argv)
     GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
     SolverGMRES<PETScWrappers::MPI::Vector> solver(control,mem);
     PreconditionIdentity preconditioner;
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 74, 76);
   }
   GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
 
index e2bdb9c6b967fafcc0b827b3e21da77565576595..ad1ddf8a19931ab1572ca496d8964472030c9d84 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii11SolverGMRESINS_13PETScWrappers3MPI6VectorEEE
-DEAL:GMRES::Starting value 31.00
-DEAL:GMRES::Convergence step 75 value 0.0008096
-DEAL::Solver stopped after 75 iterations
+DEAL::Solver stopped within 74 - 76 iterations
index 49fa00fd1a48336776c34ae1b1cb7686568e9b5e..94c216cc760bc57e0c3ec782c6b6cf55c3bc6f05 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -96,7 +69,9 @@ int main(int argc, char **argv)
     GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
     SolverMinRes<PETScWrappers::MPI::Vector> solver(control,mem);
     PreconditionIdentity preconditioner;
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 42, 44);
   }
   GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
 
index cf60f86687ec0d2924de6b7f4dfd0b536b45137a..6601f40b3dd3bece901cef0ba5ed78f70bee58d5 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii12SolverMinResINS_13PETScWrappers3MPI6VectorEEE
-DEAL:minres::Starting value 31.0000
-DEAL:minres::Convergence step 43 value 0.000691560
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
index 291378d5db49d7bf719e46b867df78182d5efd05..40cd730ce7b85af5028f02f7a0a60441c68cf6ec 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -95,7 +68,9 @@ int main(int argc, char **argv)
     GrowingVectorMemory<PETScWrappers::MPI::Vector> mem;
     SolverQMRS<PETScWrappers::MPI::Vector> solver(control,mem);
     PreconditionIdentity preconditioner;
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 45, 47);
   }
   GrowingVectorMemory<PETScWrappers::MPI::Vector>::release_unused_memory ();
 
index a662db55b755b2794c2395ff8c6380af4ab2f0b4..f6882c4fea50307e5fe56f7192b723c36a23acf3 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii10SolverQMRSINS_13PETScWrappers3MPI6VectorEEE
-DEAL:QMRS::Starting value 31.0000
-DEAL:QMRS::Convergence step 46 value 0.000906349
-DEAL::Solver stopped after 46 iterations
+DEAL::Solver stopped within 45 - 47 iterations
index 877053b04e219902acc35db2b74cdb600d323481..4842113e0594cb7419211073f112bd0654717d8e 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 40, 42);
   }
 
 }
index 223728180003232627edcc2e59797bfe69809c2a..7d010484c8e6a0bd4862ece8fef2daa8b73ea926 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0006730
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
index 32b1768d202b6f757f68176de189e1f8a276fa33..ce1bc5feb597aef88500389932927649c54f136b 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      std::cout << e.what() << std::endl;
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -86,7 +58,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionNone preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 42, 44);
   }
 
 }
index bea3eb1acb2f54e340466baac7a5316492c1498c..a6685358aed82739564c3f1a002604b36d388150 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 31.00
-DEAL::Convergence step 43 value 0.0008189
-DEAL::Solver stopped after 43 iterations
+DEAL::Solver stopped within 42 - 44 iterations
index 4e82eb6fce376885fa93434ef911f0e574fb5dae..7405517a74e82a1751f0db6611f441d9a138c815 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,10 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionEisenstat preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 19, 21);
   }
 
 }
index 1a56252cae0658220cb0dd501c832eda7e770db2..1587b4f891e2895c08c9a2e114abc48b51cad01c 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 60.26
-DEAL::Convergence step 20 value 0.0006908
-DEAL::Solver stopped after 20 iterations
+DEAL::Solver stopped within 19 - 21 iterations
index 7d4cb5e4cf34e37b4d92dcb10708f8a3e4fa46eb..ac402465a1473e13554f4f3775e009eb8e9d569e 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,10 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionICC preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 16, 18);
   }
 
 }
index 3d30c3aa844c18e0a0b8ed936fde7519bad266ef..399218edbbd37abd63fbbc2ce85944c649240eb6 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 48.96
-DEAL::Convergence step 17 value 0.0004044
-DEAL::Solver stopped after 17 iterations
+DEAL::Solver stopped within 16 - 18 iterations
index 3fc5c010b7d4be0730d0a48c49318192e5cefdbe..3d9e7e0e2db18682823bb5a8d69dc6c89813d8ab 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -89,7 +62,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionILU preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 16, 18);
   }
 
 }
index 3d30c3aa844c18e0a0b8ed936fde7519bad266ef..399218edbbd37abd63fbbc2ce85944c649240eb6 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 48.96
-DEAL::Convergence step 17 value 0.0004044
-DEAL::Solver stopped after 17 iterations
+DEAL::Solver stopped within 16 - 18 iterations
index 4316a41c25f1e3392f99919a47a88fc53f3b729f..6d3b5506ffdae574b30562a26fe05d327fc7a8ac 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-
-  // we use a direct solver as a
-  // preconditioner. this should
-  // converge in one step!
-  Assert (solver_control.last_step() == 1,
-          ExcInternalError());
-}
-
 
 int main(int argc, char **argv)
 {
@@ -95,7 +62,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionLU preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 1, 1);
   }
 
 }
index 071b4be96eaf65596ce09c689e0727682bd2a225..ae203d043266f1e70fc086b67797c00f9b8b1f6f 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 1351.
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
index a73225564513090082301a4eebcec7981b4b9d29..37bfa4d9369e67d4ae2bf6f2ee9ab143729d87f4 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionParaSails preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 18, 20);
   }
 
 }
index 3923263fc3ecbfba56c8eae6ae03a86613405456..782a8b13366adc0f0d572337ae7efe8094057ab1 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionSOR preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 18, 20);
   }
 
 }
index d08690178c42e74efe2b0479abe8fd7ba1a5d2fa..d3a8127003c8806391827930c2be013662075788 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 29.45
-DEAL::Convergence step 19 value 0.0005731
-DEAL::Solver stopped after 19 iterations
+DEAL::Solver stopped within 18 - 20 iterations
index 54cf6d49e11c948e2cba9d02c57d6340e44f0dcb..6fc521ff0fa6d771d19208e0261e9b74975ead56 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCG solver(control);
     PETScWrappers::PreconditionSSOR preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 18, 20);
   }
 
 }
index d08690178c42e74efe2b0479abe8fd7ba1a5d2fa..d3a8127003c8806391827930c2be013662075788 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCGE
-DEAL::Starting value 29.45
-DEAL::Convergence step 19 value 0.0005731
-DEAL::Solver stopped after 19 iterations
+DEAL::Solver stopped within 18 - 20 iterations
index 16af79ec64f08b543f88b27a50169416f7534a78..552443aae776038f0570cc864ee7481d4367c643 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverBiCG solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 40, 42);
   }
 
 }
index d69ef9440f2f88aaaed9cb47444b0535862cab7f..f0b25b1f7cbfd5dd71c61b4048afd306a322ac25 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers10SolverBiCGE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0006730
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
index bcdbe9330d80108f2d1a94e6eeb95740074e02b7..663396c2c5ed1d456219e5b86951037e76e8d020 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverGMRES solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 47, 49);
   }
 
 }
index d06c236119030788c129765cfa86bbf75e33d041..9a755ab4552e855b33a91333752ac98fac3d2778 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers11SolverGMRESE
-DEAL::Starting value 7.750
-DEAL::Convergence step 48 value 0.0009841
-DEAL::Solver stopped after 48 iterations
+DEAL::Solver stopped within 47 - 49 iterations
index 5884307595c26dcae3ae001b22b53f7c9fefa8b1..43568369562db33e8a68a157a771506761f6f9e0 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      deallog.depth_file(0);
-      solver.solve(A,u,f,P);
-      deallog.depth_file(3);
-    }
-  catch (std::exception &e)
-    {
-      deallog.depth_file(3);
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -91,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverBicgstab solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 32, 34);
   }
 
 }
index ce55c30c11a416b5ee1a3511b9499ad954c9f0e0..135fdd9e398fcc236057f48c6b224be1a6d2b60a 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers14SolverBicgstabE
-DEAL::Solver stopped after 33 iterations
+DEAL::Solver stopped within 32 - 34 iterations
index bbc8741b6a3242e2b9425e28043c6f3ad08c1265..2a65aa9c7269edb53cb50009be4394b12660128e 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCGS solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 39, 41);
   }
 
 }
index f4c27026d0bb11aac0c6d8cc01f425308913ffdb..cf567fb63826d1cceebf6322e66ca40b9fb19e2e 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers9SolverCGSE
-DEAL::Starting value 7.750
-DEAL::Convergence step 40 value 0.0007519
-DEAL::Solver stopped after 40 iterations
+DEAL::Solver stopped within 39 - 41 iterations
index 6916a06cbd46f77be5c632c2b9707c1941a5659d..c04253976aac415be31b92dce90344d91eabb6fa 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverTFQMR solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 39, 41);
   }
 
 }
index 7f1d94f542f6344d70f8bb12a0ea541e033c8c9f..4a79733f7beb0f2e5ca2d99b665535eb46cbcc88 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers11SolverTFQMRE
-DEAL::Starting value 7.750
-DEAL::Convergence step 40 value 0.0008680
-DEAL::Solver stopped after 40 iterations
+DEAL::Solver stopped within 39 - 41 iterations
index 03abcd32135e4f2b934f9da6a658bfb64ebd1b57..978e7500d4b17439cf5b1f0faa618fb6729d7305 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -92,7 +65,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverTCQMR solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 43, 45);
   }
 
 }
index c1e7ffb703fbdd54d868c6d88d58b1a17d049a42..d328e4b0a8e8c278cd9cd36b463363b082289f4d 100644 (file)
@@ -1,7 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers11SolverTCQMRE
-DEAL::Starting value 7.750
-DEAL::Starting value 7.750
-DEAL::Convergence step 44 value 0.0007016
-DEAL::Solver stopped after 44 iterations
+DEAL::Solver stopped within 43 - 45 iterations
index b5e5997f7cb0c095e96c8347ffa83eb9370c5cea..265371e92c9004da593467f00eb7c11527c3f546 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-  try
-    {
-      solver.solve(A,u,f,P);
-    }
-  catch (std::exception &e)
-    {
-      deallog << e.what() << std::endl;
-      abort ();
-    }
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -88,7 +61,9 @@ int main(int argc, char **argv)
 
     PETScWrappers::SolverCR solver(control);
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 40, 42);
   }
 
 }
index 0c6333fd4071aa643a2b468ee5a5ea6741dedbd5..9faf70331d0c927d7e74f51e8208297834e3542c 100644 (file)
@@ -1,6 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers8SolverCRE
-DEAL::Starting value 7.750
-DEAL::Convergence step 41 value 0.0005700
-DEAL::Solver stopped after 41 iterations
+DEAL::Solver stopped within 40 - 42 iterations
index da8dd49cee6664f72dca97a6b8fbcbe834d73b42..f6db7ea29511b1c2887c84ba1e1f5a9558624b08 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  u = 0.;
-  f = 1.;
-
-  solver.solve(A,u,f,P);
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -82,10 +62,15 @@ int main(int argc, char **argv)
     PETScWrappers::SolverPreOnly solver(control);
 
     PETScWrappers::PreconditionJacobi preconditioner(A);
-    check_solve (solver, control, A,u,f, preconditioner);
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 1, 11);
 
     //run twice because this errored out at some point
-    check_solve (solver, control, A,u,f, preconditioner);
+    u = 0.;
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 1, 1);
   }
 
 }
index c8dbde4e654f65120f0d37bef3040fb6a5466bcd..afd486a1b08dde01e9b3f1e602628f5e5169b654 100644 (file)
@@ -1,7 +1,6 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 11 iterations
 DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
index 959a05f7269d7e0d52c67629c4192af73cc71323..4f2c679964c329ced0db3d7ce0c18bc9526cafcf 100644 (file)
 #include <deal.II/lac/vector_memory.h>
 #include <typeinfo>
 
-template <typename SolverType, typename MatrixType, typename VectorType, class PRECONDITION>
-void
-check_solve(SolverType          &solver,
-            const SolverControl &solver_control,
-            const MatrixType    &A,
-            VectorType          &u,
-            VectorType          &f,
-            const PRECONDITION  &P)
-{
-  deallog << "Solver type: " << typeid(solver).name() << std::endl;
-
-  solver.solve(A,u,f,P);
-
-  deallog << "Solver stopped after " << solver_control.last_step()
-          << " iterations" << std::endl;
-}
-
 
 int main(int argc, char **argv)
 {
@@ -82,12 +65,14 @@ int main(int argc, char **argv)
 
     PETScWrappers::PreconditionJacobi preconditioner(A);
 
-    check_solve (solver, control, A,u,f, preconditioner);
-
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,u,f,preconditioner),
+                              control.last_step(), 1, 1);
     deallog << u.l2_norm() << std::endl;
 
-    check_solve (solver, control, A,t,u, preconditioner);
-
+    deallog << "Solver type: " << typeid(solver).name() << std::endl;
+    check_solver_within_range(solver.solve(A,t,u,preconditioner),
+                              control.last_step(), 1, 1);
     deallog << t.l2_norm() << std::endl;
 
     u = 0;
index 49e671b4b8f28c25bef64bfceb7e376e9604f553..abc9dcad688cdf25c438d75589a3640156ef3d23 100644 (file)
@@ -1,11 +1,10 @@
 
 DEAL::Size 32 Unknowns 961
 DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Convergence step 1 value 0
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
 DEAL::7.750
 DEAL::Solver type: N6dealii13PETScWrappers13SolverPreOnlyE
-DEAL::Solver stopped after 1 iterations
+DEAL::Solver stopped within 1 - 1 iterations
 DEAL::1.938
 DEAL::7.750
 DEAL::1.938

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.