From: Wolfgang Bangerth Date: Thu, 11 May 2023 16:40:31 +0000 (-0600) Subject: Avoid the name 'import' as a function name. X-Git-Tag: v9.5.0-rc1~198^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5201a0241214563c02505be861f98cc9c0ef0a86;p=dealii.git Avoid the name 'import' as a function name. --- diff --git a/examples/step-50/step-50.cc b/examples/step-50/step-50.cc index 92f6736499..b6b5d3ab06 100644 --- a/examples/step-50/step-50.cc +++ b/examples/step-50/step-50.cc @@ -105,13 +105,13 @@ namespace ChangeVectorTypes const LinearAlgebra::distributed::Vector &in) { LinearAlgebra::ReadWriteVector 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 diff --git a/examples/step-64/doc/intro.dox b/examples/step-64/doc/intro.dox index 368f4513c4..80a8c03ba0 100644 --- a/examples/step-64/doc/intro.dox +++ b/examples/step-64/doc/intro.dox @@ -86,12 +86,12 @@ LinearAlgebra::CUDAWrappers::Vector: // Move the data to the device: LinearAlgebra::CUDAWrappers::Vector 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 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 diff --git a/examples/step-64/step-64.cc b/examples/step-64/step-64.cc index f63796d109..b6c119f078 100644 --- a/examples/step-64/step-64.cc +++ b/examples/step-64/step-64.cc @@ -492,8 +492,8 @@ namespace Step64 system_rhs_host.compress(VectorOperation::add); LinearAlgebra::ReadWriteVector 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 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); diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 2a55038fa7..dcbade4d6d 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -824,7 +824,7 @@ namespace internal index_set.add_indices(cache_indices.begin(), cache_indices.end()); index_set.compress(); LinearAlgebra::ReadWriteVector 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 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) diff --git a/include/deal.II/lac/cuda_vector.h b/include/deal.II/lac/cuda_vector.h index b53bbaa4e0..0797cad4a3 100644 --- a/include/deal.II/lac/cuda_vector.h +++ b/include/deal.II/lac/cuda_vector.h @@ -141,10 +141,11 @@ namespace LinearAlgebra * copy a vector to the GPU. */ virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Sets all elements of the vector to the scalar @p s. This operation is diff --git a/include/deal.II/lac/la_parallel_block_vector.h b/include/deal.II/lac/la_parallel_block_vector.h index 659a22a7f3..473461a40b 100644 --- a/include/deal.II/lac/la_parallel_block_vector.h +++ b/include/deal.II/lac/la_parallel_block_vector.h @@ -524,10 +524,11 @@ namespace LinearAlgebra * improve performance. */ virtual void - import(const LinearAlgebra::ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const LinearAlgebra::ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Return the scalar product of two vectors. diff --git a/include/deal.II/lac/la_parallel_block_vector.templates.h b/include/deal.II/lac/la_parallel_block_vector.templates.h index 14edd312df..03ce6b74b0 100644 --- a/include/deal.II/lac/la_parallel_block_vector.templates.h +++ b/include/deal.II/lac/la_parallel_block_vector.templates.h @@ -355,8 +355,9 @@ namespace LinearAlgebra IndexSet combined_set = partitioner->locally_owned_range(); combined_set.add_indices(partitioner->ghost_indices()); ReadWriteVector 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 inline void - BlockVector::import( + BlockVector::import_elements( const LinearAlgebra::ReadWriteVector &, VectorOperation::values, std::shared_ptr) diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index d03461cf5d..7f0e23025c 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -206,13 +206,13 @@ namespace LinearAlgebra * Kokkos::View( vector_dev, n_local_elements)); * @endcode - *
  • use import(): + *
  • use import_elements(): * @code * Vector vector(local_range, comm); * ReadWriteVector 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 * * The import method is a lot safer and will perform an MPI communication if @@ -691,8 +691,8 @@ namespace LinearAlgebra */ template void - import(const Vector &src, - VectorOperation::values operation); + import_elements(const Vector &src, + VectorOperation::values operation); /** @} */ @@ -745,10 +745,11 @@ namespace LinearAlgebra * be moved to the @ref GlossDevice "device". */ virtual void - import(const LinearAlgebra::ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const LinearAlgebra::ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Return the scalar product of two vectors. diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 36242604f5..bc4e98d239 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -898,7 +898,7 @@ namespace LinearAlgebra template template void - Vector::import( + Vector::import_elements( const Vector &src, VectorOperation::values operation) { @@ -1240,7 +1240,7 @@ namespace LinearAlgebra template void - Vector::import( + Vector::import_elements( const ReadWriteVector &V, VectorOperation::values operation, std::shared_ptr diff --git a/include/deal.II/lac/la_vector.h b/include/deal.II/lac/la_vector.h index a865fdbaa5..b3bfee762b 100644 --- a/include/deal.II/lac/la_vector.h +++ b/include/deal.II/lac/la_vector.h @@ -222,10 +222,11 @@ namespace LinearAlgebra * This function is not implemented and will throw an exception. */ virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Add @p a to all components. Note that @p a is a scalar not a vector. diff --git a/include/deal.II/lac/la_vector.templates.h b/include/deal.II/lac/la_vector.templates.h index 1d56f6462f..1e2409c68a 100644 --- a/include/deal.II/lac/la_vector.templates.h +++ b/include/deal.II/lac/la_vector.templates.h @@ -248,7 +248,7 @@ namespace LinearAlgebra template void - Vector::import( + Vector::import_elements( const ReadWriteVector &, VectorOperation::values, std::shared_ptr) diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index 90e536388f..2a31b247af 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -298,10 +298,11 @@ namespace LinearAlgebra * dealing with a serial vector here. */ void - import(const dealii::Vector &vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const dealii::Vector &vec, + VectorOperation::values operation, + const std::shared_ptr + &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 &vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const LinearAlgebra::Vector &vec, + VectorOperation::values operation, + const std::shared_ptr + &communication_pattern = {}); /** * Imports all the elements present in the vector's IndexSet from the @@ -328,10 +330,11 @@ namespace LinearAlgebra */ template void - import(const distributed::Vector &vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const distributed::Vector &vec, + VectorOperation::values operation, + const std::shared_ptr + &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 - &communication_pattern = {}); + import_elements( + const PETScWrappers::MPI::Vector &petsc_vec, + VectorOperation::values operation, + const std::shared_ptr + &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 - &communication_pattern = {}); + import_elements( + const TrilinosWrappers::MPI::Vector &trilinos_vec, + VectorOperation::values operation, + const std::shared_ptr + &communication_pattern = {}); # ifdef DEAL_II_TRILINOS_WITH_TPETRA /** @@ -378,10 +383,11 @@ namespace LinearAlgebra template std::enable_if_t::value && dealii::is_tpetra_type::value> - import(const TpetraWrappers::Vector &tpetra_vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const TpetraWrappers::Vector &tpetra_vec, + VectorOperation::values operation, + const std::shared_ptr + &communication_pattern = {}); # endif /** @@ -393,10 +399,11 @@ namespace LinearAlgebra * performance. */ void - import(const EpetraWrappers::Vector &epetra_vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const EpetraWrappers::Vector &epetra_vec, + VectorOperation::values operation, + const std::shared_ptr + &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 &cuda_vec, - VectorOperation::values operation, - const std::shared_ptr - &communication_pattern = {}); + import_elements( + const CUDAWrappers::Vector &cuda_vec, + VectorOperation::values operation, + const std::shared_ptr + &communication_pattern = {}); #endif /** @@ -661,13 +669,14 @@ namespace LinearAlgebra template std::enable_if_t::value && dealii::is_tpetra_type::value> - import(const Tpetra::Vector - & tpetra_vector, - const IndexSet & locally_owned_elements, - VectorOperation::values operation, - const MPI_Comm mpi_comm, - const std::shared_ptr - &communication_pattern); + import_elements( + const Tpetra::Vector + & tpetra_vector, + const IndexSet & locally_owned_elements, + VectorOperation::values operation, + const MPI_Comm mpi_comm, + const std::shared_ptr + &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 - &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 + &communication_pattern); #endif /** diff --git a/include/deal.II/lac/read_write_vector.templates.h b/include/deal.II/lac/read_write_vector.templates.h index 692f306049..b3188d55fa 100644 --- a/include/deal.II/lac/read_write_vector.templates.h +++ b/include/deal.II/lac/read_write_vector.templates.h @@ -96,11 +96,12 @@ namespace LinearAlgebra struct read_write_vector_functions { static void - import(const std::shared_ptr - & communication_pattern, - const Number * values, - const VectorOperation::values operation, - ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) + import_elements( + const std::shared_ptr + & communication_pattern, + const Number * values, + const VectorOperation::values operation, + ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) { (void)communication_pattern; (void)values; @@ -123,11 +124,12 @@ namespace LinearAlgebra static void - import(const std::shared_ptr - & communication_pattern, - const Number * values, - const VectorOperation::values operation, - ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) + import_elements( + const std::shared_ptr + & communication_pattern, + const Number * values, + const VectorOperation::values operation, + ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) { distributed::Vector tmp_vector( communication_pattern); @@ -166,11 +168,12 @@ namespace LinearAlgebra using size_type = types::global_dof_index; static void - import(const std::shared_ptr - & communication_pattern, - const Number * values, - const VectorOperation::values operation, - ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) + import_elements( + const std::shared_ptr + & communication_pattern, + const Number * values, + const VectorOperation::values operation, + ::dealii::LinearAlgebra::ReadWriteVector &rw_vector) { distributed::Vector tmp_vector( communication_pattern); @@ -446,7 +449,7 @@ namespace LinearAlgebra template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const dealii::Vector &vec, VectorOperation::values operation, const std::shared_ptr @@ -461,7 +464,7 @@ namespace LinearAlgebra template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::Vector &vec, VectorOperation::values operation, const std::shared_ptr @@ -477,7 +480,7 @@ namespace LinearAlgebra template template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &vec, VectorOperation::values operation, const std::shared_ptr @@ -504,7 +507,7 @@ namespace LinearAlgebra } - internal::read_write_vector_functions::import( + internal::read_write_vector_functions::import_elements( comm_pattern, vec.begin(), operation, *this); } @@ -545,7 +548,7 @@ namespace LinearAlgebra template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const PETScWrappers::MPI::Vector &petsc_vec, VectorOperation::values /*operation*/, const std::shared_ptr @@ -578,7 +581,7 @@ namespace LinearAlgebra template std::enable_if_t::value && dealii::is_tpetra_type::value> - ReadWriteVector::import( + ReadWriteVector::import_elements( const Tpetra::Vector &vector, const IndexSet & source_elements, VectorOperation::values operation, @@ -695,7 +698,7 @@ namespace LinearAlgebra template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const Epetra_MultiVector &multivector, const IndexSet & source_elements, VectorOperation::values operation, @@ -836,7 +839,7 @@ namespace LinearAlgebra template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const TrilinosWrappers::MPI::Vector &trilinos_vec, VectorOperation::values operation, const std::shared_ptr @@ -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 std::enable_if_t::value && dealii::is_tpetra_type::value> - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::TpetraWrappers::Vector &trilinos_vec, VectorOperation::values operation, const std::shared_ptr &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 void - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::EpetraWrappers::Vector &trilinos_vec, VectorOperation::values operation, const std::shared_ptr &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 void - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::CUDAWrappers::Vector &cuda_vec, VectorOperation::values operation, const std::shared_ptr &) diff --git a/include/deal.II/lac/trilinos_epetra_vector.h b/include/deal.II/lac/trilinos_epetra_vector.h index d142c15e5e..b8a53b18c3 100644 --- a/include/deal.II/lac/trilinos_epetra_vector.h +++ b/include/deal.II/lac/trilinos_epetra_vector.h @@ -127,10 +127,11 @@ namespace LinearAlgebra * improve performance. */ virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Multiply the entire vector by a fixed factor. diff --git a/include/deal.II/lac/trilinos_tpetra_vector.h b/include/deal.II/lac/trilinos_tpetra_vector.h index 977935216f..ce3c5d9160 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.h @@ -183,10 +183,11 @@ namespace LinearAlgebra * improve performance. */ virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) override; + import_elements( + const ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) override; /** * Multiply the entire vector by a fixed factor. diff --git a/include/deal.II/lac/trilinos_tpetra_vector.templates.h b/include/deal.II/lac/trilinos_tpetra_vector.templates.h index 85bc89c6df..0cd7dc3a23 100644 --- a/include/deal.II/lac/trilinos_tpetra_vector.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_vector.templates.h @@ -166,7 +166,7 @@ namespace LinearAlgebra template void - Vector::import( + Vector::import_elements( const ReadWriteVector &V, VectorOperation::values operation, std::shared_ptr diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index 4024d14f33..066d727f6e 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -718,8 +718,8 @@ namespace TrilinosWrappers * current elements. */ void - import(const LinearAlgebra::ReadWriteVector &rwv, - const VectorOperation::values operation); + import_elements(const LinearAlgebra::ReadWriteVector &rwv, + const VectorOperation::values operation); /** diff --git a/include/deal.II/lac/vector_space_vector.h b/include/deal.II/lac/vector_space_vector.h index 78fc64822a..38dc0dde84 100644 --- a/include/deal.II/lac/vector_space_vector.h +++ b/include/deal.II/lac/vector_space_vector.h @@ -108,10 +108,11 @@ namespace LinearAlgebra * performance. */ virtual void - import(const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}) = 0; + import_elements( + const ReadWriteVector &V, + VectorOperation::values operation, + std::shared_ptr + communication_pattern = {}) = 0; /** * Return the scalar product of two vectors. diff --git a/include/deal.II/numerics/data_out_dof_data.templates.h b/include/deal.II/numerics/data_out_dof_data.templates.h index 6edcdce4c6..5e2158f0b7 100644 --- a/include/deal.II/numerics/data_out_dof_data.templates.h +++ b/include/deal.II/numerics/data_out_dof_data.templates.h @@ -881,13 +881,13 @@ namespace internal { LinearAlgebra::ReadWriteVector temp; temp.reinit(src.locally_owned_elements()); - temp.import(src, VectorOperation::insert); + temp.import_elements(src, VectorOperation::insert); LinearAlgebra::ReadWriteVector temp2; temp2.reinit(temp, true); temp2 = temp; - dst.import(temp2, VectorOperation::insert); + dst.import_elements(temp2, VectorOperation::insert); } #ifdef DEAL_II_WITH_TRILINOS diff --git a/source/fe/mapping_q_cache.cc b/source/fe/mapping_q_cache.cc index a60c355c83..b4fb82b00d 100644 --- a/source/fe/mapping_q_cache.cc +++ b/source/fe/mapping_q_cache.cc @@ -289,8 +289,8 @@ namespace { LinearAlgebra::ReadWriteVector 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 diff --git a/source/lac/cuda_vector.cc b/source/lac/cuda_vector.cc index 44288c755d..2c7789121b 100644 --- a/source/lac/cuda_vector.cc +++ b/source/lac/cuda_vector.cc @@ -126,7 +126,7 @@ namespace LinearAlgebra template void - Vector::import( + Vector::import_elements( const ReadWriteVector &V, VectorOperation::values operation, std::shared_ptr) diff --git a/source/lac/la_parallel_vector.cc b/source/lac/la_parallel_vector.cc index c95e627c57..2736380d34 100644 --- a/source/lac/la_parallel_vector.cc +++ b/source/lac/la_parallel_vector.cc @@ -48,34 +48,34 @@ namespace LinearAlgebra #ifndef DOXYGEN template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Default>( const Vector &, VectorOperation::values); template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Default>( const Vector &, VectorOperation::values); template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Host>( const Vector &, VectorOperation::values); template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Host>( const Vector &, VectorOperation::values); template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Default>( const Vector &, VectorOperation::values); template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Default>( const Vector &, VectorOperation::values); diff --git a/source/lac/la_parallel_vector.inst.in b/source/lac/la_parallel_vector.inst.in index da46a86077..f8807262db 100644 --- a/source/lac/la_parallel_vector.inst.in +++ b/source/lac/la_parallel_vector.inst.in @@ -23,7 +23,7 @@ for (SCALAR : REAL_AND_COMPLEX_SCALARS) \{ template class Vector; template void - Vector::import< + Vector::import_elements< ::dealii::MemorySpace::Host>( const Vector &, VectorOperation::values); diff --git a/source/lac/read_write_vector.cc b/source/lac/read_write_vector.cc index 453ddd3da9..b0dd17a664 100644 --- a/source/lac/read_write_vector.cc +++ b/source/lac/read_write_vector.cc @@ -42,36 +42,36 @@ namespace LinearAlgebra #ifndef DOXYGEN template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); # ifdef DEAL_II_WITH_COMPLEX_VALUES template void - ReadWriteVector>::import( + ReadWriteVector>::import_elements( const distributed::Vector, ::dealii::MemorySpace::Host> &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector>::import( + ReadWriteVector>::import_elements( const distributed::Vector, ::dealii::MemorySpace::Host> &, VectorOperation::values, @@ -82,14 +82,14 @@ namespace LinearAlgebra # ifdef HAVE_TPETRA_INST_FLOAT template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::TpetraWrappers::Vector &, VectorOperation::values, const std::shared_ptr &); # endif # ifdef HAVE_TPETRA_INST_DOUBLE template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const LinearAlgebra::TpetraWrappers::Vector &, VectorOperation::values, const std::shared_ptr &); @@ -97,14 +97,14 @@ namespace LinearAlgebra # ifdef DEAL_II_WITH_COMPLEX_VALUES # ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT template void - ReadWriteVector>::import( + ReadWriteVector>::import_elements( const LinearAlgebra::TpetraWrappers::Vector> &, VectorOperation::values, const std::shared_ptr &); # endif # ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE template void - ReadWriteVector>::import( + ReadWriteVector>::import_elements( const LinearAlgebra::TpetraWrappers::Vector> &, VectorOperation::values, const std::shared_ptr &); diff --git a/source/lac/read_write_vector_cuda.cc b/source/lac/read_write_vector_cuda.cc index dd24a1afb9..d06fccff5f 100644 --- a/source/lac/read_write_vector_cuda.cc +++ b/source/lac/read_write_vector_cuda.cc @@ -23,23 +23,23 @@ DEAL_II_NAMESPACE_OPEN namespace LinearAlgebra { template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const CUDAWrappers::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const CUDAWrappers::Vector &, VectorOperation::values, const std::shared_ptr &); template void - ReadWriteVector::import( + ReadWriteVector::import_elements( const distributed::Vector &, VectorOperation::values, const std::shared_ptr &); diff --git a/source/lac/trilinos_epetra_vector.cc b/source/lac/trilinos_epetra_vector.cc index 5343e808cd..b79f1d5540 100644 --- a/source/lac/trilinos_epetra_vector.cc +++ b/source/lac/trilinos_epetra_vector.cc @@ -144,7 +144,7 @@ namespace LinearAlgebra void - Vector::import( + Vector::import_elements( const ReadWriteVector &V, VectorOperation::values operation, std::shared_ptr diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index dfa44187b3..6d7c25f20a 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -552,16 +552,16 @@ namespace TrilinosWrappers void - Vector::import(const LinearAlgebra::ReadWriteVector &rwv, - const VectorOperation::values operation) + Vector::import_elements(const LinearAlgebra::ReadWriteVector &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()); diff --git a/tests/belos/solver_belos_01.cc b/tests/belos/solver_belos_01.cc index 586687fe12..c3a3d6030f 100644 --- a/tests/belos/solver_belos_01.cc +++ b/tests/belos/solver_belos_01.cc @@ -116,15 +116,15 @@ main(int argc, char *argv[]) dof_handler.get_communicator()); LinearAlgebra::ReadWriteVector 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 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(&x_.trilinos_vector(), false); B = Teuchos::rcp(&r_.trilinos_vector(), false); diff --git a/tests/cuda/coefficient_eval.cc b/tests/cuda/coefficient_eval.cc index b2da859b17..7469a928a4 100644 --- a/tests/cuda/coefficient_eval.cc +++ b/tests/cuda/coefficient_eval.cc @@ -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(); diff --git a/tests/cuda/cuda_evaluate_2d_shape.cc b/tests/cuda/cuda_evaluate_2d_shape.cc index 84a120f947..b5f38503fc 100644 --- a/tests/cuda/cuda_evaluate_2d_shape.cc +++ b/tests/cuda/cuda_evaluate_2d_shape.cc @@ -132,7 +132,6 @@ test() Kokkos::deep_copy(x_dev, x_host); Kokkos::deep_copy(y_dev, y_host); - Kokkos::View shape_values( Kokkos::view_alloc("shape_values", Kokkos::WithoutInitializing), size_shape_values); diff --git a/tests/cuda/cuda_vector_01.cc b/tests/cuda/cuda_vector_01.cc index cd042f05a6..6d3ff242db 100644 --- a/tests/cuda/cuda_vector_01.cc +++ b/tests/cuda/cuda_vector_01.cc @@ -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 =.")); } diff --git a/tests/cuda/cuda_vector_02.cc b/tests/cuda/cuda_vector_02.cc index ed240cea52..fba39610a3 100644 --- a/tests/cuda/cuda_vector_02.cc +++ b/tests/cuda/cuda_vector_02.cc @@ -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 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")); } diff --git a/tests/cuda/cuda_vector_03.cc b/tests/cuda/cuda_vector_03.cc index 772928010e..4d0c3355de 100644 --- a/tests/cuda/cuda_vector_03.cc +++ b/tests/cuda/cuda_vector_03.cc @@ -28,7 +28,7 @@ test() LinearAlgebra::ReadWriteVector 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")); diff --git a/tests/cuda/cuda_vector_04.cc b/tests/cuda/cuda_vector_04.cc index e54a829a64..c9a5c6da62 100644 --- a/tests/cuda/cuda_vector_04.cc +++ b/tests/cuda/cuda_vector_04.cc @@ -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()); } diff --git a/tests/cuda/cuda_vector_05.cc b/tests/cuda/cuda_vector_05.cc index 8c2dd8963d..80fea9ee1a 100644 --- a/tests/cuda/cuda_vector_05.cc +++ b/tests/cuda/cuda_vector_05.cc @@ -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")); } diff --git a/tests/cuda/matrix_free_matrix_vector_10.cc b/tests/cuda/matrix_free_matrix_vector_10.cc index fb42250267..6ea858759a 100644 --- a/tests/cuda/matrix_free_matrix_vector_10.cc +++ b/tests/cuda/matrix_free_matrix_vector_10.cc @@ -135,21 +135,21 @@ test() continue; rw_in.local_element(i) = random_value(); } - in_dev.import(rw_in, VectorOperation::insert); + in_dev.import_elements(rw_in, VectorOperation::insert); mf.vmult(out_dev, in_dev); LinearAlgebra::distributed::Vector out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; diff --git a/tests/cuda/matrix_free_matrix_vector_10a.cc b/tests/cuda/matrix_free_matrix_vector_10a.cc index 250ca0463a..7c434dd7bb 100644 --- a/tests/cuda/matrix_free_matrix_vector_10a.cc +++ b/tests/cuda/matrix_free_matrix_vector_10a.cc @@ -137,21 +137,21 @@ test() continue; rw_in.local_element(i) = random_value(); } - in_dev.import(rw_in, VectorOperation::insert); + in_dev.import_elements(rw_in, VectorOperation::insert); mf.vmult(out_dev, in_dev); LinearAlgebra::distributed::Vector out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; diff --git a/tests/cuda/matrix_free_matrix_vector_19.cc b/tests/cuda/matrix_free_matrix_vector_19.cc index 450d644512..39fba64516 100644 --- a/tests/cuda/matrix_free_matrix_vector_19.cc +++ b/tests/cuda/matrix_free_matrix_vector_19.cc @@ -131,21 +131,21 @@ test() continue; rw_in.local_element(i) = random_value(); } - in_dev.import(rw_in, VectorOperation::insert); + in_dev.import_elements(rw_in, VectorOperation::insert); mf.vmult(out_dev, in_dev); LinearAlgebra::distributed::Vector out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; diff --git a/tests/cuda/matrix_free_matrix_vector_25.cc b/tests/cuda/matrix_free_matrix_vector_25.cc index baa2dc8960..a80c6ac3b4 100644 --- a/tests/cuda/matrix_free_matrix_vector_25.cc +++ b/tests/cuda/matrix_free_matrix_vector_25.cc @@ -138,21 +138,21 @@ test() continue; rw_in.local_element(i) = random_value(); } - in_dev.import(rw_in, VectorOperation::insert); + in_dev.import_elements(rw_in, VectorOperation::insert); mf.vmult(out_dev, in_dev); LinearAlgebra::distributed::Vector out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; diff --git a/tests/cuda/matrix_free_matrix_vector_26.cc b/tests/cuda/matrix_free_matrix_vector_26.cc index 09dbd64935..8c1eeaf803 100644 --- a/tests/cuda/matrix_free_matrix_vector_26.cc +++ b/tests/cuda/matrix_free_matrix_vector_26.cc @@ -144,21 +144,21 @@ test() continue; rw_in.local_element(i) = random_value(); } - in_dev.import(rw_in, VectorOperation::insert); + in_dev.import_elements(rw_in, VectorOperation::insert); mf.vmult(out_dev, in_dev); LinearAlgebra::distributed::Vector out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; diff --git a/tests/cuda/matrix_free_multiple_objects.cc b/tests/cuda/matrix_free_multiple_objects.cc index c3740bc80f..e1bf9da3b2 100644 --- a/tests/cuda/matrix_free_multiple_objects.cc +++ b/tests/cuda/matrix_free_multiple_objects.cc @@ -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; diff --git a/tests/cuda/matrix_vector_common.h b/tests/cuda/matrix_vector_common.h index bdedecf6be..7420cf5032 100644 --- a/tests/cuda/matrix_vector_common.h +++ b/tests/cuda/matrix_vector_common.h @@ -114,10 +114,10 @@ do_test(const DoFHandler & 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; diff --git a/tests/cuda/precondition_01.cc b/tests/cuda/precondition_01.cc index 48cff95402..7171c10bfd 100644 --- a/tests/cuda/precondition_01.cc +++ b/tests/cuda/precondition_01.cc @@ -51,7 +51,7 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); const Number tolerance = 1000. * std::numeric_limits::epsilon(); SolverControl control(100, tolerance); SolverCG> cg_dev(control); diff --git a/tests/cuda/precondition_02.cc b/tests/cuda/precondition_02.cc index cea04066ba..f74a79f20d 100644 --- a/tests/cuda/precondition_02.cc +++ b/tests/cuda/precondition_02.cc @@ -51,7 +51,7 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); const Number tolerance = 1000. * std::numeric_limits::epsilon(); SolverControl control(100, tolerance); SolverCG> cg_dev(control); diff --git a/tests/cuda/precondition_03.cc b/tests/cuda/precondition_03.cc index e4b0dfb66d..cf2ce3d863 100644 --- a/tests/cuda/precondition_03.cc +++ b/tests/cuda/precondition_03.cc @@ -137,14 +137,14 @@ test() continue; rw_in.local_element(i) = random_value(); } - 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 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 ref( owned_set, MPI_COMM_WORLD); TrilinosWrappers::SparseMatrix sparse_matrix; @@ -231,7 +231,7 @@ test() LinearAlgebra::distributed::Vector>>( LinearAlgebra::distributed::Vector( 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 out_host( owned_set, MPI_COMM_WORLD); LinearAlgebra::ReadWriteVector 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; diff --git a/tests/cuda/solver_01.cc b/tests/cuda/solver_01.cc index 88869dd472..5c84c6f09e 100644 --- a/tests/cuda/solver_01.cc +++ b/tests/cuda/solver_01.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverCG> 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()); diff --git a/tests/cuda/solver_02.cc b/tests/cuda/solver_02.cc index b6292b656f..0ecc2552b1 100644 --- a/tests/cuda/solver_02.cc +++ b/tests/cuda/solver_02.cc @@ -72,7 +72,7 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::CUDAWrappers::Vector rhs_dev(size); LinearAlgebra::ReadWriteVector 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 solution_dev(size); const std::array solver_names{ @@ -91,7 +91,7 @@ test(Utilities::CUDA::Handle &cuda_handle) // Move the result back to the host LinearAlgebra::ReadWriteVector 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) diff --git a/tests/cuda/solver_03.cc b/tests/cuda/solver_03.cc index be32d03fa4..429dcaa192 100644 --- a/tests/cuda/solver_03.cc +++ b/tests/cuda/solver_03.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverGMRES> 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()); diff --git a/tests/cuda/solver_04.cc b/tests/cuda/solver_04.cc index 61f6d5afa0..a3c3a62d7e 100644 --- a/tests/cuda/solver_04.cc +++ b/tests/cuda/solver_04.cc @@ -60,13 +60,13 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverBicgstab> 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()); diff --git a/tests/cuda/solver_05.cc b/tests/cuda/solver_05.cc index 274586d5af..d63947f0e8 100644 --- a/tests/cuda/solver_05.cc +++ b/tests/cuda/solver_05.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverFGMRES> 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()); diff --git a/tests/cuda/solver_06.cc b/tests/cuda/solver_06.cc index ab0521e519..aa93549c8c 100644 --- a/tests/cuda/solver_06.cc +++ b/tests/cuda/solver_06.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverFIRE> 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()); diff --git a/tests/cuda/solver_07.cc b/tests/cuda/solver_07.cc index a2862db80d..eb34ee4390 100644 --- a/tests/cuda/solver_07.cc +++ b/tests/cuda/solver_07.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverMinRes> 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()); diff --git a/tests/cuda/solver_08.cc b/tests/cuda/solver_08.cc index 3e99773377..b4d6c945b2 100644 --- a/tests/cuda/solver_08.cc +++ b/tests/cuda/solver_08.cc @@ -60,12 +60,12 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverQMRS> 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()); diff --git a/tests/cuda/solver_09.cc b/tests/cuda/solver_09.cc index d48cd8c754..20a10e2bcd 100644 --- a/tests/cuda/solver_09.cc +++ b/tests/cuda/solver_09.cc @@ -88,13 +88,13 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverRichardson> 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()); diff --git a/tests/cuda/solver_10.cc b/tests/cuda/solver_10.cc index 6530cf9f6b..bce559b8aa 100644 --- a/tests/cuda/solver_10.cc +++ b/tests/cuda/solver_10.cc @@ -108,13 +108,13 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector rw_vector(size); for (unsigned int i = 0; i < size; ++i) rw_vector[i] = static_cast(i); - rhs_dev.import(rw_vector, VectorOperation::insert); + rhs_dev.import_elements(rw_vector, VectorOperation::insert); SolverRelaxation> 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()); diff --git a/tests/cuda/sparse_matrix_01.cc b/tests/cuda/sparse_matrix_01.cc index 2327f9f539..742e976359 100644 --- a/tests/cuda/sparse_matrix_01.cc +++ b/tests/cuda/sparse_matrix_01.cc @@ -119,27 +119,27 @@ test(Utilities::CUDA::Handle &cuda_handle) LinearAlgebra::ReadWriteVector 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 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 diff --git a/tests/lac/parallel_vector_01.cc b/tests/lac/parallel_vector_01.cc index cad97db078..e288f04735 100644 --- a/tests/lac/parallel_vector_01.cc +++ b/tests/lac/parallel_vector_01.cc @@ -51,11 +51,11 @@ test() LinearAlgebra::ReadWriteVector 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; diff --git a/tests/lac/parallel_vector_02.cc b/tests/lac/parallel_vector_02.cc index 79e9922cee..3fbc00a0c6 100644 --- a/tests/lac/parallel_vector_02.cc +++ b/tests/lac/parallel_vector_02.cc @@ -54,27 +54,27 @@ test() LinearAlgebra::ReadWriteVector 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 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 diff --git a/tests/lac/parallel_vector_03.cc b/tests/lac/parallel_vector_03.cc index 33145afb4e..94fed8d6ff 100644 --- a/tests/lac/parallel_vector_03.cc +++ b/tests/lac/parallel_vector_03.cc @@ -54,11 +54,11 @@ test() LinearAlgebra::ReadWriteVector 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 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 diff --git a/tests/lac/parallel_vector_03a.cc b/tests/lac/parallel_vector_03a.cc index 190dc37fc1..3ea94c585a 100644 --- a/tests/lac/parallel_vector_03a.cc +++ b/tests/lac/parallel_vector_03a.cc @@ -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); diff --git a/tests/lac/parallel_vector_04.cc b/tests/lac/parallel_vector_04.cc index 08f2e81776..573dfc86de 100644 --- a/tests/lac/parallel_vector_04.cc +++ b/tests/lac/parallel_vector_04.cc @@ -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()); diff --git a/tests/lac/parallel_vector_05.cc b/tests/lac/parallel_vector_05.cc index 005e4e1c17..bc50d5aff6 100644 --- a/tests/lac/parallel_vector_05.cc +++ b/tests/lac/parallel_vector_05.cc @@ -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()); diff --git a/tests/lac/parallel_vector_06.cc b/tests/lac/parallel_vector_06.cc index 804248706c..e1bddb3457 100644 --- a/tests/lac/parallel_vector_06.cc +++ b/tests/lac/parallel_vector_06.cc @@ -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; diff --git a/tests/lac/parallel_vector_08.cc b/tests/lac/parallel_vector_08.cc index cc7d46af41..001c0d6ec1 100644 --- a/tests/lac/parallel_vector_08.cc +++ b/tests/lac/parallel_vector_08.cc @@ -77,7 +77,7 @@ test() LinearAlgebra::ReadWriteVector 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 v_rw(local_relevant); - v_rw.import(v, VectorOperation::insert); + v_rw.import_elements(v, VectorOperation::insert); LinearAlgebra::ReadWriteVector 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 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()); diff --git a/tests/lac/parallel_vector_10.cc b/tests/lac/parallel_vector_10.cc index 715a646fbd..d50060df8c 100644 --- a/tests/lac/parallel_vector_10.cc +++ b/tests/lac/parallel_vector_10.cc @@ -55,7 +55,7 @@ test() LinearAlgebra::ReadWriteVector 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 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) diff --git a/tests/lac/parallel_vector_11.cc b/tests/lac/parallel_vector_11.cc index df0285c862..b0f6ace5a3 100644 --- a/tests/lac/parallel_vector_11.cc +++ b/tests/lac/parallel_vector_11.cc @@ -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 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()); diff --git a/tests/lac/parallel_vector_12.cc b/tests/lac/parallel_vector_12.cc index 97f83361f8..b25d45ca24 100644 --- a/tests/lac/parallel_vector_12.cc +++ b/tests/lac/parallel_vector_12.cc @@ -90,9 +90,9 @@ test() v1 = 2; // check assignment in initial state LinearAlgebra::ReadWriteVector v0_rw(local_owned0); - v0_rw.import(v0, VectorOperation::insert); + v0_rw.import_elements(v0, VectorOperation::insert); LinearAlgebra::ReadWriteVector 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 v0_ghost_rw(local_relevant0); - v0_ghost_rw.import(v0, VectorOperation::insert); + v0_ghost_rw.import_elements(v0, VectorOperation::insert); LinearAlgebra::ReadWriteVector 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) diff --git a/tests/lac/parallel_vector_13.cc b/tests/lac/parallel_vector_13.cc index 5249faa317..b13e659b04 100644 --- a/tests/lac/parallel_vector_13.cc +++ b/tests/lac/parallel_vector_13.cc @@ -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 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 diff --git a/tests/lac/parallel_vector_14.cc b/tests/lac/parallel_vector_14.cc index 2d568e8cc1..491a6542b3 100644 --- a/tests/lac/parallel_vector_14.cc +++ b/tests/lac/parallel_vector_14.cc @@ -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 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 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 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()); diff --git a/tests/lac/parallel_vector_15.cc b/tests/lac/parallel_vector_15.cc index 4233a9d88f..21b4fbffba 100644 --- a/tests/lac/parallel_vector_15.cc +++ b/tests/lac/parallel_vector_15.cc @@ -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; diff --git a/tests/lac/parallel_vector_21.cc b/tests/lac/parallel_vector_21.cc index 29be8db48e..8b3e2324a2 100644 --- a/tests/lac/parallel_vector_21.cc +++ b/tests/lac/parallel_vector_21.cc @@ -64,7 +64,7 @@ test() LinearAlgebra::ReadWriteVector 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 diff --git a/tests/lac/parallel_vector_23.cc b/tests/lac/parallel_vector_23.cc index 001c650914..b78c4e70c3 100644 --- a/tests/lac/parallel_vector_23.cc +++ b/tests/lac/parallel_vector_23.cc @@ -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 << ":" diff --git a/tests/lac/parallel_vector_25.cc b/tests/lac/parallel_vector_25.cc index 91858b67e8..f56e477ec4 100644 --- a/tests/lac/parallel_vector_25.cc +++ b/tests/lac/parallel_vector_25.cc @@ -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) { diff --git a/tests/mpi/parallel_vector_20.cc b/tests/mpi/parallel_vector_20.cc index 1fb93cf559..624f983964 100644 --- a/tests/mpi/parallel_vector_20.cc +++ b/tests/mpi/parallel_vector_20.cc @@ -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()); diff --git a/tests/mpi/parallel_vector_23.cc b/tests/mpi/parallel_vector_23.cc index 833c8068b6..5c951844e0 100644 --- a/tests/mpi/parallel_vector_23.cc +++ b/tests/mpi/parallel_vector_23.cc @@ -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; diff --git a/tests/mpi/parallel_vector_24.cc b/tests/mpi/parallel_vector_24.cc index c3c4852ba1..4c1b944618 100644 --- a/tests/mpi/parallel_vector_24.cc +++ b/tests/mpi/parallel_vector_24.cc @@ -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. diff --git a/tests/trilinos/epetra_vector_01.cc b/tests/trilinos/epetra_vector_01.cc index 30edf4a50d..3415f7245e 100644 --- a/tests/trilinos/epetra_vector_01.cc +++ b/tests/trilinos/epetra_vector_01.cc @@ -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 *.")); } diff --git a/tests/trilinos/epetra_vector_02.cc b/tests/trilinos/epetra_vector_02.cc index ba6814eb80..f8ab7a34d3 100644 --- a/tests/trilinos/epetra_vector_02.cc +++ b/tests/trilinos/epetra_vector_02.cc @@ -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")); } diff --git a/tests/trilinos/epetra_vector_03.cc b/tests/trilinos/epetra_vector_03.cc index a5cdc6b89a..1fa8d333d3 100644 --- a/tests/trilinos/epetra_vector_03.cc +++ b/tests/trilinos/epetra_vector_03.cc @@ -44,7 +44,7 @@ test() LinearAlgebra::ReadWriteVector 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()); } diff --git a/tests/trilinos/readwritevector.cc b/tests/trilinos/readwritevector.cc index ca8ef4b2d6..9a2fbb487f 100644 --- a/tests/trilinos/readwritevector.cc +++ b/tests/trilinos/readwritevector.cc @@ -55,7 +55,7 @@ test() readwrite_is.add_range(2, 6); readwrite_is.compress(); LinearAlgebra::ReadWriteVector readwrite(readwrite_is); - readwrite.import(tril_vector, VectorOperation::insert); + readwrite.import_elements(tril_vector, VectorOperation::insert); if (rank == 0) { std::vector 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) { diff --git a/tests/trilinos/readwritevector_02.cc b/tests/trilinos/readwritevector_02.cc index 6c5a4995b0..2b82b4fd7e 100644 --- a/tests/trilinos/readwritevector_02.cc +++ b/tests/trilinos/readwritevector_02.cc @@ -72,7 +72,7 @@ test() LinearAlgebra::ReadWriteVector 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 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()); } diff --git a/tests/trilinos/readwritevector_04.cc b/tests/trilinos/readwritevector_04.cc index 301ee163f7..f0b58799a0 100644 --- a/tests/trilinos/readwritevector_04.cc +++ b/tests/trilinos/readwritevector_04.cc @@ -13,7 +13,7 @@ // // --------------------------------------------------------------------- -// test: RWV::import() from TrilinosWrappers::MPI::Vector +// test: RWV::import_elements() from TrilinosWrappers::MPI::Vector #include #include @@ -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()); diff --git a/tests/trilinos/sparse_matrix_vector_12.cc b/tests/trilinos/sparse_matrix_vector_12.cc index d879a90541..91df226107 100644 --- a/tests/trilinos/sparse_matrix_vector_12.cc +++ b/tests/trilinos/sparse_matrix_vector_12.cc @@ -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; diff --git a/tests/trilinos/sparse_matrix_vector_13.cc b/tests/trilinos/sparse_matrix_vector_13.cc index 4a225e3b20..8afb4fab9c 100644 --- a/tests/trilinos/sparse_matrix_vector_13.cc +++ b/tests/trilinos/sparse_matrix_vector_13.cc @@ -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; diff --git a/tests/trilinos/sparse_matrix_vector_14.cc b/tests/trilinos/sparse_matrix_vector_14.cc index a74bd96984..a6983992ce 100644 --- a/tests/trilinos/sparse_matrix_vector_14.cc +++ b/tests/trilinos/sparse_matrix_vector_14.cc @@ -46,13 +46,13 @@ test(LinearAlgebra::TpetraWrappers::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::TpetraWrappers::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; diff --git a/tests/trilinos/sparse_matrix_vector_15.cc b/tests/trilinos/sparse_matrix_vector_15.cc index ba41fce0e7..1110704b47 100644 --- a/tests/trilinos/sparse_matrix_vector_15.cc +++ b/tests/trilinos/sparse_matrix_vector_15.cc @@ -46,13 +46,13 @@ test(LinearAlgebra::TpetraWrappers::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::TpetraWrappers::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; diff --git a/tests/trilinos/subtract_mean_value_04.cc b/tests/trilinos/subtract_mean_value_04.cc index 73dd422bd2..4d5f369105 100644 --- a/tests/trilinos/subtract_mean_value_04.cc +++ b/tests/trilinos/subtract_mean_value_04.cc @@ -66,8 +66,8 @@ main(int argc, char *argv[]) LinearAlgebra::ReadWriteVector 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()); diff --git a/tests/trilinos/tpetra_vector_01.cc b/tests/trilinos/tpetra_vector_01.cc index ed685ca1b1..4071ee2d99 100644 --- a/tests/trilinos/tpetra_vector_01.cc +++ b/tests/trilinos/tpetra_vector_01.cc @@ -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 *.")); } diff --git a/tests/trilinos/tpetra_vector_02.cc b/tests/trilinos/tpetra_vector_02.cc index a7f6f2529f..3cadcbcdba 100644 --- a/tests/trilinos/tpetra_vector_02.cc +++ b/tests/trilinos/tpetra_vector_02.cc @@ -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 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")); } diff --git a/tests/trilinos/tpetra_vector_03.cc b/tests/trilinos/tpetra_vector_03.cc index 46280f41d3..b5b25caf7b 100644 --- a/tests/trilinos/tpetra_vector_03.cc +++ b/tests/trilinos/tpetra_vector_03.cc @@ -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()); }