]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid the name 'import' as a function name.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 11 May 2023 16:40:31 +0000 (10:40 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 23 May 2023 21:47:11 +0000 (15:47 -0600)
90 files changed:
examples/step-50/step-50.cc
examples/step-64/doc/intro.dox
examples/step-64/step-64.cc
include/deal.II/dofs/dof_accessor.templates.h
include/deal.II/lac/cuda_vector.h
include/deal.II/lac/la_parallel_block_vector.h
include/deal.II/lac/la_parallel_block_vector.templates.h
include/deal.II/lac/la_parallel_vector.h
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/lac/la_vector.h
include/deal.II/lac/la_vector.templates.h
include/deal.II/lac/read_write_vector.h
include/deal.II/lac/read_write_vector.templates.h
include/deal.II/lac/trilinos_epetra_vector.h
include/deal.II/lac/trilinos_tpetra_vector.h
include/deal.II/lac/trilinos_tpetra_vector.templates.h
include/deal.II/lac/trilinos_vector.h
include/deal.II/lac/vector_space_vector.h
include/deal.II/numerics/data_out_dof_data.templates.h
source/fe/mapping_q_cache.cc
source/lac/cuda_vector.cc
source/lac/la_parallel_vector.cc
source/lac/la_parallel_vector.inst.in
source/lac/read_write_vector.cc
source/lac/read_write_vector_cuda.cc
source/lac/trilinos_epetra_vector.cc
source/lac/trilinos_vector.cc
tests/belos/solver_belos_01.cc
tests/cuda/coefficient_eval.cc
tests/cuda/cuda_evaluate_2d_shape.cc
tests/cuda/cuda_vector_01.cc
tests/cuda/cuda_vector_02.cc
tests/cuda/cuda_vector_03.cc
tests/cuda/cuda_vector_04.cc
tests/cuda/cuda_vector_05.cc
tests/cuda/matrix_free_matrix_vector_10.cc
tests/cuda/matrix_free_matrix_vector_10a.cc
tests/cuda/matrix_free_matrix_vector_19.cc
tests/cuda/matrix_free_matrix_vector_25.cc
tests/cuda/matrix_free_matrix_vector_26.cc
tests/cuda/matrix_free_multiple_objects.cc
tests/cuda/matrix_vector_common.h
tests/cuda/precondition_01.cc
tests/cuda/precondition_02.cc
tests/cuda/precondition_03.cc
tests/cuda/solver_01.cc
tests/cuda/solver_02.cc
tests/cuda/solver_03.cc
tests/cuda/solver_04.cc
tests/cuda/solver_05.cc
tests/cuda/solver_06.cc
tests/cuda/solver_07.cc
tests/cuda/solver_08.cc
tests/cuda/solver_09.cc
tests/cuda/solver_10.cc
tests/cuda/sparse_matrix_01.cc
tests/lac/parallel_vector_01.cc
tests/lac/parallel_vector_02.cc
tests/lac/parallel_vector_03.cc
tests/lac/parallel_vector_03a.cc
tests/lac/parallel_vector_04.cc
tests/lac/parallel_vector_05.cc
tests/lac/parallel_vector_06.cc
tests/lac/parallel_vector_08.cc
tests/lac/parallel_vector_10.cc
tests/lac/parallel_vector_11.cc
tests/lac/parallel_vector_12.cc
tests/lac/parallel_vector_13.cc
tests/lac/parallel_vector_14.cc
tests/lac/parallel_vector_15.cc
tests/lac/parallel_vector_21.cc
tests/lac/parallel_vector_23.cc
tests/lac/parallel_vector_25.cc
tests/mpi/parallel_vector_20.cc
tests/mpi/parallel_vector_23.cc
tests/mpi/parallel_vector_24.cc
tests/trilinos/epetra_vector_01.cc
tests/trilinos/epetra_vector_02.cc
tests/trilinos/epetra_vector_03.cc
tests/trilinos/readwritevector.cc
tests/trilinos/readwritevector_02.cc
tests/trilinos/readwritevector_04.cc
tests/trilinos/sparse_matrix_vector_12.cc
tests/trilinos/sparse_matrix_vector_13.cc
tests/trilinos/sparse_matrix_vector_14.cc
tests/trilinos/sparse_matrix_vector_15.cc
tests/trilinos/subtract_mean_value_04.cc
tests/trilinos/tpetra_vector_01.cc
tests/trilinos/tpetra_vector_02.cc
tests/trilinos/tpetra_vector_03.cc

index 92f67364997a6be4babda5b3808675ce5af7e930..b6b5d3ab068b962f8cc9e0c4a3134f0b758591d2 100644 (file)
@@ -105,13 +105,13 @@ namespace ChangeVectorTypes
             const LinearAlgebra::distributed::Vector<number> &in)
   {
     LinearAlgebra::ReadWriteVector<double> rwv(out.locally_owned_elements());
-    rwv.import(in, VectorOperation::insert);
+    rwv.import_elements(in, VectorOperation::insert);
 #ifdef USE_PETSC_LA
     AssertThrow(false,
                 ExcMessage("CopyVectorTypes::copy() not implemented for "
                            "PETSc vector types."));
 #else
-    out.import(rwv, VectorOperation::insert);
+    out.import_elements(rwv, VectorOperation::insert);
 #endif
   }
 
@@ -130,7 +130,7 @@ namespace ChangeVectorTypes
 #else
     rwv.reinit(in);
 #endif
-    out.import(rwv, VectorOperation::insert);
+    out.import_elements(rwv, VectorOperation::insert);
   }
 } // namespace ChangeVectorTypes
 
index 368f4513c48db4ad37771ff60cbc9cac3097c11c..80a8c03ba0bbf03daa078f70a4498949d22df304 100644 (file)
@@ -86,12 +86,12 @@ LinearAlgebra::CUDAWrappers::Vector:
 
   // Move the data to the device:
   LinearAlgebra::CUDAWrappers::Vector<double> vector_dev(size);
-  vector_dev.import(rw_vector, VectorOperations::insert);
+  vector_dev.import_elements(rw_vector, VectorOperations::insert);
 
   ...do some computations on the device...
 
   // Move the data back to the host:
-  rw_vector.import(vector_dev, VectorOperations::insert);
+  rw_vector.import_elements(vector_dev, VectorOperations::insert);
 @endcode
 Both of the vector classes used here only work on a single machine,
 i.e., one memory space on a host and one on a device.
@@ -113,7 +113,7 @@ which is similar but the `import()` stage may involve MPI communication:
   // Move the data to the device:
   LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA>
     distributed_vector_dev(locally_owned_dofs, MPI_COMM_WORLD);
-  distributed_vector_dev.import(owned_rw_vector, VectorOperations::insert);
+  distributed_vector_dev.import_elements(owned_rw_vector, VectorOperations::insert);
 
   ...do something with the dev_vector...
 
@@ -122,7 +122,7 @@ which is similar but the `import()` stage may involve MPI communication:
     relevant_rw_vector(locally_relevant_dofs);
 
   // Move the data to the host, possibly using MPI communication:
-  relevant_rw_vector.import(distributed_vector_dev, VectorOperations::insert);
+  relevant_rw_vector.import_elements(distributed_vector_dev, VectorOperations::insert);
 @endcode
 The `relevant_rw_vector` is an object that stores a subset of all
 elements of the vector. Typically, these are the
index f63796d1094fdd3841b7c36de9a46b2c021a3f66..b6c119f078b77b03791f9d98c295f248948d001a 100644 (file)
@@ -492,8 +492,8 @@ namespace Step64
     system_rhs_host.compress(VectorOperation::add);
 
     LinearAlgebra::ReadWriteVector<double> rw_vector(locally_owned_dofs);
-    rw_vector.import(system_rhs_host, VectorOperation::insert);
-    system_rhs_dev.import(rw_vector, VectorOperation::insert);
+    rw_vector.import_elements(system_rhs_host, VectorOperation::insert);
+    system_rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   }
 
 
@@ -525,8 +525,8 @@ namespace Step64
           << std::endl;
 
     LinearAlgebra::ReadWriteVector<double> rw_vector(locally_owned_dofs);
-    rw_vector.import(solution_dev, VectorOperation::insert);
-    ghost_solution_host.import(rw_vector, VectorOperation::insert);
+    rw_vector.import_elements(solution_dev, VectorOperation::insert);
+    ghost_solution_host.import_elements(rw_vector, VectorOperation::insert);
 
     constraints.distribute(ghost_solution_host);
 
index 2a55038fa7821a43e6f479750e970faf5e7d48ad..dcbade4d6d5434ee1a537be4d832cd9bfe9de975 100644 (file)
@@ -824,7 +824,7 @@ namespace internal
         index_set.add_indices(cache_indices.begin(), cache_indices.end());
         index_set.compress();
         LinearAlgebra::ReadWriteVector<Number> read_write_vector(index_set);
-        read_write_vector.import(values, VectorOperation::insert);
+        read_write_vector.import_elements(values, VectorOperation::insert);
 
         // Copy the elements from read_write_vector and reorder them.
         for (unsigned int i = 0; i < cache_size; ++i, ++local_values_begin)
@@ -852,7 +852,7 @@ namespace internal
         index_set.add_indices(cache_indices.begin(), cache_indices.end());
         index_set.compress();
         LinearAlgebra::ReadWriteVector<double> read_write_vector(index_set);
-        read_write_vector.import(values, VectorOperation::insert);
+        read_write_vector.import_elements(values, VectorOperation::insert);
 
         // Copy the elements from read_write_vector and reorder them.
         for (unsigned int i = 0; i < cache_size; ++i, ++local_values_begin)
index b53bbaa4e0dd8727ce6f44bbb7fc7d82df009395..0797cad4a32134996eb14ce6ca8264cca68276cf 100644 (file)
@@ -141,10 +141,11 @@ namespace LinearAlgebra
        * copy a vector to the GPU.
        */
       virtual void
-      import(const ReadWriteVector<Number> &V,
-             VectorOperation::values        operation,
-             std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-               communication_pattern = {}) override;
+      import_elements(
+        const ReadWriteVector<Number> &V,
+        VectorOperation::values        operation,
+        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          communication_pattern = {}) override;
 
       /**
        * Sets all elements of the vector to the scalar @p s. This operation is
index 659a22a7f3583b598f45db08289473079181993e..473461a40b19e8a1c2c3c8fc1999b31e7f5a9064 100644 (file)
@@ -524,10 +524,11 @@ namespace LinearAlgebra
        * improve performance.
        */
       virtual void
-      import(const LinearAlgebra::ReadWriteVector<Number> &V,
-             VectorOperation::values                       operation,
-             std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-               communication_pattern = {}) override;
+      import_elements(
+        const LinearAlgebra::ReadWriteVector<Number> &V,
+        VectorOperation::values                       operation,
+        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          communication_pattern = {}) override;
 
       /**
        * Return the scalar product of two vectors.
index 14edd312dfc795b96ffaee5567e9f622bcc2055e..03ce6b74b0ded0242710882118df39b7910efc36 100644 (file)
@@ -355,8 +355,9 @@ namespace LinearAlgebra
           IndexSet    combined_set = partitioner->locally_owned_range();
           combined_set.add_indices(partitioner->ghost_indices());
           ReadWriteVector<Number> rw_vector(combined_set);
-          rw_vector.import(trilinos_vec.block(i), VectorOperation::insert);
-          this->block(i).import(rw_vector, VectorOperation::insert);
+          rw_vector.import_elements(trilinos_vec.block(i),
+                                    VectorOperation::insert);
+          this->block(i).import_elements(rw_vector, VectorOperation::insert);
 
           if (this->block(i).has_ghost_elements() ||
               trilinos_vec.block(i).has_ghost_elements())
@@ -895,7 +896,7 @@ namespace LinearAlgebra
 
     template <typename Number>
     inline void
-    BlockVector<Number>::import(
+    BlockVector<Number>::import_elements(
       const LinearAlgebra::ReadWriteVector<Number> &,
       VectorOperation::values,
       std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>)
index d03461cf5d3984310aea1420a56f3536e37b23de..7f0e23025c689ec21045a32d1e29f311c089ed2d 100644 (file)
@@ -206,13 +206,13 @@ namespace LinearAlgebra
      *                   Kokkos::View<double,
      * MemorySpace::Default::kokkos_space>( vector_dev, n_local_elements));
      * @endcode
-     * <li> use import():
+     * <li> use import_elements():
      * @code
      * Vector<double, MemorySpace::Default> vector(local_range, comm);
      * ReadWriteVector<double> rw_vector(local_range);
      * for (auto & val : rw_vector)
      *   val = 1.;
-     * vector.import(rw_vector, VectorOperations::insert);
+     * vector.import_elements(rw_vector, VectorOperations::insert);
      * @endcode
      * </ul>
      * The import method is a lot safer and will perform an MPI communication if
@@ -691,8 +691,8 @@ namespace LinearAlgebra
        */
       template <typename MemorySpace2>
       void
