]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Apr 2004 18:02:07 +0000 (18:02 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Apr 2004 18:02:07 +0000 (18:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@9124 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/petsc_63.cc [new file with mode: 0644]
tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_63.output [new file with mode: 0644]

diff --git a/tests/bits/petsc_63.cc b/tests/bits/petsc_63.cc
new file mode 100644 (file)
index 0000000..d3ddd2b
--- /dev/null
@@ -0,0 +1,80 @@
+//----------------------------  petsc_63.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2004 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.
+//
+//----------------------------  petsc_63.cc  ---------------------------
+
+
+// PETScWrappers::SparseMatrix::reinit () was declared but not defined
+
+#include "../tests.h"
+#include <lac/petsc_sparse_matrix.h>
+#include <lac/vector.h>
+
+#include <fstream>
+#include <iostream>
+#include <vector>
+
+
+void test (PETScWrappers::MatrixBase &m)
+{
+  Assert (m.m() == 100, ExcInternalError());
+  Assert (m.n() == 100, ExcInternalError());
+
+  m.reinit ();
+  
+  Assert (m.m() == 100, ExcInternalError());
+  Assert (m.n() == 100, ExcInternalError());
+
+  deallog << "OK" << std::endl;
+}
+
+
+
+int main (int argc,char **argv) 
+{
+  std::ofstream logfile("petsc_63.output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  try
+    {
+      PetscInitialize(&argc,&argv,0,0);
+      {
+        PETScWrappers::SparseMatrix v (100,100,5);
+        test (v);
+      }
+      PetscFinalize();
+    }
+  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/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_63.output b/tests/results/i686-pc-linux-gnu+gcc3.2/bits/petsc_63.output
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

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.