]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rewrite test. 949/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 21 May 2015 03:57:59 +0000 (22:57 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 21 May 2015 03:57:59 +0000 (22:57 -0500)
The test uses PETScWrappers::Vector, but this class is now deprecated and indeed
produces an error now (because the respective include file has been removed
from the generic_linear_algebra.h include file.

tests/gla/extract_subvector_to.cc

index 72da2bddb42bdf4ea0f66fd2eed50451df815dd0..2b15af13a0a4517d0da99a16279c42087d5f33c8 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "../tests.h"
 #include <deal.II/lac/generic_linear_algebra.h>
+#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_parallel_block_vector.h>
 #include <deal.II/base/index_set.h>
 #include <deal.II/lac/constraint_matrix.h>
 #include <fstream>
@@ -76,7 +78,7 @@ int main (int argc, char **argv)
 
     {
       deallog.push("PETSc");
-      PETScWrappers::Vector v(17);
+      PETScWrappers::MPI::Vector v(MPI_COMM_SELF, 17, 17);
       test (v);
       deallog.pop();
     }
@@ -102,11 +104,11 @@ int main (int argc, char **argv)
 
     {
       deallog.push("PETSc");
-      PETScWrappers::BlockVector v(3);
-      v.block(0).reinit(7);
-      v.block(1).reinit(5);
-      v.block(2).reinit(3);
-      v.collect_sizes();
+      std::vector<PETScWrappers::MPI::BlockVector::size_type> sizes(3);
+      sizes[0] = 7;
+      sizes[1] = 5;
+      sizes[2] = 3;
+      PETScWrappers::MPI::BlockVector v(sizes, MPI_COMM_SELF, sizes);
       test (v);
       deallog.pop();
     }

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.