-      import(const Vector<Number, MemorySpace2> &src,
-             VectorOperation::values             operation);
+      import_elements(const Vector<Number, MemorySpace2> &src,
+                      VectorOperation::values             operation);
 
       /** @} */
 
@@ -745,10 +745,11 @@ namespace LinearAlgebra
        * be moved to the @ref GlossDevice "device".
        */
       virtual void
-      import(const LinearAlgebra::ReadWriteVector<Number> &V,
-             VectorOperation::values                       operation,
-             std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-               communication_pattern = {}) override;
+      import_elements(
+        const LinearAlgebra::ReadWriteVector<Number> &V,
+        VectorOperation::values                       operation,
+        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          communication_pattern = {}) override;
 
       /**
        * Return the scalar product of two vectors.
index 36242604f54ca2de8bd4119dd188ecd9e6e176e2..bc4e98d239601c7ac26756efc9e8ff89662255db 100644 (file)
@@ -898,7 +898,7 @@ namespace LinearAlgebra
     template <typename Number, typename MemorySpaceType>
     template <typename MemorySpaceType2>
     void
-    Vector<Number, MemorySpaceType>::import(
+    Vector<Number, MemorySpaceType>::import_elements(
       const Vector<Number, MemorySpaceType2> &src,
       VectorOperation::values                 operation)
     {
@@ -1240,7 +1240,7 @@ namespace LinearAlgebra
 
     template <typename Number, typename MemorySpaceType>
     void
-    Vector<Number, MemorySpaceType>::import(
+    Vector<Number, MemorySpaceType>::import_elements(
       const ReadWriteVector<Number> &V,
       VectorOperation::values        operation,
       std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
index a865fdbaa5b21c4152128de7d200f1fe9d43d6ac..b3bfee762b0a5309816e6495c059f11ffc22407b 100644 (file)
@@ -222,10 +222,11 @@ namespace LinearAlgebra
      * This function is not implemented and will throw an exception.
      */
     virtual void
-    import(const ReadWriteVector<Number> &V,
-           VectorOperation::values        operation,
-           std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             communication_pattern = {}) override;
+    import_elements(
+      const ReadWriteVector<Number> &V,
+      VectorOperation::values        operation,
+      std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        communication_pattern = {}) override;
 
     /**
      * Add @p a to all components. Note that @p a is a scalar not a vector.
index 1d56f6462f92a32555210ec315861b5d7eef66c7..1e2409c68abdd3b7ea1b1794f3a3ec148eaf9fdc 100644 (file)
@@ -248,7 +248,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  Vector<Number>::import(
+  Vector<Number>::import_elements(
     const ReadWriteVector<Number> &,
     VectorOperation::values,
     std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>)
index 90e536388f798eb07c80f7c3ab946aa61f0409ac..2a31b247af4a303ae255de86342202946b9e1ce5 100644 (file)
@@ -298,10 +298,11 @@ namespace LinearAlgebra
      *   dealing with a serial vector here.
      */
     void
