From: Martin Kronbichler Date: Wed, 22 Jun 2016 11:58:32 +0000 (+0200) Subject: Avoid using deprecated functionality X-Git-Tag: v8.5.0-rc1~966^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca2cb148a12f279b16c69eeef2603bf419335d44;p=dealii.git Avoid using deprecated functionality --- diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index b83998ff7e..28ede94cf2 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -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::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::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 diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 7e5d2e5cc1..ef0384b0fb 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -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)