]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix up
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 5 Jan 2021 17:35:31 +0000 (12:35 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 11 Feb 2021 16:52:47 +0000 (11:52 -0500)
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/matrix_free/matrix_free.h
source/non_matching/coupling.cc

index ca7af1eb7d2e73dda50c39d09932143beeb3d495..2aa16137c908ba80fcb4b9c573edcd1342efbd7f 100644 (file)
@@ -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
index 15aa5ffab162f8c52ff7cd08aa25b73debe779a9..4a2d890d8f95b03562a42e15e8644397a0c66bfa 100644 (file)
@@ -3664,10 +3664,12 @@ namespace internal
 
           part.import_from_ghosted_array_start(
             dealii::VectorOperation::add,
-            component_in_block_vector + channel_shift,
-            ArrayView<Number>(vec.begin() +
-                                vec.get_partitioner()->locally_owned_size(),
-                              vec.get_partitioner()->n_ghost_indices()),
+            component_in_block_vector * 2 + channel_shift,
+            ArrayView<Number>(vec.begin(), part.locally_owned_size()),
+            vec.shared_vector_data(),
+            ArrayView<Number>(vec.begin() + part.locally_owned_size(),
+                              matrix_free.get_dof_info(mf_component)
+                                .vector_partitioner->n_ghost_indices()),
             ArrayView<Number>(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<std::pair<unsigned int, unsigned int>>::
-                     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<LinearAlgebra::distributed::Vector<Number> &>(
-                      vec)
-                      .local_element(j + part.locally_owned_size()) = 0.;
-                  }
+              part.reset_ghost_values(ArrayView<Number>(
+                const_cast<LinearAlgebra::distributed::Vector<Number> &>(vec)
+                    .begin() +
+                  part.locally_owned_size(),
+                matrix_free.get_dof_info(mf_component)
+                  .vector_partitioner->n_ghost_indices()));
             }
 
 #  endif
index 33655dcdc1fb6f692d3224662477dafdc413d64a..d225512ba2b48b38f9840187e94480e49369d989 100644 (file)
@@ -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.

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.