]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use copy function internally in LA::d::Vector. 14442/head
authorMarc Fehling <mafehling.git@gmail.com>
Tue, 15 Nov 2022 21:40:19 +0000 (14:40 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Tue, 15 Nov 2022 21:40:19 +0000 (14:40 -0700)
include/deal.II/lac/la_parallel_vector.templates.h

index f6bd7941ca145d7590ee42d2fb91008b2c9f802d..596855e0720a26b0256cc7d6ce2717476f56f60e 100644 (file)
@@ -694,16 +694,7 @@ namespace LinearAlgebra
 
       thread_loop_partitioner = v.thread_loop_partitioner;
 
-      const size_type this_size = locally_owned_size();
-      if (this_size > 0)
-        {
-          dealii::internal::VectorOperations::
-            functions<Number, Number, MemorySpaceType>::copy(
-              thread_loop_partitioner,
-              partitioner->locally_owned_size(),
-              v.data,
-              data);
-        }
+      copy_locally_owned_data_from(v);
     }
 
 
@@ -848,13 +839,7 @@ namespace LinearAlgebra
 
       thread_loop_partitioner = c.thread_loop_partitioner;
 
-      const size_type this_size = partitioner->locally_owned_size();
-      if (this_size > 0)
-        {
-          dealii::internal::VectorOperations::
-            functions<Number, Number2, MemorySpaceType>::copy(
-              thread_loop_partitioner, this_size, c.data, data);
-        }
+      copy_locally_owned_data_from(c);
 
       if (must_update_ghost_values)
         update_ghost_values();

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.