From: Daniel Arndt Date: Tue, 5 Jan 2021 17:35:31 +0000 (-0500) Subject: Fix up X-Git-Tag: v9.3.0-rc1~449^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=113648b41579ec4942530a86ed198d902a1c2fbc;p=dealii.git Fix up --- diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index ca7af1eb7d..2aa16137c9 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -653,7 +653,7 @@ namespace LinearAlgebra // set vector size and allocate memory const size_type new_allocated_size = - partitioner->locally_onwed_size() + partitioner->n_ghost_indices(); + partitioner->locally_owned_size() + partitioner->n_ghost_indices(); resize_val(new_allocated_size, comm_sm); // initialize to zero diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 15aa5ffab1..4a2d890d8f 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -3664,10 +3664,12 @@ namespace internal part.import_from_ghosted_array_start( dealii::VectorOperation::add, - component_in_block_vector + channel_shift, - ArrayView(vec.begin() + - vec.get_partitioner()->locally_owned_size(), - vec.get_partitioner()->n_ghost_indices()), + component_in_block_vector * 2 + channel_shift, + ArrayView(vec.begin(), part.locally_owned_size()), + vec.shared_vector_data(), + ArrayView(vec.begin() + part.locally_owned_size(), + matrix_free.get_dof_info(mf_component) + .vector_partitioner->n_ghost_indices()), ArrayView(tmp_data[component_in_block_vector]->begin(), part.n_import_indices()), this->requests[component_in_block_vector]); @@ -3828,19 +3830,12 @@ namespace internal if (part.n_ghost_indices() > 0) { - for (std::vector>:: - const_iterator my_ghosts = - part.ghost_indices_within_larger_ghost_set().begin(); - my_ghosts != - part.ghost_indices_within_larger_ghost_set().end(); - ++my_ghosts) - for (unsigned int j = my_ghosts->first; j < my_ghosts->second; - j++) - { - const_cast &>( - vec) - .local_element(j + part.locally_owned_size()) = 0.; - } + part.reset_ghost_values(ArrayView( + const_cast &>(vec) + .begin() + + part.locally_owned_size(), + matrix_free.get_dof_info(mf_component) + .vector_partitioner->n_ghost_indices())); } # endif diff --git a/source/non_matching/coupling.cc b/source/non_matching/coupling.cc index 33655dcdc1..d225512ba2 100644 --- a/source/non_matching/coupling.cc +++ b/source/non_matching/coupling.cc @@ -54,7 +54,7 @@ namespace NonMatching * Mapping and quadrature are those of this second triangulation. * * If the triangulation inside @p cache is parallel, only points lying over - * locally onwed cells are returned. This is why a vector of unsigned int + * locally owned cells are returned. This is why a vector of unsigned int * is returned: it describes the indices of cells from the immersed * triangulation which have been used (relative to a loop over al cells). If * embedding triangulation is not parallel, all cells shall be used.