]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
test existence of abstract::Vector
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Nov 2012 22:21:46 +0000 (22:21 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 Nov 2012 22:21:46 +0000 (22:21 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@27549 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/ala_01.cc [new file with mode: 0644]
tests/lac/ala_01/cmp/generic [new file with mode: 0644]

diff --git a/tests/lac/ala_01.cc b/tests/lac/ala_01.cc
new file mode 100644 (file)
index 0000000..22db7bd
--- /dev/null
@@ -0,0 +1,76 @@
+//----------------------------  trilinos_01.cc  ---------------------------
+//    $Id: 01.cc 24425 2011-09-26 13:53:32Z bangerth $
+//    Version: $Name$ 
+//
+//    Copyright (C) 2004, 2005, 2008 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  trilinos_01.cc  ---------------------------
+
+
+// test contructing vectors
+
+#include "../tests.h" 
+#include <deal.II/base/utilities.h>
+#include <deal.II/lac/abstract_linear_algebra.h>
+#include <fstream>
+#include <iostream>
+
+template <class VEC>
+void test ()
+{
+  VEC x(3);
+  x(0)=10;
+  deallog << x.l2_norm() << std::endl;
+  
+  deallog << "OK" << std::endl;
+}
+
+
+
+int main (int argc,char **argv) 
+{
+  std::ofstream logfile("ala_01/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10); 
+
+  Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv);
+
+  try
+    {
+      {
+        test<dealii::LinearAlgebraPETSc::Vector> ();
+        test<dealii::LinearAlgebraDealII::Vector> ();
+       test<dealii::LinearAlgebraTrilinos::Vector> ();
+      }
+    }
+  catch (std::exception &exc)
+    {
+      std::cerr << std::endl << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      std::cerr << "Exception on processing: " << std::endl
+               << exc.what() << std::endl
+               << "Aborting!" << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      
+      return 1;
+    }
+  catch (...) 
+    {
+      std::cerr << std::endl << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      std::cerr << "Unknown exception!" << std::endl
+               << "Aborting!" << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      return 1;
+    };
+}
diff --git a/tests/lac/ala_01/cmp/generic b/tests/lac/ala_01/cmp/generic
new file mode 100644 (file)
index 0000000..a7b5e52
--- /dev/null
@@ -0,0 +1,16 @@
+
+DEAL:Power method::Starting value 1.246
+DEAL:Power method::Convergence step 44 value 9.310e-06
+DEAL::Eigenvalue 7.802 Error -0.002634
+DEAL:Power method::Starting value 0.02241
+DEAL:Power method::Convergence step 21 value 9.269e-06
+DEAL::Eigenvalue 0.2045 Error 0.008767
+DEAL:Wielandt::Starting value 0.08568
+DEAL:Wielandt::Convergence step 6 value 6.212e-06
+DEAL::Eigenvalue 0.1958 Error 1.517e-10
+DEAL:Wielandt::Starting value 0.7500
+DEAL:Wielandt::Convergence step 10 value 1.661e-06
+DEAL::Eigenvalue 7.078 Error -0.7265
+DEAL:Wielandt::Starting value 0.7500
+DEAL:Wielandt::Convergence step 18 value 2.795e-06
+DEAL::Eigenvalue 7.804 Error 0

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.