]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix failing tests after removal of deprecated TrilinosWrappers vector functions 4360/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 9 May 2017 12:02:32 +0000 (14:02 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 9 May 2017 19:49:40 +0000 (21:49 +0200)
include/deal.II/lac/trilinos_parallel_block_vector.h
tests/gla/extract_subvector_to.cc
tests/lac/linear_operator_10.cc
tests/lac/linear_operator_10a.cc
tests/lac/linear_operator_15.cc
tests/lac/linear_operator_16.cc
tests/lac/schur_complement_04.cc

index 81b22369a876bb6c622885401c68cde9706537d9..611442c6b7f6253c70eeec623b689fcd0b6c4aa7 100644 (file)
@@ -456,7 +456,8 @@ namespace internal
                                 TrilinosWrappers::MPI::BlockVector &v,
                                 bool omit_zeroing_entries)
       {
-        v.reinit(matrix.range_partitioner(), omit_zeroing_entries);
+        v.reinit(matrix.locally_owned_range_indices(),
+                 matrix.get_mpi_communicator(), omit_zeroing_entries);
       }
 
       template <typename Matrix>
@@ -465,7 +466,8 @@ namespace internal
                                 TrilinosWrappers::MPI::BlockVector &v,
                                 bool omit_zeroing_entries)
       {
-        v.reinit(matrix.domain_partitioner(), omit_zeroing_entries);
+        v.reinit(matrix.locally_owned_domain_indices(),
+                 matrix.get_mpi_communicator(), omit_zeroing_entries);
       }
     };
 
index 8a08c5d78c34bac23e34e98e67e7476a6229b278..6e00ea0569436c08e660f9ba470e124d310f79d6 100644 (file)
@@ -85,7 +85,8 @@ int main (int argc, char **argv)
 
     {
       deallog.push("Trilinos");
-      TrilinosWrappers::Vector v(17);
+      TrilinosWrappers::Vector v;
+      v.reinit(17);
       test (v);
       deallog.pop();
     }
@@ -115,7 +116,8 @@ int main (int argc, char **argv)
 
     {
       deallog.push("Trilinos");
-      TrilinosWrappers::BlockVector v(3);
+      TrilinosWrappers::BlockVector v;
+      v.reinit(3);
       v.block(0).reinit(7);
       v.block(1).reinit(5);
       v.block(2).reinit(3);
index 5526bc5ed6871c5ad58380e24159dcbcd26e5ac7..0f2998be40b744bbe04b8e2080f2cea184e460d8 100644 (file)
@@ -224,8 +224,10 @@ int main(int argc, char *argv[])
     sparsity_pattern.compress();
 
     TrilinosWrappers::SparseMatrix A (sparsity_pattern);
-    TrilinosWrappers::Vector b (A.domain_partitioner());
-    TrilinosWrappers::MPI::Vector c (A.domain_partitioner());
+    TrilinosWrappers::Vector b;
+    b.reinit(A.locally_owned_domain_indices());
+    TrilinosWrappers::MPI::Vector c;
+    c.reinit(A.locally_owned_domain_indices());
     for (unsigned int i=0; i < rc; ++i)
       {
         A.set(i,i,2.0);
index ddb3060ce5381b520d9722f1b04009d1bc458427..132550237995d6f317de387edc313becd22da1d9 100644 (file)
@@ -230,8 +230,10 @@ int main(int argc, char *argv[])
     sparsity_pattern.compress();
 
     TrilinosWrappers::SparseMatrix A (sparsity_pattern);
-    TrilinosWrappers::Vector b (A.domain_partitioner());
-    TrilinosWrappers::MPI::Vector c (A.domain_partitioner());
+    TrilinosWrappers::Vector b;
+    b.reinit(A.domain_partitioner());
+    TrilinosWrappers::MPI::Vector c;
+    c.reinit(A.locally_owned_domain_indices());
     for (unsigned int i=0; i < rc; ++i)
       {
         A.set(i,i,2.0);
index 34a90a29167b17b2385967e7bc0de90758c625a8..3ce60dcfdab2a3605b312841b8ad45c71b3ffebf 100644 (file)
@@ -69,8 +69,10 @@ int main (int argc, char *argv[])
     A.reinit(csp);
     testproblem.five_point(A);
 
-    TrilinosWrappers::Vector  f(dim);
-    TrilinosWrappers::Vector  u(dim);
+    TrilinosWrappers::Vector  f;
+    f.reinit(dim);
+    TrilinosWrappers::Vector  u;
+    u.reinit(dim);
 
     A.compress (VectorOperation::insert);
     f.compress (VectorOperation::insert);
index b7ac9c2d11a0b01ca9f6029e16d0148b5cd231b8..ad39b238b81345c82d0b2c8cde7f5b328d953b6a 100644 (file)
@@ -69,8 +69,10 @@ int main (int argc, char *argv[])
     A.reinit(csp);
     testproblem.five_point(A);
 
-    TrilinosWrappers::Vector  f(dim);
-    TrilinosWrappers::Vector  u(dim);
+    TrilinosWrappers::Vector  f;
+    f.reinit(dim);
+    TrilinosWrappers::Vector  u;
+    u.reinit(dim);
 
     A.compress (VectorOperation::insert);
     f.compress (VectorOperation::insert);
index 08faef2b40b472cf254d40dcfa0735eb12173aed..099c8729ec0f9a84594b4c7bebd4f801db015c0e 100644 (file)
@@ -102,8 +102,10 @@ int main(int argc,char **argv)
       TrilinosWrappers::SparseMatrix C (rc,rc,rc);
       TrilinosWrappers::SparseMatrix D (rc,rc,rc);
 
-      VectorType y (rc);
-      VectorType g (rc);
+      VectorType y;
+      y.reinit(rc);
+      VectorType g;
+      g.reinit(rc);
       for (unsigned int i=0; i < rc; ++i)
         {
           A.set(i,i, 1.0*(i+1));

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.