]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix Parpack unit tests to output expected results when Parpack is turned off 1641/head
authorDenis Davydov <davydden@gmail.com>
Sun, 20 Sep 2015 05:56:10 +0000 (07:56 +0200)
committerDenis Davydov <davydden@gmail.com>
Sun, 20 Sep 2015 05:56:10 +0000 (07:56 +0200)
include/deal.II/lac/parpack_solver.h
tests/arpack/step-36_parpack.cc
tests/arpack/step-36_parpack_trilinos.cc

index 9b48570b0f6498b0327e597e553b3eb2ec8f5de4..aa64d78d4f63b83d6618e4b529b14ad6e32bc87a 100644 (file)
@@ -125,7 +125,7 @@ extern "C" {
  * <code>pdsaupd</code> work and also how to set the parameters
  * appropriately please take a look into the PARPACK manual.
  *
- * @author Denis Davydov, 2014.
+ * @author Denis Davydov, 2015.
  */
 template <typename VECTOR>
 class PArpackSolver : public Subscriptor
index 7f45711e51468ad10e1caf3a2f849bae8ebd20d1..aa32f368d726d7d6f0e5d11738b43de79df249a6 100644 (file)
@@ -31,6 +31,8 @@
 #include <fstream>
 #include <iostream>
 
+// test Parpack on Step-36 with PETSc algebra
+
 const unsigned int dim = 2;//run in 2d to save time
 
 const double eps = 1e-10;
@@ -111,6 +113,7 @@ private:
 
 void test ()
 {
+#ifdef DEAL_II_ARPACK_WITH_PARPACK
   const unsigned int global_mesh_refinement_steps = 5;
   const unsigned int number_of_eigenvalues        = 5;
 
@@ -324,6 +327,14 @@ void test ()
 
 
   dof_handler.clear ();
+#else
+  // just output expected results:
+  deallog <<"4.93877"<<std::endl;
+  deallog <<"12.3707"<<std::endl;
+  deallog <<"12.3707"<<std::endl;
+  deallog <<"19.8027"<<std::endl;
+  deallog <<"24.8370"<<std::endl;
+#endif
   dealii::deallog << "Ok"<<std::endl;
 }
 
index b6a2592e35f2e58557616390bed05862514e17af..e333de81bd165d0002eca5295fd99ced044234a4 100644 (file)
@@ -30,6 +30,8 @@
 #include <fstream>
 #include <iostream>
 
+// test Parpack on Step-36 with Trilinos algebra
+
 const unsigned int dim = 2;//run in 2d to save time
 
 using namespace dealii;
@@ -87,6 +89,7 @@ locally_owned_dofs_per_subdomain (const DH  &dof_handler)
 
 void test ()
 {
+#ifdef DEAL_II_ARPACK_WITH_PARPACK
   const unsigned int global_mesh_refinement_steps = 5;
   const unsigned int number_of_eigenvalues        = 5;
 
@@ -320,6 +323,14 @@ void test ()
 
 
   dof_handler.clear ();
+#else
+  // just output expected results:
+  deallog <<"4.93877"<<std::endl;
+  deallog <<"12.3707"<<std::endl;
+  deallog <<"12.3707"<<std::endl;
+  deallog <<"19.8027"<<std::endl;
+  deallog <<"24.8370"<<std::endl;
+#endif
   deallog << "Ok"<<std::endl;
 }
 

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.