]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid using deprecated functionality 2697/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 22 Jun 2016 11:58:32 +0000 (13:58 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 22 Jun 2016 11:59:29 +0000 (13:59 +0200)
include/deal.II/lac/la_parallel_vector.h
include/deal.II/lac/la_parallel_vector.templates.h

index b83998ff7e2522f1450fb03a5aad6617dcafc6dc..28ede94cf2b08a66b6e8db807125b01ab215d14d 100644 (file)
@@ -1176,7 +1176,8 @@ namespace LinearAlgebra
     {
       IndexSet is (size());
 
-      is.add_range (local_range().first, local_range().second);
+      is.add_range (partitioner->local_range().first,
+                    partitioner->local_range().second);
 
       return is;
     }
@@ -1258,13 +1259,13 @@ namespace LinearAlgebra
     Number
     Vector<Number>::operator() (const size_type global_index) const
     {
-      Assert (in_local_range (global_index) ||
+      Assert (partitioner->in_local_range (global_index) ||
               partitioner->ghost_indices().is_element(global_index),
-              ExcAccessToNonLocalElement(global_index, local_range().first,
-                                         local_range().second,
+              ExcAccessToNonLocalElement(global_index, partitioner->local_range().first,
+                                         partitioner->local_range().second,
                                          partitioner->ghost_indices().n_elements()));
       // do not allow reading a vector which is not in ghost mode
-      Assert (in_local_range (global_index) || vector_is_ghosted == true,
+      Assert (partitioner->in_local_range (global_index) || vector_is_ghosted == true,
               ExcMessage("You tried to read a ghost element of this vector, "
                          "but it has not imported its ghost values."));
       return val[partitioner->global_to_local(global_index)];
@@ -1277,10 +1278,10 @@ namespace LinearAlgebra
     Number &
     Vector<Number>::operator() (const size_type global_index)
     {
-      Assert (in_local_range (global_index) ||
+      Assert (partitioner->in_local_range (global_index) ||
               partitioner->ghost_indices().is_element(global_index),
-              ExcAccessToNonLocalElement(global_index, local_range().first,
-                                         local_range().second,
+              ExcAccessToNonLocalElement(global_index, partitioner->local_range().first,
+                                         partitioner->local_range().second,
                                          partitioner->ghost_indices().n_elements()));
       // we would like to prevent reading ghosts from a vector that does not
       // have them imported, but this is not possible because we might be in a
index 7e5d2e5cc1840a5858b2b4d6c2b20629d5eee9ae..ef0384b0fb0f605e5626b3d70c9d0ace1df0d6ff 100644 (file)
@@ -353,9 +353,9 @@ namespace LinearAlgebra
           // (even if they happen to define the empty range as [0,0) or [c,c)
           // for some c!=0 in a different way).
           int local_ranges_are_identical =
-            (local_range() == c.local_range() ||
-             (local_range().second == local_range().first &&
-              c.local_range().second == c.local_range().first));
+            (partitioner->local_range() == c.partitioner->local_range() ||
+             (partitioner->local_range().second == partitioner->local_range().first &&
+              c.partitioner->local_range().second == c.partitioner->local_range().first));
           if ((c.partitioner->n_mpi_processes() > 1 &&
                Utilities::MPI::min(local_ranges_are_identical,
                                    c.partitioner->get_communicator()) == 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.