-    import(const dealii::Vector<Number> &vec,
-           VectorOperation::values       operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const dealii::Vector<Number> &vec,
+      VectorOperation::values       operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 
     /**
      * Imports all the elements present in the vector's IndexSet from the
@@ -313,10 +314,11 @@ namespace LinearAlgebra
      *   dealing with a serial vector here.
      */
     void
-    import(const LinearAlgebra::Vector<Number> &vec,
-           VectorOperation::values              operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const LinearAlgebra::Vector<Number> &vec,
+      VectorOperation::values              operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 
     /**
      * Imports all the elements present in the vector's IndexSet from the
@@ -328,10 +330,11 @@ namespace LinearAlgebra
      */
     template <typename MemorySpace>
     void
-    import(const distributed::Vector<Number, MemorySpace> &vec,
-           VectorOperation::values                         operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const distributed::Vector<Number, MemorySpace> &vec,
+      VectorOperation::values                         operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 
 #ifdef DEAL_II_WITH_PETSC
     /**
@@ -343,10 +346,11 @@ namespace LinearAlgebra
      * performance.
      */
     void
-    import(const PETScWrappers::MPI::Vector &petsc_vec,
-           VectorOperation::values           operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const PETScWrappers::MPI::Vector &petsc_vec,
+      VectorOperation::values           operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 #endif
 
 #ifdef DEAL_II_WITH_TRILINOS
@@ -361,10 +365,11 @@ namespace LinearAlgebra
      * @note The @p trilinos_vec is not allowed to have ghost entries.
      */
     void
-    import(const TrilinosWrappers::MPI::Vector &trilinos_vec,
-           VectorOperation::values              operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const TrilinosWrappers::MPI::Vector &trilinos_vec,
+      VectorOperation::values              operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
     /**
@@ -378,10 +383,11 @@ namespace LinearAlgebra
     template <typename Dummy = Number>
     std::enable_if_t<std::is_same<Dummy, Number>::value &&
                      dealii::is_tpetra_type<Number>::value>
-    import(const TpetraWrappers::Vector<Number> &tpetra_vec,
-           VectorOperation::values               operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const TpetraWrappers::Vector<Number> &tpetra_vec,
+      VectorOperation::values               operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 #  endif
 
     /**
@@ -393,10 +399,11 @@ namespace LinearAlgebra
      * performance.
      */
     void
-    import(const EpetraWrappers::Vector &epetra_vec,
-           VectorOperation::values       operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const EpetraWrappers::Vector &epetra_vec,
+      VectorOperation::values       operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 #endif
 
 #ifdef DEAL_II_WITH_CUDA
@@ -407,10 +414,11 @@ namespace LinearAlgebra
      * replace the current elements. The last parameter is not used.
      */
     void
-    import(const CUDAWrappers::Vector<Number> &cuda_vec,
-           VectorOperation::values             operation,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern = {});
+    import_elements(
+      const CUDAWrappers::Vector<Number> &cuda_vec,
+      VectorOperation::values             operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern = {});
 #endif
 
     /**
@@ -661,13 +669,14 @@ namespace LinearAlgebra
     template <typename Dummy = Number>
     std::enable_if_t<std::is_same<Dummy, Number>::value &&
                      dealii::is_tpetra_type<Number>::value>
-    import(const Tpetra::Vector<Number, int, types::signed_global_dof_index>
-             &                     tpetra_vector,
-           const IndexSet &        locally_owned_elements,
-           VectorOperation::values operation,
-           const MPI_Comm          mpi_comm,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern);
+    import_elements(
+      const Tpetra::Vector<Number, int, types::signed_global_dof_index>
+        &                     tpetra_vector,
+      const IndexSet &        locally_owned_elements,
+      VectorOperation::values operation,
+      const MPI_Comm          mpi_comm,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern);
 #  endif
 
     /**
@@ -676,12 +685,13 @@ namespace LinearAlgebra
      * used directly.
      */
     void
-    import(const Epetra_MultiVector &multivector,
-           const IndexSet &          locally_owned_elements,
-           VectorOperation::values   operation,
-           const MPI_Comm            mpi_comm,
-           const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             &communication_pattern);
+    import_elements(
+      const Epetra_MultiVector &multivector,
+      const IndexSet &          locally_owned_elements,
+      VectorOperation::values   operation,
+      const MPI_Comm            mpi_comm,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern);
 #endif
 
     /**
index 692f306049258ba0ef91675eca5e44f1596dff72..b3188d55fa64dc9ed2c27d87e613bd7ce6885d11 100644 (file)
@@ -96,11 +96,12 @@ namespace LinearAlgebra
     struct read_write_vector_functions
     {
       static void
-      import(const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
-               &                           communication_pattern,
-             const Number *                values,
-             const VectorOperation::values operation,
-             ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
+      import_elements(
+        const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
+          &                                               communication_pattern,
+        const Number *                                    values,
+        const VectorOperation::values                     operation,
+        ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
       {
         (void)communication_pattern;
         (void)values;
@@ -123,11 +124,12 @@ namespace LinearAlgebra
 
 
       static void
-      import(const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
-               &                           communication_pattern,
-             const Number *                values,
-             const VectorOperation::values operation,
-             ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
+      import_elements(
+        const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
+          &                                               communication_pattern,
+        const Number *                                    values,
+        const VectorOperation::values                     operation,
+        ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
       {
         distributed::Vector<Number, ::dealii::MemorySpace::Host> tmp_vector(
           communication_pattern);
@@ -166,11 +168,12 @@ namespace LinearAlgebra
       using size_type = types::global_dof_index;
 
       static void
-      import(const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
-               &                           communication_pattern,
-             const Number *                values,
-             const VectorOperation::values operation,
-             ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
+      import_elements(
+        const std::shared_ptr<const ::dealii::Utilities::MPI::Partitioner>
+          &                                               communication_pattern,
+        const Number *                                    values,
+        const VectorOperation::values                     operation,
+        ::dealii::LinearAlgebra::ReadWriteVector<Number> &rw_vector)
       {
         distributed::Vector<Number, ::dealii::MemorySpace::Host> tmp_vector(
           communication_pattern);
@@ -446,7 +449,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const dealii::Vector<Number> &vec,
     VectorOperation::values       operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
@@ -461,7 +464,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const LinearAlgebra::Vector<Number> &vec,
     VectorOperation::values              operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
@@ -477,7 +480,7 @@ namespace LinearAlgebra
   template <typename Number>
   template <typename MemorySpace>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const distributed::Vector<Number, MemorySpace> &vec,
     VectorOperation::values                         operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
@@ -504,7 +507,7 @@ namespace LinearAlgebra
       }
 
 
-    internal::read_write_vector_functions<Number, MemorySpace>::import(
+    internal::read_write_vector_functions<Number, MemorySpace>::import_elements(
       comm_pattern, vec.begin(), operation, *this);
   }
 
@@ -545,7 +548,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const PETScWrappers::MPI::Vector &petsc_vec,
     VectorOperation::values /*operation*/,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
@@ -578,7 +581,7 @@ namespace LinearAlgebra
   template <typename Dummy>
   std::enable_if_t<std::is_same<Dummy, Number>::value &&
                    dealii::is_tpetra_type<Number>::value>
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const Tpetra::Vector<Number, int, types::signed_global_dof_index> &vector,
     const IndexSet &        source_elements,
     VectorOperation::values operation,
@@ -695,7 +698,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const Epetra_MultiVector &multivector,
     const IndexSet &          source_elements,
     VectorOperation::values   operation,
@@ -836,7 +839,7 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const TrilinosWrappers::MPI::Vector &trilinos_vec,
     VectorOperation::values              operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
@@ -849,11 +852,11 @@ namespace LinearAlgebra
       !trilinos_vec.has_ghost_elements(),
       ExcMessage(
         "Import() from TrilinosWrappers::MPI::Vector with ghost entries is not supported!"));
-    import(trilinos_vec.trilinos_vector(),
-           trilinos_vec.locally_owned_elements(),
-           operation,
-           trilinos_vec.get_mpi_communicator(),
-           communication_pattern);
+    import_elements(trilinos_vec.trilinos_vector(),
+                    trilinos_vec.locally_owned_elements(),
+                    operation,
+                    trilinos_vec.get_mpi_communicator(),
+                    communication_pattern);
   }
 
 
@@ -863,17 +866,17 @@ namespace LinearAlgebra
   template <typename Dummy>
   std::enable_if_t<std::is_same<Dummy, Number>::value &&
                    dealii::is_tpetra_type<Number>::value>
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const LinearAlgebra::TpetraWrappers::Vector<Number> &trilinos_vec,
     VectorOperation::values                              operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
       &communication_pattern)
   {
-    import(trilinos_vec.trilinos_vector(),
-           trilinos_vec.locally_owned_elements(),
-           operation,
-           trilinos_vec.get_mpi_communicator(),
-           communication_pattern);
+    import_elements(trilinos_vec.trilinos_vector(),
+                    trilinos_vec.locally_owned_elements(),
+                    operation,
+                    trilinos_vec.get_mpi_communicator(),
+                    communication_pattern);
   }
 #  endif
 
@@ -881,17 +884,17 @@ namespace LinearAlgebra
 
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const LinearAlgebra::EpetraWrappers::Vector &trilinos_vec,
     VectorOperation::values                      operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
       &communication_pattern)
   {
-    import(trilinos_vec.trilinos_vector(),
-           trilinos_vec.locally_owned_elements(),
-           operation,
-           trilinos_vec.get_mpi_communicator(),
-           communication_pattern);
+    import_elements(trilinos_vec.trilinos_vector(),
+                    trilinos_vec.locally_owned_elements(),
+                    operation,
+                    trilinos_vec.get_mpi_communicator(),
+                    communication_pattern);
   }
 #endif
 
@@ -900,7 +903,7 @@ namespace LinearAlgebra
 #ifdef DEAL_II_WITH_CUDA
   template <typename Number>
   void
-  ReadWriteVector<Number>::import(
+  ReadWriteVector<Number>::import_elements(
     const LinearAlgebra::CUDAWrappers::Vector<Number> &cuda_vec,
     VectorOperation::values                            operation,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &)
index d142c15e5e9f0b7d9a5dba3fb36361d053496292..b8a53b18c3371b81c9e86dea756b043525d042a9 100644 (file)
@@ -127,10 +127,11 @@ namespace LinearAlgebra
        * improve performance.
        */
       virtual void
-      import(const ReadWriteVector<double> &V,
-             VectorOperation::values        operation,
-             std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-               communication_pattern = {}) override;
+      import_elements(
+        const ReadWriteVector<double> &V,
+        VectorOperation::values        operation,
+        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          communication_pattern = {}) override;
 
       /**
        * Multiply the entire vector by a fixed factor.
index 977935216f13a586c50530577742489c51fe82c2..ce3c5d9160f0fa87d79bed249ca0863b5096594a 100644 (file)
@@ -183,10 +183,11 @@ namespace LinearAlgebra
        * improve performance.
        */
       virtual void
-      import(const ReadWriteVector<Number> &V,
-             VectorOperation::values        operation,
-             std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-               communication_pattern = {}) override;
+      import_elements(
+        const ReadWriteVector<Number> &V,
+        VectorOperation::values        operation,
+        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          communication_pattern = {}) override;
 
       /**
        * Multiply the entire vector by a fixed factor.
index 85bc89c6dfec546ec30b9cc9fed01636e7d7b645..0cd7dc3a23b4b92acb5e4a491f2d674b6f584eb9 100644 (file)
@@ -166,7 +166,7 @@ namespace LinearAlgebra
 
     template <typename Number>
     void
-    Vector<Number>::import(
+    Vector<Number>::import_elements(
       const ReadWriteVector<Number> &V,
       VectorOperation::values        operation,
       std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
index 4024d14f338d00833d627e6843988fb07344aac3..066d727f6ea403247091bdee0888212b0985ccf2 100644 (file)
@@ -718,8 +718,8 @@ namespace TrilinosWrappers
        * current elements.
        */
       void
-      import(const LinearAlgebra::ReadWriteVector<double> &rwv,
-             const VectorOperation::values                 operation);
+      import_elements(const LinearAlgebra::ReadWriteVector<double> &rwv,
+                      const VectorOperation::values                 operation);
 
 
       /**
index 78fc64822ad6450de9a488b5f2a218e00237e585..38dc0dde84efc8911d8d586b0b8ae535187f1fda 100644 (file)
@@ -108,10 +108,11 @@ namespace LinearAlgebra
      * performance.
      */
     virtual void
-    import(const ReadWriteVector<Number> &V,
-           VectorOperation::values        operation,
-           std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-             communication_pattern = {}) = 0;
+    import_elements(
+      const ReadWriteVector<Number> &V,
+      VectorOperation::values        operation,
+      std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        communication_pattern = {}) = 0;
 
     /**
      * Return the scalar product of two vectors.
index 6edcdce4c66d09fe5b2b50830811604becfd1de5..5e2158f0b74f4f4219f4b1021414b79e01cba9be 100644 (file)
@@ -881,13 +881,13 @@ namespace internal
       {
         LinearAlgebra::ReadWriteVector<typename VectorType::value_type> temp;
         temp.reinit(src.locally_owned_elements());
-        temp.import(src, VectorOperation::insert);
+        temp.import_elements(src, VectorOperation::insert);
 
         LinearAlgebra::ReadWriteVector<Number> temp2;
         temp2.reinit(temp, true);
         temp2 = temp;
 
-        dst.import(temp2, VectorOperation::insert);
+        dst.import_elements(temp2, VectorOperation::insert);
       }
 
 #ifdef DEAL_II_WITH_TRILINOS
index a60c355c8372159f3f5351d4e608c20f47aa7345..b4fb82b00dc7ea52a4eb3cf08778c2610eeba55a 100644 (file)
@@ -289,8 +289,8 @@ namespace
   {
     LinearAlgebra::ReadWriteVector<typename VectorType::value_type> temp;
     temp.reinit(vector.locally_owned_elements());
-    temp.import(vector, VectorOperation::insert);
-    vector_ghosted.import(temp, VectorOperation::insert);
+    temp.import_elements(vector, VectorOperation::insert);
+    vector_ghosted.import_elements(temp, VectorOperation::insert);
   }
 } // namespace
 
index 44288c755de5fc81f515fbc5495531a776397386..2c7789121b2fbf9304b0b4998c4dd0ef5de75f9a 100644 (file)
@@ -126,7 +126,7 @@ namespace LinearAlgebra
 
     template <typename Number>
     void
-    Vector<Number>::import(
+    Vector<Number>::import_elements(
       const ReadWriteVector<Number> &V,
       VectorOperation::values        operation,
       std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>)
index c95e627c577f77ddd3e802e68d2322a654ca4849..2736380d34062de6d75b5b3a9f072a00bbb25333 100644 (file)
@@ -48,34 +48,34 @@ namespace LinearAlgebra
 
 #ifndef DOXYGEN
     template void
-    Vector<float, ::dealii::MemorySpace::Host>::import<
+    Vector<float, ::dealii::MemorySpace::Host>::import_elements<
       ::dealii::MemorySpace::Default>(
       const Vector<float, ::dealii::MemorySpace::Default> &,
       VectorOperation::values);
     template void
-    Vector<double, ::dealii::MemorySpace::Host>::import<
+    Vector<double, ::dealii::MemorySpace::Host>::import_elements<
       ::dealii::MemorySpace::Default>(
       const Vector<double, ::dealii::MemorySpace::Default> &,
       VectorOperation::values);
 
     template void
-    Vector<float, ::dealii::MemorySpace::Default>::import<
+    Vector<float, ::dealii::MemorySpace::Default>::import_elements<
       ::dealii::MemorySpace::Host>(
       const Vector<float, ::dealii::MemorySpace::Host> &,
       VectorOperation::values);
     template void
-    Vector<double, ::dealii::MemorySpace::Default>::import<
+    Vector<double, ::dealii::MemorySpace::Default>::import_elements<
       ::dealii::MemorySpace::Host>(
       const Vector<double, ::dealii::MemorySpace::Host> &,
       VectorOperation::values);
 
     template void
-    Vector<float, ::dealii::MemorySpace::Default>::import<
+    Vector<float, ::dealii::MemorySpace::Default>::import_elements<
       ::dealii::MemorySpace::Default>(
       const Vector<float, ::dealii::MemorySpace::Default> &,
       VectorOperation::values);
     template void
-    Vector<double, ::dealii::MemorySpace::Default>::import<
+    Vector<double, ::dealii::MemorySpace::Default>::import_elements<
       ::dealii::MemorySpace::Default>(
       const Vector<double, ::dealii::MemorySpace::Default> &,
       VectorOperation::values);
index da46a8607700276928a8a5c62a0512e8260a6617..f8807262dbe5192a13756ae1b934a3beeb2c9f19 100644 (file)
@@ -23,7 +23,7 @@ for (SCALAR : REAL_AND_COMPLEX_SCALARS)
       \{
         template class Vector<SCALAR, ::dealii::MemorySpace::Host>;
         template void
-        Vector<SCALAR, ::dealii::MemorySpace::Host>::import<
+        Vector<SCALAR, ::dealii::MemorySpace::Host>::import_elements<
           ::dealii::MemorySpace::Host>(
           const Vector<SCALAR, ::dealii::MemorySpace::Host> &,
           VectorOperation::values);
index 453ddd3da9f5b60e2f92fffab6681792f22a6aea..b0dd17a664f79401d96c95e14dd5105c71fb77e6 100644 (file)
@@ -42,36 +42,36 @@ namespace LinearAlgebra
 
 #ifndef DOXYGEN
   template void
-  ReadWriteVector<float>::import(
+  ReadWriteVector<float>::import_elements(
     const distributed::Vector<float, ::dealii::MemorySpace::Host> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
   template void
-  ReadWriteVector<float>::import(
+  ReadWriteVector<float>::import_elements(
     const distributed::Vector<float, ::dealii::MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 
   template void
-  ReadWriteVector<double>::import(
+  ReadWriteVector<double>::import_elements(
     const distributed::Vector<double, ::dealii::MemorySpace::Host> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
   template void
-  ReadWriteVector<double>::import(
+  ReadWriteVector<double>::import_elements(
     const distributed::Vector<double, ::dealii::MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #  ifdef DEAL_II_WITH_COMPLEX_VALUES
   template void
-  ReadWriteVector<std::complex<float>>::import(
+  ReadWriteVector<std::complex<float>>::import_elements(
     const distributed::Vector<std::complex<float>, ::dealii::MemorySpace::Host>
       &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 
   template void
-  ReadWriteVector<std::complex<double>>::import(
+  ReadWriteVector<std::complex<double>>::import_elements(
     const distributed::Vector<std::complex<double>, ::dealii::MemorySpace::Host>
       &,
     VectorOperation::values,
@@ -82,14 +82,14 @@ namespace LinearAlgebra
 
 #  ifdef HAVE_TPETRA_INST_FLOAT
   template void
-  ReadWriteVector<float>::import(
+  ReadWriteVector<float>::import_elements(
     const LinearAlgebra::TpetraWrappers::Vector<float> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #  endif
 #  ifdef HAVE_TPETRA_INST_DOUBLE
   template void
-  ReadWriteVector<double>::import(
+  ReadWriteVector<double>::import_elements(
     const LinearAlgebra::TpetraWrappers::Vector<double> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
@@ -97,14 +97,14 @@ namespace LinearAlgebra
 #  ifdef DEAL_II_WITH_COMPLEX_VALUES
 #    ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
   template void
-  ReadWriteVector<std::complex<float>>::import(
+  ReadWriteVector<std::complex<float>>::import_elements(
     const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #    endif
 #    ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
   template void
-  ReadWriteVector<std::complex<double>>::import(
+  ReadWriteVector<std::complex<double>>::import_elements(
     const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
index dd24a1afb9d7303365dc3812e5a1dd59af548237..d06fccff5fe3d0552ec3747c2beb1c6fe3225b15 100644 (file)
@@ -23,23 +23,23 @@ DEAL_II_NAMESPACE_OPEN
 namespace LinearAlgebra
 {
   template void
-  ReadWriteVector<float>::import(
+  ReadWriteVector<float>::import_elements(
     const CUDAWrappers::Vector<float> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
   template void
-  ReadWriteVector<float>::import(
+  ReadWriteVector<float>::import_elements(
     const distributed::Vector<float, ::dealii::MemorySpace::CUDA> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 
   template void
-  ReadWriteVector<double>::import(
+  ReadWriteVector<double>::import_elements(
     const CUDAWrappers::Vector<double> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
   template void
-  ReadWriteVector<double>::import(
+  ReadWriteVector<double>::import_elements(
     const distributed::Vector<double, ::dealii::MemorySpace::CUDA> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
index 5343e808cdc57ccee9947a577df5e90ec1b8f6da..b79f1d554092c0c4d4622c55208a2fa3ee6e38f7 100644 (file)
@@ -144,7 +144,7 @@ namespace LinearAlgebra
 
 
     void
-    Vector::import(
+    Vector::import_elements(
       const ReadWriteVector<double> &V,
       VectorOperation::values        operation,
       std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
index dfa44187b3d0c03ade7952060f262195fbc4fc61..6d7c25f20a155fa7af872920639a361dfeb96dba 100644 (file)
@@ -552,16 +552,16 @@ namespace TrilinosWrappers
 
 
     void
-    Vector::import(const LinearAlgebra::ReadWriteVector<double> &rwv,
-                   const VectorOperation::values                 operation)
+    Vector::import_elements(const LinearAlgebra::ReadWriteVector<double> &rwv,
+                            const VectorOperation::values operation)
     {
       Assert(
         this->size() == rwv.size(),
         ExcMessage(
-          "Both vectors need to have the same size for import() to work!"));
-      // TODO: a generic import() function should handle any kind of data layout
-      // in ReadWriteVector, but this function is of limited use as this class
-      // will (hopefully) be retired eventually.
+          "Both vectors need to have the same size for import_elements() to work!"));
+      // TODO: a generic import_elements() function should handle any kind of
+      // data layout in ReadWriteVector, but this function is of limited use as
+      // this class will (hopefully) be retired eventually.
       Assert(this->locally_owned_elements() == rwv.get_stored_elements(),
              ExcNotImplemented());
 
index 586687fe12d68a2b6904e59e7f1c3e20cc417ced..c3a3d6030fd663af6aec86a93386b5002853e943 100644 (file)
@@ -116,15 +116,15 @@ main(int argc, char *argv[])
                                                dof_handler.get_communicator());
       LinearAlgebra::ReadWriteVector<Number> x_temp(
         dof_handler.locally_owned_dofs());
-      x_temp.import(x, VectorOperation::insert);
-      x_.import(x_temp, VectorOperation::insert);
+      x_temp.import_elements(x, VectorOperation::insert);
+      x_.import_elements(x_temp, VectorOperation::insert);
 
       LinearAlgebra::EpetraWrappers::Vector r_(dof_handler.locally_owned_dofs(),
                                                dof_handler.get_communicator());
       LinearAlgebra::ReadWriteVector<Number> r_temp(
         dof_handler.locally_owned_dofs());
-      r_temp.import(r, VectorOperation::insert);
-      r_.import(r_temp, VectorOperation::insert);
+      r_temp.import_elements(r, VectorOperation::insert);
+      r_.import_elements(r_temp, VectorOperation::insert);
 
       X = Teuchos::rcp<Epetra_MultiVector>(&x_.trilinos_vector(), false);
       B = Teuchos::rcp<Epetra_MultiVector>(&r_.trilinos_vector(), false);
index b2da859b17210cec1d9b44cb7022e0812a88d479..7469a928a4e97d92d2e76a766ae25417e0e29a36 100644 (file)
@@ -145,7 +145,7 @@ test()
 
   mf.eval(coef_device);
   cudaDeviceSynchronize();
-  coef.import(coef_device, VectorOperation::insert);
+  coef.import_elements(coef_device, VectorOperation::insert);
 
   // Computation the host
   auto               graph    = mf_data.get_colored_graph();
index 84a120f9477b8bdfbe8be5cab3e7fab1d85f8882..b5f38503fc65619500b9fcac4d0f17484d997b7f 100644 (file)
@@ -132,7 +132,6 @@ test()
   Kokkos::deep_copy(x_dev, x_host);
   Kokkos::deep_copy(y_dev, y_host);
 
-
   Kokkos::View<double *, MemorySpace::Default::kokkos_space> shape_values(
     Kokkos::view_alloc("shape_values", Kokkos::WithoutInitializing),
     size_shape_values);
index cd042f05a6d062ad44a7de71730a9afec0e93119..6d3ff242dbb2f548caf5baf0d18404f0525dec0d 100644 (file)
@@ -54,57 +54,57 @@ test()
       read_write_2[i] = 5. + i;
     }
 
-  a.import(read_write_2, VectorOperation::insert);
-  b.import(read_write_1, VectorOperation::insert);
-  c.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_2, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
 
 
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(read_write_2[i] == read_write_3[i],
                 ExcMessage("Vector a has been modified."));
 
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(read_write_1[i] == read_write_3[i],
                 ExcMessage("Vector b has been modified."));
 
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(read_write_2[i] == read_write_3[i],
                 ExcMessage("Vector c has been modified."));
 
   a *= 2.;
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(2. * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in operator *=."));
 
   c /= 2.;
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(0.5 * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in operator /=."));
 
   b += a;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(2. * read_write_2[i] + read_write_1[i] == read_write_3[i],
                 ExcMessage("Problem in operator +=."));
 
   b -= c;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(1.5 * read_write_2[i] + read_write_1[i] == read_write_3[i],
                 ExcMessage("Problem in operator -=."));
 
-  b.import(read_write_1, VectorOperation::insert);
-  c.import(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
+  c.import_elements(read_write_1, VectorOperation::insert);
   const double val = b * c;
   AssertThrow(val == 328350., ExcMessage("Problem in operator *."));
 
   b = 0.;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(read_write_3[i] == 0., ExcMessage("Problem in operator =."));
 }
index ed240cea520b0a3771cb5d618044f9863d1156f2..fba39610a32bb2fefe27231766c6e25d219582e4 100644 (file)
@@ -45,46 +45,46 @@ test()
       read_write_2[i] = 5. + i;
     }
 
-  a.import(read_write_1, VectorOperation::insert);
-  b.import(read_write_2, VectorOperation::insert);
-  c.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_2, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
 
   a.add(1.);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(1. + read_write_1[i] == read_write_3[i],
                 ExcMessage("Problem in add(scalar)."));
 
   a.add(2., b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(1. + read_write_1[i] + 2. * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in add(scalar,Vector)."));
 
   LinearAlgebra::CUDAWrappers::Vector<double> d(a);
   a.add(2., b, 3., d);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(4. + 4. * read_write_1[i] + 10. * read_write_2[i] ==
                   read_write_3[i],
                 ExcMessage("Problem in add(scalar,Vector,scalar,Vector)."));
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.sadd(3., 2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(3. * read_write_1[i] + 2. * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in sadd(scalar,scalar,Vector)."));
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.scale(b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(read_write_1[i] * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in scale."));
 
   a.equ(2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(2. * read_write_2[i] == read_write_3[i],
                 ExcMessage("Problem in equ."));
@@ -99,7 +99,7 @@ test()
 
   AssertThrow(b.linfty_norm() == 104., ExcMessage("Problem in linfty_norm."));
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   const double val = a.add_and_dot(2., a, b);
   AssertThrow(val == 1059300., ExcMessage("Problem in add_and_dot"));
 }
index 772928010e61cf706b4570f6a79ade5d4048a63b..4d0c3355de2d614db3997734d8fd53d825d5ec04 100644 (file)
@@ -28,7 +28,7 @@ test()
   LinearAlgebra::ReadWriteVector<double>      read_write(size);
   for (unsigned int i = 0; i < size; ++i)
     read_write[i] = i;
-  a.import(read_write, VectorOperation::insert);
+  a.import_elements(read_write, VectorOperation::insert);
 
   a.reinit(size / 2);
   AssertThrow(a.l1_norm() == 0., ExcMessage("reinit did not zero the entry"));
index e54a829a648ef9cf290e00ba67b34e31cd08a1d0..c9a5c6da628ee1552726525597e696f6490710bc 100644 (file)
@@ -38,7 +38,7 @@ test()
       read_write_1[i] = i;
     }
 
-  cuda_vector.import(read_write_1, VectorOperation::insert);
+  cuda_vector.import_elements(read_write_1, VectorOperation::insert);
 
   cuda_vector.print(deallog.get_file_stream());
 }
index 8c2dd8963d83e597aa2b418fb614f9998da99549..80fea9ee1a6d4fbc6262d526ac40c6bd7a3c312e 100644 (file)
@@ -49,8 +49,8 @@ test()
       b_host[i]       = 5. + i;
     }
 
-  a.import(read_write_1, VectorOperation::insert);
-  b.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_2, VectorOperation::insert);
   AssertThrow(a.add_and_dot(2., a, b) == a_host.add_and_dot(2., a_host, b_host),
               ExcMessage("Problem in add_and_dot"));
 }
index fb42250267e721e159af67750be9ad34da233781..6ea858759ae424276d2ec87d2e23a4286b1075e1 100644 (file)
@@ -135,21 +135,21 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
   mf.vmult(out_dev, in_dev);
 
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, 10 * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
index 250ca0463a4f4752d2e2acd1477d2fa46d07ab51..7c434dd7bbb7ea3a3155f91d241e2ab866099f64 100644 (file)
@@ -137,21 +137,21 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
   mf.vmult(out_dev, in_dev);
 
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, coef * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
index 450d6445126ec446754bba60ac61c4cbfcf9241e..39fba645166426210ec80ea23be57f7a00a7010d 100644 (file)
@@ -131,21 +131,21 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
   mf.vmult(out_dev, in_dev);
 
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, 10 * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
index baa2dc896062364dcdad92b8c1510ee4b074a91c..a80c6ac3b434d25ecbd0037546cef8062ce498c0 100644 (file)
@@ -138,21 +138,21 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
   mf.vmult(out_dev, in_dev);
 
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, 10 * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
index 09dbd6493560898fbb603acfd593263ad158d731..8c1eeaf80391676dc726b7527ba31e51964f9c6c 100644 (file)
@@ -144,21 +144,21 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
   mf.vmult(out_dev, in_dev);
 
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, 10 * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
index c3740bc80f2381a3352572a233e076b24ed1af9e..e1bf9da3b2d63fdf340f8c532879589389b41707 100644 (file)
@@ -71,10 +71,10 @@ do_test(const DoFHandler<2> &            dof,
       in(i)              = entry;
     }
 
-  in_device.import(in, VectorOperation::insert);
+  in_device.import_elements(in, VectorOperation::insert);
   mf.vmult(out_device, in_device);
   cudaDeviceSynchronize();
-  out.import(out_device, VectorOperation::insert);
+  out.import_elements(out_device, VectorOperation::insert);
 
   // assemble sparse matrix with (\nabla v, \nabla u) + (v, 10 * u)
   SparsityPattern sparsity;
index bdedecf6be73b5a030ccd9d518ac01a9610bb62c..7420cf503242ebb1bcecba8f317ab17ae651bc2a 100644 (file)
@@ -114,10 +114,10 @@ do_test(const DoFHandler<dim> &          dof,
       in(i)              = entry;
     }
 
-  in_device.import(in, VectorOperation::insert);
+  in_device.import_elements(in, VectorOperation::insert);
   mf.vmult(out_device, in_device);
   cudaDeviceSynchronize();
-  out.import(out_device, VectorOperation::insert);
+  out.import_elements(out_device, VectorOperation::insert);
 
   // assemble sparse matrix with (\nabla v, \nabla u) + (v, 10 * u)
   SparsityPattern sparsity;
index 48cff95402c9859207d19a8840f4502c9dd5aec5..7171c10bfda6e4831c423951c292a4dd3086f754 100644 (file)
@@ -51,7 +51,7 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<Number>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<Number>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   const Number  tolerance = 1000. * std::numeric_limits<Number>::epsilon();
   SolverControl control(100, tolerance);
   SolverCG<LinearAlgebra::CUDAWrappers::Vector<Number>> cg_dev(control);
index cea04066badb679ce7790844bcce57eed2d0150f..f74a79f20d73e5de6b426f19d414918c7677f9c9 100644 (file)
@@ -51,7 +51,7 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<Number>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<Number>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   const Number  tolerance = 1000. * std::numeric_limits<Number>::epsilon();
   SolverControl control(100, tolerance);
   SolverCG<LinearAlgebra::CUDAWrappers::Vector<Number>> cg_dev(control);
index e4b0dfb66d1e9ee886ea43953c31fad8c78d51a2..cf2ce3d863d9e3d023e34a2e8e3f3f0cb43a5416 100644 (file)
@@ -137,14 +137,14 @@ test()
         continue;
       rw_in.local_element(i) = random_value<double>();
     }
-  in_dev.import(rw_in, VectorOperation::insert);
+  in_dev.import_elements(rw_in, VectorOperation::insert);
 
   // assemble trilinos sparse matrix with
   // (\nabla v, \nabla u) + (v, 10 * u) for
   // reference
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> in_host(
     owned_set, MPI_COMM_WORLD);
-  in_host.import(rw_in, VectorOperation::insert);
+  in_host.import_elements(rw_in, VectorOperation::insert);
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> ref(
     owned_set, MPI_COMM_WORLD);
   TrilinosWrappers::SparseMatrix sparse_matrix;
@@ -231,7 +231,7 @@ test()
     LinearAlgebra::distributed::Vector<Number, MemorySpace::CUDA>>>(
     LinearAlgebra::distributed::Vector<Number, MemorySpace::CUDA>(
       ref.get_partitioner()));
-  device_preconditioner_data.preconditioner->get_vector().import(
+  device_preconditioner_data.preconditioner->get_vector().import_elements(
     matrix_diagonal, VectorOperation::insert);
   device_preconditioner_data.constraints.copy_from(constraints);
   precondition_chebyshev_device.initialize(mf, device_preconditioner_data);
@@ -241,8 +241,8 @@ test()
   LinearAlgebra::distributed::Vector<Number, MemorySpace::Host> out_host(
     owned_set, MPI_COMM_WORLD);
   LinearAlgebra::ReadWriteVector<Number> rw_out(owned_set);
-  rw_out.import(out_dev, VectorOperation::insert);
-  out_host.import(rw_out, VectorOperation::insert);
+  rw_out.import_elements(out_dev, VectorOperation::insert);
+  out_host.import_elements(rw_out, VectorOperation::insert);
 
   precondition_chebyshev_host.vmult(ref, in_host);
   out_host -= ref;
index 88869dd4727d30d640afe7fdc16a82dd33b7fa6b..5c84c6f09e212f1047b2799d551a805c821d1ec0 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverCG<LinearAlgebra::CUDAWrappers::Vector<double>> cg_dev(control);
   cg_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index b6292b656f0676d4d56077b41312d748480947db..0ecc2552b1183250419577fb6b18d2a2d02d6f6e 100644 (file)
@@ -72,7 +72,7 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::CUDAWrappers::Vector<double> rhs_dev(size);
   LinearAlgebra::ReadWriteVector<double>      rhs_host(size);
   std::copy(rhs.begin(), rhs.end(), rhs_host.begin());
-  rhs_dev.import(rhs_host, VectorOperation::insert);
+  rhs_dev.import_elements(rhs_host, VectorOperation::insert);
 
   LinearAlgebra::CUDAWrappers::Vector<double> solution_dev(size);
   const std::array<std::string, 3>            solver_names{
@@ -91,7 +91,7 @@ test(Utilities::CUDA::Handle &cuda_handle)
 
       // Move the result back to the host
       LinearAlgebra::ReadWriteVector<double> solution_host(size);
-      solution_host.import(solution_dev, VectorOperation::insert);
+      solution_host.import_elements(solution_dev, VectorOperation::insert);
 
       // Check the result
       for (unsigned int i = 0; i < size; ++i)
index be32d03fa404c5d1972cf63fe42488cd867a6b5f..429dcaa1928b2e1012b910aa2b99b867a7562b04 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverGMRES<LinearAlgebra::CUDAWrappers::Vector<double>> cg_dev(control);
   cg_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index 61f6d5afa0f70bcdaed84a8e210256894bccf9fb..a3c3a62d7ef8d0e30fb93e998b60e886a01099eb 100644 (file)
@@ -60,13 +60,13 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverBicgstab<LinearAlgebra::CUDAWrappers::Vector<double>> bicgstab_dev(
     control);
   bicgstab_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index 274586d5aff81840e2e2bfdcc84e962423cc5af4..d63947f0e82dbf1fe876f64c5c811669a1f3c0a8 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverFGMRES<LinearAlgebra::CUDAWrappers::Vector<double>> fgmres_dev(control);
   fgmres_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index ab0521e5197f8e716c0a9dfd7a06c6670dc891f0..aa93549c8c68df552a92b8cb3f4e2448a02e6264 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverFIRE<LinearAlgebra::CUDAWrappers::Vector<double>> fire_dev(control);
   fire_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index a2862db80d8b65d89e43285914062ad0cf7c47d7..eb34ee4390b0ae973ded0a5e5f2338a076fc0eec 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverMinRes<LinearAlgebra::CUDAWrappers::Vector<double>> minres_dev(control);
   minres_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index 3e99773377db40bfbdd689659dab3cc7375cef54..b4d6c945b2499c5047b70696e14324d2037a1da8 100644 (file)
@@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverQMRS<LinearAlgebra::CUDAWrappers::Vector<double>> qmrs_dev(control);
   qmrs_dev.solve(A_dev, sol_dev, rhs_dev, prec_no);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index d48cd8c75424a99f6247459acfd0cd016d77f6dd..20a10e2bcd529171ce16367d79dcb03ad51693f1 100644 (file)
@@ -88,13 +88,13 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverRichardson<LinearAlgebra::CUDAWrappers::Vector<double>> richardson_dev(
     control);
   richardson_dev.solve(A_dev, sol_dev, rhs_dev, preconditioner_dev);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index 6530cf9f6bdb90f09a498fefb6e968c462f8b4e3..bce559b8aa69058d5fef0055850fb3e3c8e16d54 100644 (file)
@@ -108,13 +108,13 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      rw_vector(size);
   for (unsigned int i = 0; i < size; ++i)
     rw_vector[i] = static_cast<double>(i);
-  rhs_dev.import(rw_vector, VectorOperation::insert);
+  rhs_dev.import_elements(rw_vector, VectorOperation::insert);
   SolverRelaxation<LinearAlgebra::CUDAWrappers::Vector<double>> relaxation_dev(
     control);
   relaxation_dev.solve(A_dev, sol_dev, rhs_dev, relaxation_operator_dev);
 
   // Check the result
-  rw_vector.import(sol_dev, VectorOperation::insert);
+  rw_vector.import_elements(sol_dev, VectorOperation::insert);
   for (unsigned int i = 0; i < size; ++i)
     AssertThrow(std::fabs(rw_vector[i] - sol_host[i]) < 1e-8,
                 ExcInternalError());
index 2327f9f53973361fb9db42c67b86f19fd2e791d4..742e97635941cb610b391c28a30618d9fd521df4 100644 (file)
@@ -119,27 +119,27 @@ test(Utilities::CUDA::Handle &cuda_handle)
   LinearAlgebra::ReadWriteVector<double>      read_write(vector_size);
   for (unsigned int i = 0; i < vector_size; ++i)
     read_write[i] = i;
-  src_dev.import(read_write, VectorOperation::insert);
+  src_dev.import_elements(read_write, VectorOperation::insert);
   A_dev.vmult(dst_dev, src_dev);
-  read_write.import(dst_dev, VectorOperation::insert);
+  read_write.import_elements(dst_dev, VectorOperation::insert);
   check_vector(dst, read_write);
 
   // Transpose matrix-vector multiplication
   A.Tvmult(dst, src);
   A_dev.Tvmult(dst_dev, src_dev);
-  read_write.import(dst_dev, VectorOperation::insert);
+  read_write.import_elements(dst_dev, VectorOperation::insert);
   check_vector(dst, read_write);
 
   // Matrix-vector multiplication and add
   A.vmult_add(dst, src);
   A_dev.vmult_add(dst_dev, src_dev);
-  read_write.import(dst_dev, VectorOperation::insert);
+  read_write.import_elements(dst_dev, VectorOperation::insert);
   check_vector(dst, read_write);
 
   // Transpose matrix-vector multiplication and add
   A.Tvmult_add(dst, src);
   A_dev.Tvmult_add(dst_dev, src_dev);
-  read_write.import(dst_dev, VectorOperation::insert);
+  read_write.import_elements(dst_dev, VectorOperation::insert);
   check_vector(dst, read_write);
 
   // Matrix norm square
@@ -161,12 +161,12 @@ test(Utilities::CUDA::Handle &cuda_handle)
       read_write[i] = i;
     }
   LinearAlgebra::CUDAWrappers::Vector<double> b_dev(vector_size);
-  b_dev.import(read_write, VectorOperation::insert);
-  src_dev.import(read_write, VectorOperation::insert);
+  b_dev.import_elements(read_write, VectorOperation::insert);
+  src_dev.import_elements(read_write, VectorOperation::insert);
   value      = A.residual(dst, src, b);
   value_host = A_dev.residual(dst_dev, src_dev, b_dev);
   AssertThrow(std::abs(value - value_host) < 1e-15, ExcInternalError());
-  read_write.import(dst_dev, VectorOperation::insert);
+  read_write.import_elements(dst_dev, VectorOperation::insert);
   check_vector(dst, read_write);
 
   // Compute L1 norm
index cad97db078eefb049544df65efc50f5d1903b8cc..e288f04735910d04253f51cbeffdcb52cbb09c8d 100644 (file)
@@ -51,11 +51,11 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(local_owned);
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
 
   v *= 2.0;
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   if (myid == 0)
     {
       deallog << myid * 2 << ":" << rw_vector(myid * 2) << std::endl;
index 79e9922ceed1b29cd3658c67bf1013c4a785f0e0..3fbc00a0c67a68150595e4b8731f8465d59c4681 100644 (file)
@@ -54,27 +54,27 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(local_owned);
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
-  v.import(rw_vector, VectorOperation::add);
+  v.import_elements(rw_vector, VectorOperation::add);
 
   v *= 2.0;
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
   AssertThrow(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0, ExcInternalError());
 
   // set ghost dof, compress
   LinearAlgebra::ReadWriteVector<double> rw_relevant_vector(numproc * 2);
   rw_relevant_vector(1) = 7;
-  v.import(rw_relevant_vector, VectorOperation::add);
+  v.import_elements(rw_relevant_vector, VectorOperation::add);
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   if (myid == 0)
     {
       deallog << myid * 2 << ":" << rw_vector(myid * 2) << std::endl;
       deallog << myid * 2 + 1 << ":" << rw_vector(myid * 2 + 1) << std::endl;
     }
 
-  rw_relevant_vector.import(v, VectorOperation::insert);
+  rw_relevant_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_relevant_vector(1) == 7. * numproc + 2, ExcInternalError());
 
   // check l2 norm
index 33145afb4ebffa541adeeffb017a01f51882e36f..94fed8d6fffc8e251cb33c43110137bdc7251bf3 100644 (file)
@@ -54,11 +54,11 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(local_owned);
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
 
   v *= 2.0;
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
   AssertThrow(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0, ExcInternalError());
 
@@ -68,9 +68,9 @@ test()
   ghost_entry.add_index(1);
   LinearAlgebra::ReadWriteVector<double> rw_ghost_entry(ghost_entry);
   rw_ghost_entry(1) = 7.;
-  v.import(rw_ghost_entry, VectorOperation::insert);
+  v.import_elements(rw_ghost_entry, VectorOperation::insert);
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   if (myid == 0)
     {
       deallog << myid * 2 << ":" << rw_vector(myid * 2) << std::endl;
@@ -79,7 +79,7 @@ test()
   // import ghosts onto all procs
   v.update_ghost_values();
   rw_ghost_entry(1) = 0.;
-  rw_ghost_entry.import(v, VectorOperation::insert);
+  rw_ghost_entry.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_ghost_entry(1) == 7.0, ExcInternalError());
 
   // check l2 norm
index 190dc37fc1f9854a9d34c2e6d25f233280a171e5..3ea94c585abf7340a90155c3ed87981bf6ca08fe 100644 (file)
@@ -95,7 +95,7 @@ test()
 
   // set value from processor which does not own it:
   rw_vector(5) = 55.;
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
 
   // add to value from processor which has it as a ghost
   // Because of limitation in import, the ReadWriteVector needs to have locally
@@ -112,7 +112,7 @@ test()
     {
       rw_add.reinit(indexset_2);
     }
-  v.import(rw_add, VectorOperation::add); // 60 + 6
+  v.import_elements(rw_add, VectorOperation::add); // 60 + 6
   // compress(insert) used to leave ghosts un-touched which resulted in
   // the wrong 55+55 for this compress(add) operation.
 
@@ -136,7 +136,7 @@ test()
     }
 
   rw_vector.reinit(indexset_3);
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
 
   check(myid, rw_vector);
 
index 08f2e81776f27ed4bb4cdcf200c413a4782fd013..573dfc86de13c191a12c16d823e494b432becbd3 100644 (file)
@@ -56,10 +56,10 @@ test()
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
 
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
   v *= 2.0;
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
   AssertThrow(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0, ExcInternalError());
 
index 005e4e1c17b0b0e04946b5c4d90bfd630140182e..bc50d5aff62ee972417bf5410a59e2bbf4c1548a 100644 (file)
@@ -55,10 +55,10 @@ test()
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
 
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
   v *= 2.0;
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   Assert(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
   Assert(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0, ExcInternalError());
 
@@ -76,10 +76,10 @@ test()
     ghost_vector.reinit(ghost_set);
 
 
-  v.import(ghost_vector, VectorOperation::add);
+  v.import_elements(ghost_vector, VectorOperation::add);
 
   // check that nothing has changed
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   Assert(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
   Assert(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0, ExcInternalError());
 
index 804248706cc63dacda3543c75febd6572576822f..e1bddb3457a02d41baef8c03c0864d2e9de7089e 100644 (file)
@@ -57,10 +57,10 @@ test()
     rw_vector(myid * 2)     = myid * 2.0;
     rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
   }
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
   v *= 2.0;
   {
-    rw_vector.import(v, VectorOperation::insert);
+    rw_vector.import_elements(v, VectorOperation::insert);
     AssertThrow(rw_vector(myid * 2) == myid * 4.0, ExcInternalError());
     AssertThrow(rw_vector(myid * 2 + 1) == myid * 4.0 + 2.0,
                 ExcInternalError());
@@ -122,7 +122,7 @@ test()
     if (myid == 0)
       deallog << " v2==0 ? " << allzero << std::endl;
 
-    v2.import(rw_vector, VectorOperation::insert);
+    v2.import_elements(rw_vector, VectorOperation::insert);
     allzero = v2.all_zero();
     if (myid == 0)
       deallog << " v2==0 ? " << allzero << std::endl;
index cc7d46af41bfb827af8f4e91accb90d2fb2facf7..001c0d6ec1c8a52603c31b862116e81d389ea7ce 100644 (file)
@@ -77,7 +77,7 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(local_owned);
   for (unsigned i = 0; i < local_size; ++i)
     rw_vector.local_element(i) = 2.0 * (i + my_start);
-  w.import(rw_vector, VectorOperation::insert);
+  w.import_elements(rw_vector, VectorOperation::insert);
 
   v = w;
   v.update_ghost_values();
@@ -88,9 +88,9 @@ test()
     v_move = std::move(v_copy);
 
     LinearAlgebra::ReadWriteVector<double> v_rw(local_relevant);
-    v_rw.import(v, VectorOperation::insert);
+    v_rw.import_elements(v, VectorOperation::insert);
     LinearAlgebra::ReadWriteVector<double> v_move_rw(local_relevant);
-    v_move_rw.import(v_move, VectorOperation::insert);
+    v_move_rw.import_elements(v_move, VectorOperation::insert);
 
     for (unsigned int i = 0; i < v_rw.locally_owned_size(); ++i)
       AssertThrow(v_move_rw.local_element(i) == v_rw.local_element(i),
@@ -106,14 +106,14 @@ test()
   }
 
   // check local values for correctness
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   for (unsigned int i = 0; i < local_size; ++i)
     AssertThrow(rw_vector.local_element(i) == 2.0 * (i + my_start),
                 ExcInternalError());
 
   // check non-local entries on all processors
   LinearAlgebra::ReadWriteVector<double> ghost_vector(local_relevant);
-  ghost_vector.import(v, VectorOperation::insert);
+  ghost_vector.import_elements(v, VectorOperation::insert);
   for (unsigned int i = 0; i < 10; ++i)
     AssertThrow(ghost_vector(ghost_indices[i]) == 2. * ghost_indices[i],
                 ExcInternalError());
@@ -125,13 +125,13 @@ test()
   v = w;
 
   // check local values for correctness
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   for (unsigned int i = 0; i < local_size; ++i)
     AssertThrow(rw_vector.local_element(i) == 2.0 * (i + my_start),
                 ExcInternalError());
 
   // check non-local entries on all processors
-  ghost_vector.import(v, VectorOperation::insert);
+  ghost_vector.import_elements(v, VectorOperation::insert);
   for (unsigned int i = 0; i < 10; ++i)
     AssertThrow(ghost_vector(ghost_indices[i]) == 2. * ghost_indices[i],
                 ExcInternalError());
index 715a646fbd19d3c5c42f4cdfe59f3309f3b103aa..d50060df8c2dd84903a80bd98de6fb4727ee8230 100644 (file)
@@ -55,7 +55,7 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(local_owned);
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
 
   v.update_ghost_values();
 
@@ -63,7 +63,7 @@ test()
   IndexSet ghost_set(numproc * 2);
   ghost_set.add_index(1);
   LinearAlgebra::ReadWriteVector<double> ghost_vector(ghost_set);
-  ghost_vector.import(v, VectorOperation::insert);
+  ghost_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(ghost_vector(1) == 1., ExcInternalError());
 
   // copy vector
@@ -72,9 +72,9 @@ test()
 
   v.update_ghost_values();
   w.update_ghost_values();
-  ghost_vector.import(v, VectorOperation::insert);
+  ghost_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(ghost_vector(1) == 2., ExcInternalError());
-  ghost_vector.import(w, VectorOperation::insert);
+  ghost_vector.import_elements(w, VectorOperation::insert);
   AssertThrow(ghost_vector(1) == 1., ExcInternalError());
 
   if (myid == 0)
index df0285c862ca1c60dca7e3babd23daaee65d9235..b0f6ace5a38ec21a1af10db5d89eb5eb9e2532ac 100644 (file)
@@ -71,20 +71,20 @@ test()
       w_rw.local_element(i) = 1000 + 2 * (my_start + i);
       x_rw.local_element(i) = 10000;
     }
-  v.import(v_rw, VectorOperation::insert);
-  w.import(w_rw, VectorOperation::insert);
-  x.import(x_rw, VectorOperation::insert);
+  v.import_elements(v_rw, VectorOperation::insert);
+  w.import_elements(w_rw, VectorOperation::insert);
+  x.import_elements(x_rw, VectorOperation::insert);
 
   y = v;
   LinearAlgebra::ReadWriteVector<double> y_rw(local_owned);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == i + my_start, ExcInternalError());
 
   if (myid == 0)
     deallog << "Check add (scalar): ";
   y.add(42);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == i + my_start + 42, ExcInternalError());
   if (myid == 0)
@@ -93,7 +93,7 @@ test()
   if (myid == 0)
     deallog << "Check add (vector): ";
   y.add(1., w);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 3 * (i + my_start) + 1042,
                 ExcInternalError());
@@ -103,7 +103,7 @@ test()
   if (myid == 0)
     deallog << "Check add (factor, vector): ";
   y.add(-1., w);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == i + my_start + 42, ExcInternalError());
   if (myid == 0)
@@ -112,7 +112,7 @@ test()
   if (myid == 0)
     deallog << "Check add (factor, vector, factor, vector): ";
   y.add(2., w, -0.5, x);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 5 * (i + my_start) + 2042 - 5000,
                 ExcInternalError());
@@ -123,7 +123,7 @@ test()
     deallog << "Check sadd (factor, factor, vector): ";
   y = v;
   y.sadd(-3., 2., v);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == (-i - my_start), ExcInternalError());
   if (myid == 0)
@@ -133,7 +133,7 @@ test()
     deallog << "Check sadd (factor, factor, vector, factor, vector): ";
   y.sadd(2., 3., v);
   y.add(2., w);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     {
       AssertThrow(y_rw.local_element(i) == 5 * (i + my_start) + 2000,
@@ -148,7 +148,7 @@ test()
   y.sadd(-1., 1., v);
   y.add(2., w);
   y.add(2., x);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 20000, ExcInternalError());
   if (myid == 0)
@@ -158,7 +158,7 @@ test()
     deallog << "Check add (factor, vector_1, factor, vector_1): ";
   y = 0;
   y.add(1., v, 3., v);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 4 * (i + my_start),
                 ExcInternalError());
@@ -168,7 +168,7 @@ test()
   if (myid == 0)
     deallog << "Check operator * (scalar): ";
   x *= 2.;
-  x_rw.import(x, VectorOperation::insert);
+  x_rw.import_elements(x, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(x_rw.local_element(i) == 20000., ExcInternalError());
   if (myid == 0)
@@ -177,7 +177,7 @@ test()
   if (myid == 0)
     deallog << "Check operator / (scalar): ";
   x /= 2.;
-  x_rw.import(x, VectorOperation::insert);
+  x_rw.import_elements(x, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(x_rw.local_element(i) == 10000., ExcInternalError());
   if (myid == 0)
@@ -186,7 +186,7 @@ test()
   if (myid == 0)
     deallog << "Check scale (vector): ";
   y.scale(x);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 40000. * (i + my_start),
                 ExcInternalError());
@@ -196,7 +196,7 @@ test()
   if (myid == 0)
     deallog << "Check equ (factor, vector): ";
   y.equ(10., x);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 100000., ExcInternalError());
   if (myid == 0)
@@ -206,7 +206,7 @@ test()
     deallog << "Check equ (factor, vector, factor, vector): ";
   y.equ(10., v);
   y.add(-2., w);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 6. * (i + my_start) - 2000,
                 ExcInternalError());
@@ -218,7 +218,7 @@ test()
   y.equ(10., v);
   y.add(-2., w);
   y.add(3., x);
-  y_rw.import(y, VectorOperation::insert);
+  y_rw.import_elements(y, VectorOperation::insert);
   for (int i = 0; i < actual_local_size; ++i)
     AssertThrow(y_rw.local_element(i) == 6. * (i + my_start) + 28000,
                 ExcInternalError());
index 97f83361f80fb5a5c73bdc7054e95b0e794b417c..b25d45ca24dccb26591a85b7768ad80e5634ff1e 100644 (file)
@@ -90,9 +90,9 @@ test()
   v1 = 2;
   // check assignment in initial state
   LinearAlgebra::ReadWriteVector<double> v0_rw(local_owned0);
-  v0_rw.import(v0, VectorOperation::insert);
+  v0_rw.import_elements(v0, VectorOperation::insert);
   LinearAlgebra::ReadWriteVector<double> v1_rw(local_owned1);
-  v1_rw.import(v1, VectorOperation::insert);
+  v1_rw.import_elements(v1, VectorOperation::insert);
   for (unsigned int i = 0; i < v0.local_size(); ++i)
     AssertThrow(v0_rw.local_element(i) == 1.,
                 ExcNonEqual(v0_rw.local_element(i), 1.));
@@ -104,9 +104,9 @@ test()
   v0.update_ghost_values();
   v1.update_ghost_values();
   LinearAlgebra::ReadWriteVector<double> v0_ghost_rw(local_relevant0);
-  v0_ghost_rw.import(v0, VectorOperation::insert);
+  v0_ghost_rw.import_elements(v0, VectorOperation::insert);
   LinearAlgebra::ReadWriteVector<double> v1_ghost_rw(local_relevant1);
-  v1_ghost_rw.import(v1, VectorOperation::insert);
+  v1_ghost_rw.import_elements(v1, VectorOperation::insert);
   AssertThrow(v0_ghost_rw(2) == 1., ExcNonEqual(v0_ghost_rw(2), 1.));
   if (numproc > 2)
     AssertThrow(v0_ghost_rw(8) == 1., ExcNonEqual(v0_ghost_rw(8), 2.));
@@ -127,11 +127,11 @@ test()
   AssertDimension(v1.local_size(), actual_local_size0);
   AssertDimension(v0.size(), global_size1);
   AssertDimension(v1.size(), global_size0);
-  v1_rw.import(v0, VectorOperation::insert);
+  v1_rw.import_elements(v0, VectorOperation::insert);
   for (unsigned int i = 0; i < local_size1; ++i)
     AssertThrow(v1_rw.local_element(i) == 2.,
                 ExcNonEqual(v1_rw.local_element(i), 2.));
-  v0_rw.import(v1, VectorOperation::insert);
+  v0_rw.import_elements(v1, VectorOperation::insert);
   for (unsigned int i = 0; i < actual_local_size0; ++i)
     AssertThrow(v0_rw.local_element(i) == 1.,
                 ExcNonEqual(v0_rw.local_element(i), 1.));
@@ -140,11 +140,11 @@ test()
     deallog << "First swap OK" << std::endl;
   v0.update_ghost_values();
   v1.update_ghost_values();
-  v0_ghost_rw.import(v1, VectorOperation::insert);
+  v0_ghost_rw.import_elements(v1, VectorOperation::insert);
   AssertThrow(v0_ghost_rw(2) == 1., ExcNonEqual(v0_ghost_rw(2), 1.));
   if (numproc > 2)
     AssertThrow(v0_ghost_rw(8) == 1., ExcNonEqual(v0_ghost_rw(8), 1.));
-  v1_ghost_rw.import(v0, VectorOperation::insert);
+  v1_ghost_rw.import_elements(v0, VectorOperation::insert);
   AssertThrow(v1_ghost_rw(0) == 2., ExcNonEqual(v1_ghost_rw(0), 2.));
   AssertThrow(v1_ghost_rw(2) == 2., ExcNonEqual(v1_ghost_rw(2), 2.));
   if (numproc > 2)
@@ -162,11 +162,11 @@ test()
   v1 = 42.;
   v0.update_ghost_values();
   v1.update_ghost_values();
-  v0_ghost_rw.import(v1, VectorOperation::insert);
+  v0_ghost_rw.import_elements(v1, VectorOperation::insert);
   AssertThrow(v0_ghost_rw(2) == 42., ExcNonEqual(v0_ghost_rw(2), 42.));
   if (numproc > 2)
     AssertThrow(v0_ghost_rw(8) == 42., ExcNonEqual(v0_ghost_rw(8), 42.));
-  v1_ghost_rw.import(v0, VectorOperation::insert);
+  v1_ghost_rw.import_elements(v0, VectorOperation::insert);
   AssertThrow(v1_ghost_rw(0) == 7., ExcNonEqual(v1_ghost_rw(0), 7.));
   AssertThrow(v1_ghost_rw(2) == 7., ExcNonEqual(v1_ghost_rw(2), 7.));
   if (numproc > 2)
@@ -184,7 +184,7 @@ test()
   AssertDimension(v0.size(), 0);
   AssertDimension(v2.size(), global_size1);
   AssertDimension(v2.local_size(), local_size1);
-  v1_rw.import(v2, VectorOperation::insert);
+  v1_rw.import_elements(v2, VectorOperation::insert);
   for (int i = my_start1; i < my_end1; ++i)
     AssertThrow(v1_rw(i) == 7., ExcNonEqual(v1_rw(i), 7.));
   MPI_Barrier(MPI_COMM_WORLD);
@@ -192,7 +192,7 @@ test()
     deallog << "Second swap OK" << std::endl;
   v2 = -1.;
   v2.update_ghost_values();
-  v1_ghost_rw.import(v2, VectorOperation::insert);
+  v1_ghost_rw.import_elements(v2, VectorOperation::insert);
   AssertThrow(v1_ghost_rw(0) == -1., ExcNonEqual(v1_ghost_rw(0), -1.));
   AssertThrow(v1_ghost_rw(2) == -1., ExcNonEqual(v1_ghost_rw(2), -1.));
   if (numproc > 2)
index 5249faa317161bec491f429cabf6808c35d7d2e6..b13e659b048efe14fcd833ff196df09b64b04785 100644 (file)
@@ -57,11 +57,11 @@ test()
   rw_vector(myid * 2)     = myid * 2.0;
   rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
 
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
   v *= 2.0;
   v.add(1.0);
 
-  rw_vector.import(v, VectorOperation::insert);
+  rw_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(rw_vector(myid * 2) == myid * 4.0 + 1, ExcInternalError());
   AssertThrow(rw_vector(myid * 2 + 1) == myid * 4.0 + 3.0, ExcInternalError());
 
@@ -71,26 +71,26 @@ test()
   index.add_index(1);
   LinearAlgebra::ReadWriteVector<double> local_rw_vector(index);
   local_rw_vector(1) = 7;
-  v.import(local_rw_vector, VectorOperation::insert);
+  v.import_elements(local_rw_vector, VectorOperation::insert);
 
   {
-    rw_vector.import(v, VectorOperation::insert);
+    rw_vector.import_elements(v, VectorOperation::insert);
     deallog << myid * 2 << ":" << rw_vector(myid * 2) << std::endl;
     deallog << myid * 2 + 1 << ":" << rw_vector(myid * 2 + 1) << std::endl;
   }
 
   local_rw_vector(1) = -7;
-  v.import(local_rw_vector, VectorOperation::insert);
+  v.import_elements(local_rw_vector, VectorOperation::insert);
 
   {
-    rw_vector.import(v, VectorOperation::insert);
+    rw_vector.import_elements(v, VectorOperation::insert);
     deallog << myid * 2 << ":" << rw_vector(myid * 2) << std::endl;
     deallog << myid * 2 + 1 << ":" << rw_vector(myid * 2 + 1) << std::endl;
   }
 
   // import ghosts onto all procs
   v.update_ghost_values();
-  local_rw_vector.import(v, VectorOperation::insert);
+  local_rw_vector.import_elements(v, VectorOperation::insert);
   AssertThrow(local_rw_vector(1) == -7.0, ExcInternalError());
 
   // check l2 norm
index 2d568e8cc15852df7cae636908d6df92d293d5e9..491a6542b34dd92ce4f0dbc0bbf1edd3be754326 100644 (file)
@@ -66,7 +66,7 @@ test()
           rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
         }
 
-      v.import(rw_vector, VectorOperation::insert);
+      v.import_elements(rw_vector, VectorOperation::insert);
 
       LinearAlgebra::distributed::Vector<double, MemorySpace::Default> w(v),
         u(v);
@@ -82,7 +82,7 @@ test()
           u.update_ghost_values();
         }
 
-      rw_vector.import(v, VectorOperation::insert);
+      rw_vector.import_elements(v, VectorOperation::insert);
       if (myid < 2)
         {
           Assert(rw_vector(myid * 2) == myid * 4.0 + 1, ExcInternalError());
@@ -105,7 +105,7 @@ test()
       u = u_dist;
       u.update_ghost_values();
 
-      rw_vector.import(u_dist, VectorOperation::insert);
+      rw_vector.import_elements(u_dist, VectorOperation::insert);
       if (myid < 2)
         {
           Assert(rw_vector(myid * 2) == myid * 2.0 + 1, ExcInternalError());
@@ -113,7 +113,7 @@ test()
                  ExcInternalError());
         }
 
-      rw_vector.import(u, VectorOperation::insert);
+      rw_vector.import_elements(u, VectorOperation::insert);
       if (myid < 2)
         {
           Assert(rw_vector(myid * 2) == myid * 2.0 + 1, ExcInternalError());
@@ -125,7 +125,7 @@ test()
       u_ghost_set.add_index(1);
       u_ghost_set.add_index(3);
       LinearAlgebra::ReadWriteVector<double> u_ghost_vector(u_ghost_set);
-      u_ghost_vector.import(u, VectorOperation::insert);
+      u_ghost_vector.import_elements(u, VectorOperation::insert);
       Assert(u_ghost_vector(1) == 2., ExcInternalError());
       if (numproc > 1)
         {
@@ -135,7 +135,7 @@ test()
               v_ghost_set.add_index(3);
               LinearAlgebra::ReadWriteVector<double> v_ghost_vector(
                 v_ghost_set);
-              v_ghost_vector.import(v, VectorOperation::insert);
+              v_ghost_vector.import_elements(v, VectorOperation::insert);
               Assert(v_ghost_vector(3) == 7., ExcInternalError());
             }
           Assert(u_ghost_vector(3) == 4., ExcInternalError());
index 4233a9d88fee5a6d879a7ccd15c6229cd110aa23..21b4fbffba29e44f5faada0ce66e53b3fed3ae0b 100644 (file)
@@ -62,7 +62,7 @@ test()
       rw_vector(myid * 2 + 1) = myid * 2.0 + 1.0;
     }
 
-  v.import(rw_vector, VectorOperation::insert);
+  v.import_elements(rw_vector, VectorOperation::insert);
 
   if (myid == 0)
     deallog << "v has ghost elements: " << v.has_ghost_elements() << std::endl;
index 29be8db48e69ac6cb38f5189a04ebd5ec0f64970..8b3e2324a24728736ec64af1611eeb0a7fb5be9c 100644 (file)
@@ -64,7 +64,7 @@ test()
   LinearAlgebra::ReadWriteVector<double> rw_vector(workaround_set);
   rw_vector(0) += 1.;
   rw_vector(2) += 1.;
-  v2.import(rw_vector, VectorOperation::add);
+  v2.import_elements(rw_vector, VectorOperation::add);
 
   // now we should have the correct data, not some uninitialized trash that
   // resided in the ghost range
index 001c650914c37ebaa0b63ce68fb5363cb8df4876..b78c4e70c3d913dded204219ceb882f8bd239f9e 100644 (file)
@@ -69,7 +69,7 @@ test()
   read_write_vector.local_element(0) = myid;
   read_write_vector(1)               = 2. * myid;
 
-  v.import(read_write_vector, VectorOperation::max);
+  v.import_elements(read_write_vector, VectorOperation::max);
   v.update_ghost_values();
 
   deallog << myid << ":"
@@ -80,7 +80,7 @@ test()
   if (myid == 0)
     read_write_vector(1) = -1.0;
 
-  v.import(read_write_vector, VectorOperation::min);
+  v.import_elements(read_write_vector, VectorOperation::min);
   v.update_ghost_values();
 
   deallog << myid << ":"
index 91858b67e81b0d07f4a77486a1127de88628fd2e..f56e477ec4d8d67f2f4569da72efb5ea47d2a88b 100644 (file)
@@ -59,10 +59,10 @@ test()
     partitioner);
 
   // Assignment from Host to Default
-  vec_dev.import(vec_ref, VectorOperation::insert);
+  vec_dev.import_elements(vec_ref, VectorOperation::insert);
 
   // Assignment from Default to Host
-  vec_host.import(vec_dev, VectorOperation::insert);
+  vec_host.import_elements(vec_dev, VectorOperation::insert);
 
   for (unsigned int i = 0; i < ghost_size; ++i)
     {
index 1fb93cf559e6bc73b0fdaa289188afe21ad4a787..624f98396403f1b74810cccf40f5bc762cd40ecf 100644 (file)
@@ -42,7 +42,7 @@ test()
   read_write_vector.local_element(0) = 1.;
   read_write_vector.local_element(1) = 2.;
 
-  v.import(read_write_vector, VectorOperation::insert);
+  v.import_elements(read_write_vector, VectorOperation::insert);
 
   AssertThrow(v.local_element(0) == 1., ExcInternalError());
   AssertThrow(v.local_element(1) == 2., ExcInternalError());
@@ -54,7 +54,7 @@ test()
   read_write_vector.local_element(0) = 1.;
   read_write_vector.local_element(1) = 2.;
 
-  v.import(read_write_vector, VectorOperation::insert);
+  v.import_elements(read_write_vector, VectorOperation::insert);
 
   AssertThrow(v.local_element(0) == my_id + 1, ExcInternalError());
   AssertThrow(v.local_element(1) == my_id + 1, ExcInternalError());
index 833c8068b6bd88d2bb5fbadf080b9dab04e7deac..5c951844e0ab0af7c7ebe6c0c1fd1b77cc09dc00 100644 (file)
@@ -58,7 +58,7 @@ test()
   read_write_vector.local_element(0) = myid;
   read_write_vector(1)               = 2. * myid;
 
-  v.import(read_write_vector, VectorOperation::max);
+  v.import_elements(read_write_vector, VectorOperation::max);
   v.update_ghost_values();
 
   deallog << myid << ':' << "ghost entry after max: " << v(1) << std::endl;
@@ -66,7 +66,7 @@ test()
   if (!myid)
     read_write_vector(1) = -1.0;
 
-  v.import(read_write_vector, VectorOperation::min);
+  v.import_elements(read_write_vector, VectorOperation::min);
   v.update_ghost_values();
 
   deallog << myid << ':' << "ghost entry after min: " << v(1) << std::endl;
index c3c4852ba19ec271410548dae05eb1bf53667ed1..4c1b94461898543b09d93dee43977e53a6ff77e1 100644 (file)
@@ -107,7 +107,7 @@ test()
     {
       rw_vector.reinit(ghost_set);
     }
-  v.import(rw_vector, VectorOperation::add); // 60 + 6
+  v.import_elements(rw_vector, VectorOperation::add); // 60 + 6
   // compress(insert) used to leave ghosts un-touched which resulted in
   // the wrong 55+55 for this compress(add) operation.
 
index 30edf4a50d5a64e6b254333973629cceef17a98c..3415f7245e6120a983a9693c0ff2d388125a02ed 100644 (file)
@@ -89,11 +89,11 @@ test()
         }
     }
 
-  a.import(read_write_2, VectorOperation::insert);
-  b.import(read_write_1, VectorOperation::insert);
-  c.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_2, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
 
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -109,7 +109,7 @@ test()
                     ExcMessage("Vector a has been modified."));
     }
 
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -123,7 +123,7 @@ test()
                     ExcMessage("Vector b has been modified."));
     }
 
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -139,7 +139,7 @@ test()
 
 
   a *= 2;
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -154,7 +154,7 @@ test()
     }
 
   c /= 2.;
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -169,7 +169,7 @@ test()
     }
 
   b += a;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -184,7 +184,7 @@ test()
     }
 
   b -= c;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -198,8 +198,8 @@ test()
                     ExcMessage("Problem in operator -=."));
     }
 
-  b.import(read_write_1, VectorOperation::insert);
-  c.import(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
+  c.import_elements(read_write_1, VectorOperation::insert);
   const double val = b * c;
   AssertThrow(val == 285., ExcMessage("Problem in operator *."));
 }
index ba6814eb8051ba83d1e529351445b1b2bb12cd2c..f8ab7a34d34cc69300accebff61313d4dcaf2ee2 100644 (file)
@@ -78,12 +78,12 @@ test()
         }
     }
 
-  a.import(read_write_1, VectorOperation::insert);
-  b.import(read_write_2, VectorOperation::insert);
-  c.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_2, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
 
   a.add(1.);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -98,7 +98,7 @@ test()
     }
 
   a.add(2., b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -117,7 +117,7 @@ test()
 
   LinearAlgebra::EpetraWrappers::Vector d(a);
   a.add(2., b, 3., d);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -134,9 +134,9 @@ test()
     }
 
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.sadd(3., 2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -153,9 +153,9 @@ test()
     }
 
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.scale(b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -171,7 +171,7 @@ test()
 
 
   a.equ(2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -194,7 +194,7 @@ test()
 
   AssertThrow(b.linfty_norm() == 14., ExcMessage("Problem in linfty_norm."));
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   const double val = a.add_and_dot(2., a, b);
   AssertThrow(val == 1530., ExcMessage("Problem in add_and_dot"));
 }
index a5cdc6b89a7e6fef541e2d3cff04fd9d79db58bb..1fa8d333d31c52396613546517570ed9640d2304 100644 (file)
@@ -44,7 +44,7 @@ test()
   LinearAlgebra::ReadWriteVector<double> read_write(parallel_partitioner);
   if (rank == 0)
     read_write[0] = 1.;
-  a.import(read_write, VectorOperation::insert);
+  a.import_elements(read_write, VectorOperation::insert);
   AssertThrow(a.all_zero() == false, ExcInternalError());
 }
 
index ca8ef4b2d6ed34fddb8a395b5771a86b09bea626..9a2fbb487f46d8f2323eea9e143c6809740113d6 100644 (file)
@@ -55,7 +55,7 @@ test()
     readwrite_is.add_range(2, 6);
   readwrite_is.compress();
   LinearAlgebra::ReadWriteVector<double> readwrite(readwrite_is);
-  readwrite.import(tril_vector, VectorOperation::insert);
+  readwrite.import_elements(tril_vector, VectorOperation::insert);
   if (rank == 0)
     {
       std::vector<double> comp(4);
@@ -80,7 +80,7 @@ test()
                     ExcMessage("Element not copied correctly"));
     }
 
-  readwrite.import(tril_vector, VectorOperation::add);
+  readwrite.import_elements(tril_vector, VectorOperation::add);
 
   if (rank == 0)
     {
index 6c5a4995b06c34c85fc2aeb5af95f6ea0a1b514e..2b82b4fd7e2262d4c0698d3a2078c9bc9edf4966 100644 (file)
@@ -72,7 +72,7 @@ test()
     LinearAlgebra::ReadWriteVector<double> readwrite(readwrite_is);
     try
       {
-        readwrite.import(tril_vector_ghosted, VectorOperation::insert);
+        readwrite.import_elements(tril_vector_ghosted, VectorOperation::insert);
         deallog << "RWVector contents:" << std::endl;
         readwrite.print(deallog.get_file_stream());
       }
@@ -84,7 +84,7 @@ test()
   {
     deallog << "import of distributed vector should work:" << std::endl;
     LinearAlgebra::ReadWriteVector<double> readwrite(readwrite_is);
-    readwrite.import(tril_vector, VectorOperation::insert);
+    readwrite.import_elements(tril_vector, VectorOperation::insert);
     deallog << "RWVector contents:" << std::endl;
     readwrite.print(deallog.get_file_stream());
   }
index 301ee163f7ec07aea9ac8c5a2691c3563d48a20b..f0b58799a0b34c856d34e73b3b924c830b1ceb4a 100644 (file)
@@ -13,7 +13,7 @@
 //
 // ---------------------------------------------------------------------
 
-// test: RWV::import() from TrilinosWrappers::MPI::Vector
+// test: RWV::import_elements() from TrilinosWrappers::MPI::Vector
 
 #include <deal.II/base/index_set.h>
 #include <deal.II/base/utilities.h>
@@ -52,17 +52,17 @@ test()
   readwrite.print(deallog.get_file_stream());
 
   // import RWV->Trilinos
-  tril_vector.import(readwrite, VectorOperation::insert);
+  tril_vector.import_elements(readwrite, VectorOperation::insert);
   deallog << "trilinos vec:" << std::endl;
   tril_vector.print(deallog.get_file_stream());
 
   // test that ::add also works
-  tril_vector.import(readwrite, VectorOperation::add);
+  tril_vector.import_elements(readwrite, VectorOperation::add);
   deallog << "trilinos vec (2x):" << std::endl;
   tril_vector.print(deallog.get_file_stream());
 
   // import again overwriting the contents
-  tril_vector.import(readwrite, VectorOperation::insert);
+  tril_vector.import_elements(readwrite, VectorOperation::insert);
   deallog << "trilinos vec (1x):" << std::endl;
   tril_vector.print(deallog.get_file_stream());
 
index d879a90541c5b20f92c39560e2b3b539bfe42be1..91df2261070673b7d0463b5b0d7e8fd4938c48fa 100644 (file)
@@ -46,13 +46,13 @@ test(LinearAlgebra::EpetraWrappers::Vector &v,
     read_write_v(i) = i;
 
   m.compress(VectorOperation::insert);
-  v.import(read_write_v, VectorOperation::insert);
+  v.import_elements(read_write_v, VectorOperation::insert);
 
   // w:=Mv
   m.vmult(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.m(); ++i)
     {
       double result = 0;
@@ -64,7 +64,7 @@ test(LinearAlgebra::EpetraWrappers::Vector &v,
   m.vmult_add(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.m(); ++i)
     {
       double result = 0;
index 4a225e3b208dfc5ddeb66b780ed904dfd780bcf2..8afb4fab9ce025efa0c7a22ba9c9595dc03f96ed 100644 (file)
@@ -46,13 +46,13 @@ test(LinearAlgebra::EpetraWrappers::Vector &v,
     read_write_v(i) = i;
 
   m.compress(VectorOperation::insert);
-  v.import(read_write_v, VectorOperation::insert);
+  v.import_elements(read_write_v, VectorOperation::insert);
 
   // w:=Mv
   m.Tvmult(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.n(); ++i)
     {
       double result = 0;
@@ -63,7 +63,7 @@ test(LinearAlgebra::EpetraWrappers::Vector &v,
 
   m.Tvmult_add(w, v);
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.n(); ++i)
     {
       double result = 0;
index a74bd96984053ed7f52958065bfd0e423f6fc64e..a6983992ce66e9ff7ebe4563fbad1be5e61bb7d3 100644 (file)
@@ -46,13 +46,13 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
     read_write_v(i) = i;
 
   m.compress(VectorOperation::insert);
-  v.import(read_write_v, VectorOperation::insert);
+  v.import_elements(read_write_v, VectorOperation::insert);
 
   // w:=Mv
   m.vmult(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.m(); ++i)
     {
       double result = 0;
@@ -64,7 +64,7 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
   m.vmult_add(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.m(); ++i)
     {
       double result = 0;
index ba41fce0e7a98d647b3a544728db64f89892ce2c..1110704b47f56819576b33d33ef8ae12b50d3802 100644 (file)
@@ -46,13 +46,13 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
     read_write_v(i) = i;
 
   m.compress(VectorOperation::insert);
-  v.import(read_write_v, VectorOperation::insert);
+  v.import_elements(read_write_v, VectorOperation::insert);
 
   // w:=Mv
   m.Tvmult(w, v);
 
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.n(); ++i)
     {
       double result = 0;
@@ -63,7 +63,7 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
 
   m.Tvmult_add(w, v);
   // make sure we get the expected result
-  read_write_w.import(w, VectorOperation::insert);
+  read_write_w.import_elements(w, VectorOperation::insert);
   for (unsigned int i = 0; i < m.n(); ++i)
     {
       double result = 0;
index 73dd422bd2309ef5086237bc1ac8c82c0e4d3988..4d5f3691056bbdcf79ac214c2349f667c38e8d95 100644 (file)
@@ -66,8 +66,8 @@ main(int argc, char *argv[])
 
         LinearAlgebra::ReadWriteVector<double> v_tmp(local_range);
         LinearAlgebra::EpetraWrappers::Vector  v2(local_range, MPI_COMM_WORLD);
-        v_tmp.import(v1, VectorOperation::insert);
-        v2.import(v_tmp, VectorOperation::insert);
+        v_tmp.import_elements(v1, VectorOperation::insert);
+        v2.import_elements(v_tmp, VectorOperation::insert);
         VectorTools::subtract_mean_value(v2);
         AssertThrow(std::fabs(v2.mean_value()) < 1e-10 * v2.l2_norm(),
                     ExcInternalError());
index ed685ca1b1ce500cf521262fa347de073b91d83d..4071ee2d99e3682a29eb8e57ce5ae76192abc0b7 100644 (file)
@@ -89,10 +89,10 @@ test()
         }
     }
 
-  a.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_2, VectorOperation::insert);
   AssertThrow(a.size() == 10, ExcMessage("Vector has the wrong size."));
 
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -108,10 +108,10 @@ test()
                     ExcMessage("Vector a has been modified."));
     }
 
-  b.import(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
   AssertThrow(b.size() == 10, ExcMessage("Vector has the wrong size."));
 
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -125,10 +125,10 @@ test()
                     ExcMessage("Vector b has been modified."));
     }
 
-  c.import(read_write_2, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
   AssertThrow(c.size() == 10, ExcMessage("Vector has the wrong size."));
 
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -143,7 +143,7 @@ test()
     }
 
   a *= 2;
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -158,7 +158,7 @@ test()
     }
 
   c /= 2.;
-  read_write_3.import(c, VectorOperation::insert);
+  read_write_3.import_elements(c, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -173,7 +173,7 @@ test()
     }
 
   b += a;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -190,7 +190,7 @@ test()
     }
 
   b -= c;
-  read_write_3.import(b, VectorOperation::insert);
+  read_write_3.import_elements(b, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 6; ++i)
@@ -206,8 +206,8 @@ test()
                     ExcMessage("Problem in operator -=."));
     }
 
-  b.import(read_write_1, VectorOperation::insert);
-  c.import(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_1, VectorOperation::insert);
+  c.import_elements(read_write_1, VectorOperation::insert);
   const Number val = b * c;
   AssertThrow(val == Number(285.), ExcMessage("Problem in operator *."));
 }
index a7f6f2529fc8414c1a63dc7bb74dd737948ed97a..3cadcbcdbae8205332dff29144f86f610883803c 100644 (file)
@@ -79,12 +79,12 @@ test()
         }
     }
 
-  a.import(read_write_1, VectorOperation::insert);
-  b.import(read_write_2, VectorOperation::insert);
-  c.import(read_write_2, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
+  b.import_elements(read_write_2, VectorOperation::insert);
+  c.import_elements(read_write_2, VectorOperation::insert);
 
   a.add(1.);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -99,7 +99,7 @@ test()
     }
 
   a.add(2., b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -120,7 +120,7 @@ test()
 
   LinearAlgebra::TpetraWrappers::Vector<Number> d(a);
   a.add(2., b, 3., d);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -139,9 +139,9 @@ test()
     }
 
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.sadd(3., 2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -160,9 +160,9 @@ test()
     }
 
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   a.scale(b);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -178,7 +178,7 @@ test()
 
 
   a.equ(2., c);
-  read_write_3.import(a, VectorOperation::insert);
+  read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
     {
       for (unsigned int i = 0; i < 5; ++i)
@@ -201,7 +201,7 @@ test()
 
   AssertThrow(b.linfty_norm() == 14., ExcMessage("Problem in linfty_norm."));
 
-  a.import(read_write_1, VectorOperation::insert);
+  a.import_elements(read_write_1, VectorOperation::insert);
   const Number val = a.add_and_dot(2., a, b);
   AssertThrow(val == Number(1530.), ExcMessage("Problem in add_and_dot"));
 }
index 46280f41d3d7da2d12c3e39d2dede58ed6027bff..b5b25caf7be565d2dcd0108cb552b3e0d95e1883 100644 (file)
@@ -55,7 +55,7 @@ test()
   rw_vector(my_second_index) = my_id + 100;
   rw_vector(0)               = 1.;
   // rw_vector(2) = 1.;
-  v.import(rw_vector, VectorOperation::add);
+  v.import_elements(rw_vector, VectorOperation::add);
   deallog << "Tpetra first import add:" << std::endl;
   v.print(deallog.get_file_stream());
   rw_vector.print(deallog.get_file_stream());
@@ -64,12 +64,12 @@ test()
   rw_vector(my_second_index) = my_id + 200;
   rw_vector(0)               = 2.;
   // rw_vector(2) = 3.;
-  v.import(rw_vector, VectorOperation::add);
+  v.import_elements(rw_vector, VectorOperation::add);
   deallog << "Tpetra second import add:" << std::endl;
   v.print(deallog.get_file_stream());
   rw_vector.print(deallog.get_file_stream());
 
-  rw_vector.import(v, VectorOperation::add);
+  rw_vector.import_elements(v, VectorOperation::add);
   deallog << "ReadWrite import add:" << std::endl;
   rw_vector.print(deallog.get_file_stream());
 
@@ -77,7 +77,7 @@ test()
   rw_vector(my_second_index) = 1;
   rw_vector(0)               = 4.;
   // rw_vector(2) = 3.;
-  rw_vector.import(v, VectorOperation::min);
+  rw_vector.import_elements(v, VectorOperation::min);
   deallog << "ReadWrite import min:" << std::endl;
   rw_vector.print(deallog.get_file_stream());
 
@@ -85,7 +85,7 @@ test()
   rw_vector(my_second_index) = 1;
   rw_vector(0)               = 4.;
   // rw_vector(2) = 3.;
-  rw_vector.import(v, VectorOperation::max);
+  rw_vector.import_elements(v, VectorOperation::max);
   deallog << "ReadWrite import max:" << std::endl;
   rw_vector.print(deallog.get_file_stream());
 }

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.