]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace vector_partitioner with thrilinos_partitioner
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 22 Dec 2018 14:33:52 +0000 (15:33 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 25 Dec 2018 22:02:05 +0000 (23:02 +0100)
include/deal.II/lac/read_write_vector.templates.h
include/deal.II/lac/trilinos_precondition.h
include/deal.II/lac/trilinos_vector.h
source/lac/trilinos_sparse_matrix.cc
source/lac/trilinos_vector.cc
tests/mpi/trilinos_compress_bug.cc
tests/mpi/trilinos_vector_reinit.cc
tests/trilinos/index_set_02.cc
tests/trilinos/readwritevector_02.cc
tests/trilinos/readwritevector_03.cc

index 7a2948bcc4e04c2cb6c550f2e3d1d65f7ad1fd90..9a802264816875a5ff8967388abe6c24dc23548f 100644 (file)
@@ -308,7 +308,7 @@ namespace LinearAlgebra
     // the argument's lifetime needs to be longer then. If we do this, we need
     // to think about whether the view should be read/write.
 
-    stored_elements = IndexSet(trilinos_vec.vector_partitioner());
+    stored_elements = IndexSet(trilinos_vec.trilinos_partitioner());
 
     resize_val(stored_elements.n_elements());
 
index 0a8787fa76fe94452991a85c8aa966d5fb85858c..56e459a0b3eb8e7022e824d7973b553024fa6cd3 100644 (file)
@@ -1976,9 +1976,11 @@ namespace TrilinosWrappers
   inline void
   PreconditionBase::vmult(MPI::Vector &dst, const MPI::Vector &src) const
   {
-    Assert(dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()),
+    Assert(dst.trilinos_partitioner().SameAs(
+             preconditioner->OperatorRangeMap()),
            ExcNonMatchingMaps("dst"));
-    Assert(src.vector_partitioner().SameAs(preconditioner->OperatorDomainMap()),
+    Assert(src.trilinos_partitioner().SameAs(
+             preconditioner->OperatorDomainMap()),
            ExcNonMatchingMaps("src"));
 
     const int ierr = preconditioner->ApplyInverse(src.trilinos_vector(),
@@ -1989,9 +1991,11 @@ namespace TrilinosWrappers
   inline void
   PreconditionBase::Tvmult(MPI::Vector &dst, const MPI::Vector &src) const
   {
-    Assert(dst.vector_partitioner().SameAs(preconditioner->OperatorRangeMap()),
+    Assert(dst.trilinos_partitioner().SameAs(
+             preconditioner->OperatorRangeMap()),
            ExcNonMatchingMaps("dst"));
-    Assert(src.vector_partitioner().SameAs(preconditioner->OperatorDomainMap()),
+    Assert(src.trilinos_partitioner().SameAs(
+             preconditioner->OperatorDomainMap()),
            ExcNonMatchingMaps("src"));
 
     preconditioner->SetUseTranspose(true);
index 79226b9f31402ebf6ccce71191fe7192b647ee80..95a9a8fdc0295c5de04001bd4ec8915b60ab2912 100644 (file)
@@ -1201,10 +1201,20 @@ namespace TrilinosWrappers
       /**
        * Return a const reference to the underlying Trilinos Epetra_Map that
        * sets the parallel partitioning of the vector.
+       *
+       * @deprecated Use trilinos_partitioner() instead.
        */
+      DEAL_II_DEPRECATED
       const Epetra_Map &
       vector_partitioner() const;
 
+      /**
+       * Return a const reference to the underlying Trilinos Epetra_BlockMap
+       * that sets the parallel partitioning of the vector.
+       */
+      const Epetra_BlockMap &
+      trilinos_partitioner() const;
+
       /**
        * Print to a stream. @p precision denotes the desired precision with
        * which values shall be printed, @p scientific whether scientific
@@ -2143,6 +2153,14 @@ namespace TrilinosWrappers
 
 
 
+    inline const Epetra_BlockMap &
+    Vector::trilinos_partitioner() const
+    {
+      return vector->Map();
+    }
+
+
+
     inline const MPI_Comm &
     Vector::get_mpi_communicator() const
     {
index a523b2423c72d1a5771fbf25223d776b1e6c6b16..b181dcac422de3c3e36cd533eaa7ef6180557dfb 100644 (file)
@@ -2068,10 +2068,10 @@ namespace TrilinosWrappers
                                 const TrilinosWrappers::MPI::Vector &in,
                                 const TrilinosWrappers::MPI::Vector &out)
       {
-        Assert(in.vector_partitioner().SameAs(m.DomainMap()) == true,
+        Assert(in.trilinos_partitioner().SameAs(m.DomainMap()) == true,
                ExcMessage(
                  "Column map of matrix does not fit with vector map!"));
-        Assert(out.vector_partitioner().SameAs(m.RangeMap()) == true,
+        Assert(out.trilinos_partitioner().SameAs(m.RangeMap()) == true,
                ExcMessage("Row map of matrix does not fit with vector map!"));
         (void)m;
         (void)in;
index dd96f6d021263226d4970c81ab81114e375b5237..0f53cca4bbcf0e22972e45c818f8de379324f165 100644 (file)
@@ -300,7 +300,7 @@ namespace TrilinosWrappers
         {
           TrilinosWrappers::types::int_type *glob_elements =
             TrilinosWrappers::my_global_elements(
-              v.block(block).vector_partitioner());
+              v.block(block).trilinos_partitioner());
           for (size_type i = 0; i < v.block(block).local_size(); ++i)
             global_ids[added_elements++] = glob_elements[i] + block_offset;
           owned_elements.add_indices(v.block(block).owned_elements,
@@ -313,7 +313,7 @@ namespace TrilinosWrappers
                          n_elements,
                          global_ids.data(),
                          0,
-                         v.block(0).vector_partitioner().Comm());
+                         v.block(0).trilinos_partitioner().Comm());
 
       auto actual_vec = std_cxx14::make_unique<Epetra_FEVector>(new_map);
 
@@ -616,7 +616,7 @@ namespace TrilinosWrappers
       // GlobalAssemble().
       double                double_mode = mode;
       const Epetra_MpiComm *comm_ptr =
-        dynamic_cast<const Epetra_MpiComm *>(&(vector_partitioner().Comm()));
+        dynamic_cast<const Epetra_MpiComm *>(&(trilinos_partitioner().Comm()));
       Assert(comm_ptr != nullptr, ExcInternalError());
       Utilities::MPI::MinMaxAvg result =
         Utilities::MPI::min_max_avg(double_mode, comm_ptr->GetMpiComm());
index 70f0064dae8c256f1d0aaae1d477c4fb662159e5..fed83f3628127ee6fcdc53222f4dacb4193e4d79 100644 (file)
@@ -63,7 +63,7 @@ test()
 
   test1.compress(VectorOperation::add);
 
-  // TrilinosWrappers::MPI::Vector test(test1.vector_partitioner()); // works
+  // TrilinosWrappers::MPI::Vector test(test1.trilinos_partitioner()); // works
   // TrilinosWrappers::MPI::Vector test(locally_owned); // works
   TrilinosWrappers::MPI::Vector test(test1); // fails
 
index 2d0bd3582288b2c5529a6da97743fd95b9eb12bf..da9991f227febd95382714d209066306b31df850 100644 (file)
@@ -40,7 +40,7 @@ test()
 
   TrilinosWrappers::MPI::Vector test1, test2;
 
-  AssertThrow(test1.vector_partitioner().SameAs(test2.vector_partitioner()),
+  AssertThrow(test1.trilinos_partitioner().SameAs(test2.trilinos_partitioner()),
               ExcInternalError());
 
   // first processor owns 2 indices, second
@@ -54,7 +54,7 @@ test()
   // reinit Trilinos vector from other vector
   test2.reinit(test1, true);
 
-  AssertThrow(test1.vector_partitioner().SameAs(test2.vector_partitioner()),
+  AssertThrow(test1.trilinos_partitioner().SameAs(test2.trilinos_partitioner()),
               ExcInternalError());
 
   if (Utilities::MPI::this_mpi_process(MPI_COMM_WORLD) == 0)
index a74d0b0a9a8ca46436fbb1e96c9ebdec62ce220c..fda3bf0c8e349b1bba3b2b5734892d4072226341 100644 (file)
@@ -66,7 +66,7 @@ test()
   TrilinosWrappers::MPI::Vector v;
 
   v.reinit(set_my, set_ghost, MPI_COMM_WORLD);
-  IndexSet from_partitioner(v.vector_partitioner());
+  IndexSet from_partitioner(v.trilinos_partitioner());
   deallog << "vec size: " << v.size()
           << " from_partitioner: " << from_partitioner.size() << std::endl;
 
index 7bcee170e8530238c643e747c227598d2c9091ec..f7151182a3074d344fac0d2c0ae5a7923dfc20b0 100644 (file)
@@ -60,7 +60,7 @@ test()
   tril_vector_ghosted.print(deallog.get_file_stream());
 
 
-  IndexSet readwrite_is(tril_vector_ghosted.vector_partitioner());
+  IndexSet readwrite_is(tril_vector_ghosted.trilinos_partitioner());
   deallog << "ghosted IS: ";
   readwrite_is.print(deallog);
 
index 270fb26ca43eae6d32b578a86c8823878378a2e7..b188b452edb64a120c2dce457628375f5237d210 100644 (file)
@@ -60,7 +60,7 @@ test()
   tril_vector_ghosted.print(deallog.get_file_stream());
 
 
-  IndexSet readwrite_is(tril_vector_ghosted.vector_partitioner());
+  IndexSet readwrite_is(tril_vector_ghosted.trilinos_partitioner());
   deallog << "ghosted IS: ";
   readwrite_is.print(deallog);
 

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.