]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tpetra: Test with MemorySpace::Default 17442/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 6 Aug 2024 18:50:35 +0000 (14:50 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 19 Aug 2024 20:59:51 +0000 (16:59 -0400)
138 files changed:
cmake/configure/configure_20_trilinos.cmake
include/deal.II/dofs/dof_accessor.templates.h
include/deal.II/fe/fe_tools_extrapolate.templates.h
include/deal.II/fe/fe_tools_interpolate.templates.h
include/deal.II/lac/affine_constraints.templates.h
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h
include/deal.II/lac/trilinos_tpetra_vector.templates.h
include/deal.II/multigrid/mg_transfer.h
include/deal.II/numerics/data_out_dof_data.templates.h
include/deal.II/numerics/vector_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools_mean_value.templates.h
source/lac/affine_constraints.cc
source/lac/affine_constraints.inst.in
source/lac/read_write_vector.cc
source/lac/trilinos_sparse_matrix.cc
source/lac/trilinos_tpetra_block_sparse_matrix.cc
source/lac/trilinos_tpetra_block_vector.cc
source/lac/trilinos_tpetra_precondition.cc
source/lac/trilinos_tpetra_solver_direct.cc
source/lac/trilinos_tpetra_sparse_matrix.cc
source/lac/trilinos_tpetra_vector.cc
source/lac/vector.cc
tests/trilinos_tpetra/01.cc
tests/trilinos_tpetra/02.cc
tests/trilinos_tpetra/03a.cc
tests/trilinos_tpetra/04.cc
tests/trilinos_tpetra/05.cc
tests/trilinos_tpetra/08.cc
tests/trilinos_tpetra/09.cc
tests/trilinos_tpetra/10.cc
tests/trilinos_tpetra/11.cc
tests/trilinos_tpetra/12.cc
tests/trilinos_tpetra/13.cc
tests/trilinos_tpetra/14.cc
tests/trilinos_tpetra/15.cc
tests/trilinos_tpetra/16.cc
tests/trilinos_tpetra/17.cc
tests/trilinos_tpetra/18.cc
tests/trilinos_tpetra/19.cc
tests/trilinos_tpetra/20.cc
tests/trilinos_tpetra/21.cc
tests/trilinos_tpetra/22.cc
tests/trilinos_tpetra/23.cc
tests/trilinos_tpetra/24.cc
tests/trilinos_tpetra/27.cc
tests/trilinos_tpetra/28.cc
tests/trilinos_tpetra/29.cc
tests/trilinos_tpetra/30.cc
tests/trilinos_tpetra/31.cc
tests/trilinos_tpetra/32.cc
tests/trilinos_tpetra/34.cc
tests/trilinos_tpetra/35.cc
tests/trilinos_tpetra/36.cc
tests/trilinos_tpetra/37.cc
tests/trilinos_tpetra/39.cc
tests/trilinos_tpetra/40.cc
tests/trilinos_tpetra/42.cc
tests/trilinos_tpetra/45.cc
tests/trilinos_tpetra/46.cc
tests/trilinos_tpetra/49.cc
tests/trilinos_tpetra/51.cc
tests/trilinos_tpetra/52.cc
tests/trilinos_tpetra/53.cc
tests/trilinos_tpetra/54.cc
tests/trilinos_tpetra/55.cc
tests/trilinos_tpetra/56.cc
tests/trilinos_tpetra/57.cc
tests/trilinos_tpetra/62.cc
tests/trilinos_tpetra/63.cc
tests/trilinos_tpetra/64.cc
tests/trilinos_tpetra/66.cc
tests/trilinos_tpetra/67.cc
tests/trilinos_tpetra/68.cc
tests/trilinos_tpetra/69.cc
tests/trilinos_tpetra/add_matrices_06.cc
tests/trilinos_tpetra/deal_solver_01.cc
tests/trilinos_tpetra/deal_solver_01.output
tests/trilinos_tpetra/deal_solver_02.cc
tests/trilinos_tpetra/deal_solver_02.output
tests/trilinos_tpetra/deal_solver_03.cc
tests/trilinos_tpetra/deal_solver_03.output
tests/trilinos_tpetra/deal_solver_04.cc
tests/trilinos_tpetra/deal_solver_04.output
tests/trilinos_tpetra/deal_solver_05.cc
tests/trilinos_tpetra/deal_solver_05.output
tests/trilinos_tpetra/deal_solver_06.cc
tests/trilinos_tpetra/deal_solver_06.output
tests/trilinos_tpetra/direct_solver_01.cc
tests/trilinos_tpetra/direct_solver_02.cc
tests/trilinos_tpetra/index_set_01.cc
tests/trilinos_tpetra/n_nonzeros_01.cc
tests/trilinos_tpetra/n_nonzeros_02.cc
tests/trilinos_tpetra/parallel_sparse_matrix_01.cc
tests/trilinos_tpetra/precondition.cc
tests/trilinos_tpetra/slowness_02.cc
tests/trilinos_tpetra/slowness_03.cc
tests/trilinos_tpetra/slowness_04.cc
tests/trilinos_tpetra/sparse_matrix_02.cc
tests/trilinos_tpetra/sparse_matrix_03.cc
tests/trilinos_tpetra/sparse_matrix_04.cc
tests/trilinos_tpetra/sparse_matrix_copy_from_02.cc
tests/trilinos_tpetra/sparse_matrix_iterator_01.cc
tests/trilinos_tpetra/sparse_matrix_set_01.cc
tests/trilinos_tpetra/sparse_matrix_set_02.cc
tests/trilinos_tpetra/sparse_matrix_vector_01.cc
tests/trilinos_tpetra/sparse_matrix_vector_02.cc
tests/trilinos_tpetra/sparse_matrix_vector_03.cc
tests/trilinos_tpetra/sparse_matrix_vector_04.cc
tests/trilinos_tpetra/sparse_matrix_vector_05.cc
tests/trilinos_tpetra/sparse_matrix_vector_06.cc
tests/trilinos_tpetra/sparse_matrix_vector_07.cc
tests/trilinos_tpetra/sparse_matrix_vector_08.cc
tests/trilinos_tpetra/sparse_matrix_vector_14.cc
tests/trilinos_tpetra/sparse_matrix_vector_15.cc
tests/trilinos_tpetra/tpetra_vector_01.cc
tests/trilinos_tpetra/tpetra_vector_02.cc
tests/trilinos_tpetra/tpetra_vector_03.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_01.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_02.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_03.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_04.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_05.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_06.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_07.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_08.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_09.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_10.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_11.cc
tests/trilinos_tpetra/trilinos_sparse_matrix_iterator_12.cc
tests/trilinos_tpetra/vector_assign_01.cc
tests/trilinos_tpetra/vector_assign_02.cc
tests/trilinos_tpetra/vector_equality_1.cc
tests/trilinos_tpetra/vector_equality_2.cc
tests/trilinos_tpetra/vector_equality_3.cc
tests/trilinos_tpetra/vector_equality_4.cc
tests/trilinos_tpetra/vector_reference_01.cc
tests/trilinos_tpetra/vector_reinit.cc
tests/trilinos_tpetra/vector_swap_01.cc

index 76ef7f10087f7f7aa5a7ac30656ae47878958d91..068dd8c6adde7053ea5bec3a9e6d233eb770d042 100644 (file)
@@ -446,20 +446,28 @@ macro(feature_trilinos_configure_external)
   if(${DEAL_II_TRILINOS_WITH_TPETRA})
     if(_tpetra_inst_double)
       set(DEAL_II_EXPAND_TPETRA_TYPES "double")
-      set(DEAL_II_EXPAND_TPETRA_VECTOR_DOUBLE "LinearAlgebra::TpetraWrappers::Vector<double>")
+      set(DEAL_II_EXPAND_TPETRA_VECTOR_DOUBLE
+        "LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host>"
+        "LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>")
     endif()
 
     if(_tpetra_inst_float)
-      set(DEAL_II_EXPAND_TPETRA_VECTOR_FLOAT "LinearAlgebra::TpetraWrappers::Vector<float>")
+      set(DEAL_II_EXPAND_TPETRA_VECTOR_FLOAT
+        "LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host>"
+        "LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>")
     endif()
 
     if(${DEAL_II_WITH_COMPLEX_NUMBERS})
       if(_tpetra_inst_complex_double)
-        set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_DOUBLE "LinearAlgebra::TpetraWrappers::Vector<std::complex<double>>")
+        set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_DOUBLE
+          "LinearAlgebra::TpetraWrappers::Vector<std::complex<double>, MemorySpace::Host>"
+          "LinearAlgebra::TpetraWrappers::Vector<std::complex<double>, MemorySpace::Default>")
       endif()
 
       if(_tpetra_inst_complex_float)
-        set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_FLOAT "LinearAlgebra::TpetraWrappers::Vector<std::complex<float>>")
+        set(DEAL_II_EXPAND_TPETRA_VECTOR_COMPLEX_FLOAT
+          "LinearAlgebra::TpetraWrappers::Vector<std::complex<float>, MemorySpace::Host>"
+          "LinearAlgebra::TpetraWrappers::Vector<std::complex<float>, MemorySpace::Default>")
       endif()
     endif()
   endif()
index c3afa34c61f0c3191bb88f0796ef1c5f9d3d6229..851b3e1bd43c7584987dd6a9ae485516bdd3710f 100644 (file)
@@ -821,13 +821,14 @@ namespace internal
 
 
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
-      template <typename ForwardIterator, typename Number>
+      template <typename ForwardIterator, typename Number, typename MemorySpace>
       static void
       extract_subvector_to(
-        const LinearAlgebra::TpetraWrappers::Vector<Number> &values,
-        const types::global_dof_index                       *cache_begin,
-        const types::global_dof_index                       *cache_end,
-        ForwardIterator                                      local_values_begin)
+        const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace>
+                                      &values,
+        const types::global_dof_index *cache_begin,
+        const types::global_dof_index *cache_end,
+        ForwardIterator                local_values_begin)
       {
         std::vector<unsigned int> sorted_indices_pos =
           sort_indices(cache_begin, cache_end);
index 6ebcb4dd46a9c0724d28e0e6d81832418441d560..54fd178c79758ee3f6d029633ddf0ca1fb037e6f 100644 (file)
@@ -1516,10 +1516,11 @@ namespace FETools
 
 #  ifdef DEAL_II_WITH_MPI
 #    ifdef DEAL_II_TRILINOS_WITH_TPETRA
-    template <int dim, int spacedim, typename Number>
+    template <int dim, int spacedim, typename Number, typename MemorySpace>
     void
-    reinit_distributed(const DoFHandler<dim, spacedim>               &dh,
-                       LinearAlgebra::TpetraWrappers::Vector<Number> &vector)
+    reinit_distributed(
+      const DoFHandler<dim, spacedim>                            &dh,
+      LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &vector)
     {
       const parallel::distributed::Triangulation<dim, spacedim> *parallel_tria =
         dynamic_cast<
index 2bfc84f00437eb32b7c9d690815e914d81bb8ad5..bfb50b7b1dd8a7216b06f420e18fb57f95b97df8 100644 (file)
@@ -492,17 +492,17 @@ namespace FETools
     }
 
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
-    template <int dim, int spacedim, typename Number>
+    template <int dim, int spacedim, typename Number, typename MemorySpace>
     void
     back_interpolate(
       const DoFHandler<dim, spacedim> &,
-      const AffineConstraints<
-        typename LinearAlgebra::TpetraWrappers::Vector<Number>::value_type> &,
-      const LinearAlgebra::TpetraWrappers::Vector<Number> &,
+      const AffineConstraints<typename LinearAlgebra::TpetraWrappers::
+                                Vector<Number, MemorySpace>::value_type> &,
+      const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &,
       const DoFHandler<dim, spacedim> &,
-      const AffineConstraints<
-        typename LinearAlgebra::TpetraWrappers::Vector<Number>::value_type> &,
-      LinearAlgebra::TpetraWrappers::Vector<Number> &)
+      const AffineConstraints<typename LinearAlgebra::TpetraWrappers::
+                                Vector<Number, MemorySpace>::value_type> &,
+      LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &)
     {
       AssertThrow(false, ExcNotImplemented());
     }
index f0edc5f0daa5aa3c466889abb15da8c12886111b..05880bf333d975336860f06e233935702191e015 100644 (file)
@@ -2819,13 +2819,13 @@ namespace internal
 
 
 #ifdef DEAL_II_TRILINOS_WITH_TPETRA
-  template <typename Number>
+  template <typename Number, typename MemorySpace>
   inline void
   import_vector_with_ghost_elements(
-    const LinearAlgebra::TpetraWrappers::Vector<Number> &vec,
-    const IndexSet                                      &locally_owned_elements,
-    const IndexSet                                      &needed_elements,
-    LinearAlgebra::TpetraWrappers::Vector<Number>       &output,
+    const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &vec,
+    const IndexSet &locally_owned_elements,
+    const IndexSet &needed_elements,
+    LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &output,
     const std::bool_constant<false> /*is_block_vector*/)
   {
     Assert(!vec.has_ghost_elements(), ExcGhostsPresent());
index b12c3f394deb3f18e220dae731bd811192e4db1e..23cae8d196870413a6327f11b1b0d541dc4dec77 100644 (file)
@@ -46,28 +46,37 @@ namespace LinearAlgebra
             Number alpha = Teuchos::ScalarTraits<Number>::one(),
             Number beta  = Teuchos::ScalarTraits<Number>::zero())
       {
-        Assert(&src != &dst,
-               SparseMatrix<double>::ExcSourceEqualsDestination());
+        Assert(
+          &src != &dst,
+          (typename SparseMatrix<double,
+                                 MemorySpace>::ExcSourceEqualsDestination()));
         Assert(M.trilinos_matrix().isFillComplete(),
-               SparseMatrix<double>::ExcMatrixNotCompressed());
+               (typename SparseMatrix<double,
+                                      MemorySpace>::ExcMatrixNotCompressed()));
 
         if (mode == Teuchos::NO_TRANS)
           {
             Assert(src.trilinos_vector().getMap()->isSameAs(
                      *M.trilinos_matrix().getDomainMap()),
-                   SparseMatrix<double>::ExcColMapMismatch());
-            Assert(dst.trilinos_vector().getMap()->isSameAs(
-                     *M.trilinos_matrix().getRangeMap()),
-                   SparseMatrix<double>::ExcDomainMapMismatch());
+                   (typename SparseMatrix<double,
+                                          MemorySpace>::ExcColMapMismatch()));
+            Assert(
+              dst.trilinos_vector().getMap()->isSameAs(
+                *M.trilinos_matrix().getRangeMap()),
+              (typename SparseMatrix<double,
+                                     MemorySpace>::ExcDomainMapMismatch()));
           }
         else
           {
             Assert(dst.trilinos_vector().getMap()->isSameAs(
                      *M.trilinos_matrix().getDomainMap()),
-                   SparseMatrix<double>::ExcColMapMismatch());
-            Assert(src.trilinos_vector().getMap()->isSameAs(
-                     *M.trilinos_matrix().getRangeMap()),
-                   SparseMatrix<double>::ExcDomainMapMismatch());
+                   (typename SparseMatrix<double,
+                                          MemorySpace>::ExcColMapMismatch()));
+            Assert(
+              src.trilinos_vector().getMap()->isSameAs(
+                *M.trilinos_matrix().getRangeMap()),
+              (typename SparseMatrix<double,
+                                     MemorySpace>::ExcDomainMapMismatch()));
           }
 
         M.trilinos_matrix().apply(
@@ -85,10 +94,13 @@ namespace LinearAlgebra
             Number alpha = Teuchos::ScalarTraits<Number>::one(),
             Number beta  = Teuchos::ScalarTraits<Number>::zero())
       {
-        Assert(&src != &dst,
-               SparseMatrix<double>::ExcSourceEqualsDestination());
+        Assert(
+          &src != &dst,
+          (typename SparseMatrix<double,
+                                 MemorySpace>::ExcSourceEqualsDestination()));
         Assert(M.trilinos_matrix().isFillComplete(),
-               SparseMatrix<double>::ExcMatrixNotCompressed());
+               (typename SparseMatrix<double,
+                                      MemorySpace>::ExcMatrixNotCompressed()));
 
         // get the size of the input vectors:
         const size_type dst_local_size = dst.end() - dst.begin();
@@ -189,7 +201,7 @@ namespace LinearAlgebra
         // correct number of indices right from the start
         if (exchange_data)
           {
-            SparsityPattern trilinos_sparsity;
+            SparsityPattern<MemorySpace> trilinos_sparsity;
             trilinos_sparsity.reinit(row_parallel_partitioning,
                                      column_parallel_partitioning,
                                      sparsity_pattern,
@@ -307,7 +319,7 @@ namespace LinearAlgebra
         // correct number of indices right from the start
         if (exchange_data)
           {
-            SparsityPattern trilinos_sparsity;
+            SparsityPattern<MemorySpace> trilinos_sparsity;
             trilinos_sparsity.reinit(row_parallel_partitioning,
                                      column_parallel_partitioning,
                                      sparsity_pattern,
index 98f3a318b83f006f2b9c3a4f12d37d375f02d3e1..acb36e1e973c085f9075f631c2a47709c5c8a4dd 100644 (file)
@@ -1279,7 +1279,7 @@ namespace LinearAlgebra
       source_stored_elements = source_index_set;
 
       tpetra_comm_pattern =
-        Teuchos::rcp(new TpetraWrappers::CommunicationPattern(
+        Teuchos::rcp(new TpetraWrappers::CommunicationPattern<MemorySpace>(
           locally_owned_elements(), source_index_set, mpi_comm));
     }
   } // namespace TpetraWrappers
index d020c8cc613a9c14ab9ea053f2670265d814cde0..7117c973716f62faba71cc46b524ada76bcf8b21 100644 (file)
@@ -121,8 +121,9 @@ namespace internal
 
 #  ifdef DEAL_II_WITH_MPI
 #    ifdef DEAL_II_TRILINOS_WITH_TPETRA
-  template <typename Number>
-  struct MatrixSelector<dealii::LinearAlgebra::TpetraWrappers::Vector<Number>>
+  template <typename Number, typename MemorySpace>
+  struct MatrixSelector<
+    dealii::LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace>>
   {
     using Sparsity = ::dealii::TrilinosWrappers::SparsityPattern;
     using Matrix   = ::dealii::TrilinosWrappers::SparseMatrix;
index 8e22d75b0e77950e73f76880fadd8c3a76b27515..4265f49d1cde495aaec095b838eabbbfff2b28c7 100644 (file)
@@ -847,11 +847,11 @@ namespace internal
 #endif
 
 #ifdef DEAL_II_TRILINOS_WITH_TPETRA
-      template <typename Number>
+      template <typename Number, typename MemorySpace>
       void
       copy_locally_owned_data_from(
-        const LinearAlgebra::TpetraWrappers::Vector<Number> &src,
-        LinearAlgebra::distributed::Vector<Number>          &dst)
+        const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &src,
+        LinearAlgebra::distributed::Vector<Number>                       &dst)
       {
         // ReadWriteVector does not work for ghosted
         // TrilinosWrappers::MPI::Vector objects. Fall back to copy the
index 83a93b42eb44cb2898d8791356608dab1e0bc3f2..21b1dea516ec9d55e40adfa2246221f4213a199d 100644 (file)
@@ -1147,11 +1147,11 @@ namespace VectorTools
 #endif
 
 #ifdef DEAL_II_TRILINOS_WITH_TPETRA
-    template <typename Number>
+    template <typename Number, typename MemorySpace>
     void
     copy_locally_owned_data_from(
-      const LinearAlgebra::TpetraWrappers::Vector<Number> &src,
-      LinearAlgebra::distributed::Vector<Number>          &dst)
+      const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &src,
+      LinearAlgebra::distributed::Vector<Number>                       &dst)
     {
       // ReadWriteVector does not work for ghosted
       // TrilinosWrappers::MPI::Vector objects. Fall back to copy the
index a87c1c3d5259fbaa1e74325f8fe4f1efefdeb9a4..2005fd05c803d06ba6e2d3dc3c7f66d76c20b83a 100644 (file)
@@ -273,9 +273,9 @@ namespace VectorTools
 
 
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
-  template <int dim, int spacedim, typename ValueType>
+  template <int dim, int spacedim, typename ValueType, typename MemorySpace>
   void
-  add_constant(LinearAlgebra::TpetraWrappers::Vector<ValueType> &,
+  add_constant(LinearAlgebra::TpetraWrappers::Vector<ValueType, MemorySpace> &,
                const DoFHandler<dim, spacedim> &,
                const unsigned int,
                const ValueType)
index 99483b5cc70178d029a509f5850d9d7ac09ca2d8..e051e03b8337931b2f8c55b2b21d1df27ee477ac 100644 (file)
@@ -143,8 +143,14 @@ INSTANTIATE_DLTG_MATRIX(TrilinosWrappers::BlockSparseMatrix);
 // FIXME: This mixed variant is needed for multigrid and matrix free.
 template void
 dealii::AffineConstraints<double>::distribute<
-  dealii::LinearAlgebra::TpetraWrappers::Vector<float>>(
-  dealii::LinearAlgebra::TpetraWrappers::Vector<float> &) const;
+  dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host>>(
+  dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &)
+  const;
+template void
+dealii::AffineConstraints<double>::distribute<
+  dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>>(
+  dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default> &)
+  const;
 #    endif
 #  endif
 #endif
index a40947ebeb5b28df2357b61f4339719d09b32b9a..bffe8f17bc9c11f3d173b9b7541f6707e784ebf1 100644 (file)
@@ -246,53 +246,110 @@ for (S : REAL_AND_COMPLEX_SCALARS)
 for (S : TRILINOS_SCALARS)
   {
     template void AffineConstraints<S>::distribute_local_to_global<
-      LinearAlgebra::TpetraWrappers::SparseMatrix<S>,
-      LinearAlgebra::TpetraWrappers::Vector<S>>(
+      LinearAlgebra::TpetraWrappers::SparseMatrix<S, MemorySpace::Host>,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Host>>(
       const FullMatrix<S> &,
       const Vector<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
-      LinearAlgebra::TpetraWrappers::SparseMatrix<S> &,
-      LinearAlgebra::TpetraWrappers::Vector<S> &,
+      LinearAlgebra::TpetraWrappers::SparseMatrix<S, MemorySpace::Host> &,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Host> &,
       bool,
       std::integral_constant<bool, false>) const;
 
     // BlockSparseMatrix
     template void AffineConstraints<S>::distribute_local_to_global<
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S>,
-      LinearAlgebra::TpetraWrappers::Vector<S>>(
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host>,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Host>>(
       const FullMatrix<S> &,
       const Vector<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S> &,
-      LinearAlgebra::TpetraWrappers::Vector<S> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host> &,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Host> &,
       bool,
       std::bool_constant<true>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S>,
-      LinearAlgebra::TpetraWrappers::BlockVector<S>>(
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host>,
+      LinearAlgebra::TpetraWrappers::BlockVector<S, MemorySpace::Host>>(
       const FullMatrix<S> &,
       const Vector<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S> &,
-      LinearAlgebra::TpetraWrappers::BlockVector<S> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host> &,
+      LinearAlgebra::TpetraWrappers::BlockVector<S, MemorySpace::Host> &,
       bool,
       std::bool_constant<true>) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S>>(
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host>>(
       const FullMatrix<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
       const std::vector<AffineConstraints<S>::size_type> &,
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S> &) const;
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host> &)
+      const;
+
+    template void AffineConstraints<S>::distribute_local_to_global<
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host>>(
+      const FullMatrix<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      const AffineConstraints<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Host> &)
+      const;
+
+    template void AffineConstraints<S>::distribute_local_to_global<
+      LinearAlgebra::TpetraWrappers::SparseMatrix<S, MemorySpace::Default>,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Default>>(
+      const FullMatrix<S> &,
+      const Vector<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      LinearAlgebra::TpetraWrappers::SparseMatrix<S, MemorySpace::Default> &,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Default> &,
+      bool,
+      std::integral_constant<bool, false>) const;
+
+    // BlockSparseMatrix
+    template void AffineConstraints<S>::distribute_local_to_global<
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Default>>(
+      const FullMatrix<S> &,
+      const Vector<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>
+        &,
+      LinearAlgebra::TpetraWrappers::Vector<S, MemorySpace::Default> &,
+      bool,
+      std::bool_constant<true>) const;
+
+    template void AffineConstraints<S>::distribute_local_to_global<
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>,
+      LinearAlgebra::TpetraWrappers::BlockVector<S, MemorySpace::Default>>(
+      const FullMatrix<S> &,
+      const Vector<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>
+        &,
+      LinearAlgebra::TpetraWrappers::BlockVector<S, MemorySpace::Default> &,
+      bool,
+      std::bool_constant<true>) const;
+
+    template void AffineConstraints<S>::distribute_local_to_global<
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S,
+                                                       MemorySpace::Default>>(
+      const FullMatrix<S> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      const std::vector<AffineConstraints<S>::size_type> &,
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>
+        &) const;
 
     template void AffineConstraints<S>::distribute_local_to_global<
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S>>(
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S,
+                                                       MemorySpace::Default>>(
       const FullMatrix<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
       const AffineConstraints<S> &,
       const std::vector<AffineConstraints<S>::size_type> &,
-      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S> &) const;
+      LinearAlgebra::TpetraWrappers::BlockSparseMatrix<S, MemorySpace::Default>
+        &) const;
   }
 
 
index 508789b343d2942e49788a968c84fc6d44ba9b6a..a46256e69326738332369eb019ab6b5618addc8e 100644 (file)
@@ -82,14 +82,24 @@ namespace LinearAlgebra
 #  ifdef HAVE_TPETRA_INST_FLOAT
   template void
   ReadWriteVector<float>::import_elements(
-    const LinearAlgebra::TpetraWrappers::Vector<float> &,
+    const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &,
+    VectorOperation::values,
+    const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
+  template void
+  ReadWriteVector<float>::import_elements(
+    const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #  endif
 #  ifdef HAVE_TPETRA_INST_DOUBLE
   template void
   ReadWriteVector<double>::import_elements(
-    const LinearAlgebra::TpetraWrappers::Vector<double> &,
+    const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &,
+    VectorOperation::values,
+    const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
+  template void
+  ReadWriteVector<double>::import_elements(
+    const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #  endif
@@ -97,14 +107,28 @@ namespace LinearAlgebra
 #    ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
   template void
   ReadWriteVector<std::complex<float>>::import_elements(
-    const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>> &,
+    const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                                MemorySpace::Host> &,
+    VectorOperation::values,
+    const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
+  template void
+  ReadWriteVector<std::complex<float>>::import_elements(
+    const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                                MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #    endif
 #    ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
   template void
   ReadWriteVector<std::complex<double>>::import_elements(
-    const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>> &,
+    const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                                MemorySpace::Host> &,
+    VectorOperation::values,
+    const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
+  template void
+  ReadWriteVector<std::complex<double>>::import_elements(
+    const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                                MemorySpace::Default> &,
     VectorOperation::values,
     const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase> &);
 #    endif
index 99bd58cb91bb24dc5b9a64070e4c60be9c773c64..20f6029a40df8c6976de31ab88d02876c13eeac9 100644 (file)
@@ -102,31 +102,31 @@ namespace TrilinosWrappers
     }
 
 #  ifdef DEAL_II_TRILINOS_WITH_TPETRA
-    template <typename Number>
+    template <typename Number, typename MemorySpace>
     Number *
-    begin(LinearAlgebra::TpetraWrappers::Vector<Number> &V)
+    begin(LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &V)
     {
       return V.trilinos_vector().getDataNonConst().get();
     }
 
-    template <typename Number>
+    template <typename Number, typename MemorySpace>
     const Number *
-    begin(const LinearAlgebra::TpetraWrappers::Vector<Number> &V)
+    begin(const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &V)
     {
       return V.trilinos_vector().getData().get();
     }
 
-    template <typename Number>
+    template <typename Number, typename MemorySpace>
     Number *
-    end(LinearAlgebra::TpetraWrappers::Vector<Number> &V)
+    end(LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &V)
     {
       return V.trilinos_vector().getDataNonConst().get() +
              V.trilinos_vector().getLocalLength();
     }
 
-    template <typename Number>
+    template <typename Number, typename MemorySpace>
     const Number *
-    end(const LinearAlgebra::TpetraWrappers::Vector<Number> &V)
+    end(const LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace> &V)
     {
       return V.trilinos_vector().getData().get() +
              V.trilinos_vector().getLocalLength();
@@ -3049,15 +3049,33 @@ namespace TrilinosWrappers
 #      if defined(HAVE_TPETRA_INST_DOUBLE)
   template void
   SparseMatrix::vmult(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<double> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<double> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::vmult(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 
 #      if defined(HAVE_TPETRA_INST_FLOAT)
   template void
   SparseMatrix::vmult(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<float> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<float> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::vmult(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 #    endif
 
@@ -3082,15 +3100,33 @@ namespace TrilinosWrappers
 #      if defined(HAVE_TPETRA_INST_DOUBLE)
   template void
   SparseMatrix::Tvmult(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<double> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<double> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::Tvmult(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 
 #      if defined(HAVE_TPETRA_INST_FLOAT)
   template void
   SparseMatrix::Tvmult(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<float> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<float> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::Tvmult(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 #    endif
 
@@ -3115,15 +3151,33 @@ namespace TrilinosWrappers
 #      if defined(HAVE_TPETRA_INST_DOUBLE)
   template void
   SparseMatrix::vmult_add(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<double> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<double> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::vmult_add(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 
 #      if defined(HAVE_TPETRA_INST_FLOAT)
   template void
   SparseMatrix::vmult_add(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<float> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<float> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::vmult_add(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 #    endif
 
@@ -3148,15 +3202,33 @@ namespace TrilinosWrappers
 #      if defined(HAVE_TPETRA_INST_DOUBLE)
   template void
   SparseMatrix::Tvmult_add(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<double> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<double> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::Tvmult_add(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<double,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 
 #      if defined(HAVE_TPETRA_INST_FLOAT)
   template void
   SparseMatrix::Tvmult_add(
-    dealii::LinearAlgebra::TpetraWrappers::Vector<float> &,
-    const dealii::LinearAlgebra::TpetraWrappers::Vector<float> &) const;
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Host> &)
+    const;
+  template void
+  SparseMatrix::Tvmult_add(
+    dealii::LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default>
+      &,
+    const dealii::LinearAlgebra::TpetraWrappers::Vector<float,
+                                                        MemorySpace::Default> &)
+    const;
 #      endif
 #    endif
 
index e41ad48a61b771d733e08c1531f0c01addad5993..a51c197ce96df43d8dcb45ce0d28653c60eaf261 100644 (file)
@@ -26,31 +26,31 @@ namespace LinearAlgebra
 {
   namespace TpetraWrappers
   {
-    template class BlockSparseMatrix<double>;
+    template class BlockSparseMatrix<double, MemorySpace::Host>;
 
     template void
-    BlockSparseMatrix<double>::reinit(
+    BlockSparseMatrix<double, MemorySpace::Host>::reinit(
       const ::dealii::BlockDynamicSparsityPattern &);
 
     template void
-    BlockSparseMatrix<double>::vmult(
-      TpetraWrappers::Vector<double> &,
-      const TpetraWrappers::Vector<double> &) const;
+    BlockSparseMatrix<double, MemorySpace::Host>::vmult(
+      TpetraWrappers::Vector<double, MemorySpace::Host> &,
+      const TpetraWrappers::Vector<double, MemorySpace::Host> &) const;
 
     template void
-    BlockSparseMatrix<double>::Tvmult(
-      TpetraWrappers::Vector<double> &,
-      const TpetraWrappers::Vector<double> &) const;
+    BlockSparseMatrix<double, MemorySpace::Host>::Tvmult(
+      TpetraWrappers::Vector<double, MemorySpace::Host> &,
+      const TpetraWrappers::Vector<double, MemorySpace::Host> &) const;
 
     template void
-    BlockSparseMatrix<double>::vmult(
-      TpetraWrappers::BlockVector<double> &,
-      const TpetraWrappers::BlockVector<double> &) const;
+    BlockSparseMatrix<double, MemorySpace::Host>::vmult(
+      TpetraWrappers::BlockVector<double, MemorySpace::Host> &,
+      const TpetraWrappers::BlockVector<double, MemorySpace::Host> &) const;
 
     template void
-    BlockSparseMatrix<double>::Tvmult(
-      TpetraWrappers::BlockVector<double> &,
-      const TpetraWrappers::BlockVector<double> &) const;
+    BlockSparseMatrix<double, MemorySpace::Host>::Tvmult(
+      TpetraWrappers::BlockVector<double, MemorySpace::Host> &,
+      const TpetraWrappers::BlockVector<double, MemorySpace::Host> &) const;
   } // namespace TpetraWrappers
 } // namespace LinearAlgebra
 #  endif // DOXYGEN
index 673c61b5909ab21d5de9e53ab1b8a2a00c079b78..d1a114203aca01efe1828652148ed960bf5f4126 100644 (file)
@@ -32,30 +32,44 @@ namespace LinearAlgebra
 
 #  ifdef HAVE_TPETRA_INST_FLOAT
 #    ifdef DEAL_II_HAVE_CXX20
-    static_assert(concepts::is_vector_space_vector<BlockVector<float>>);
+    static_assert(
+      concepts::is_vector_space_vector<BlockVector<float, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<float, MemorySpace::Default>>);
 #    endif
-    template class BlockVector<float>;
+    template class BlockVector<float, MemorySpace::Host>;
+    template class BlockVector<float, MemorySpace::Default>;
 #  endif
 #  ifdef HAVE_TPETRA_INST_DOUBLE
 #    ifdef DEAL_II_HAVE_CXX20
-    static_assert(concepts::is_vector_space_vector<BlockVector<double>>);
+    static_assert(
+      concepts::is_vector_space_vector<BlockVector<double, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<double, MemorySpace::Default>>);
 #    endif
-    template class BlockVector<double>;
+    template class BlockVector<double, MemorySpace::Host>;
+    template class BlockVector<double, MemorySpace::Default>;
 #  endif
 #  ifdef DEAL_II_WITH_COMPLEX_VALUES
 #    ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
 #      ifdef DEAL_II_HAVE_CXX20
-    static_assert(
-      concepts::is_vector_space_vector<BlockVector<std::complex<float>>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<std::complex<float>, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<std::complex<float>, MemorySpace::Default>>);
 #      endif
-    template class BlockVector<std::complex<float>>;
+    template class BlockVector<std::complex<float>, MemorySpace::Host>;
+    template class BlockVector<std::complex<float>, MemorySpace::Default>;
 #    endif
 #    ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
 #      ifdef DEAL_II_HAVE_CXX20
-    static_assert(
-      concepts::is_vector_space_vector<BlockVector<std::complex<double>>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<std::complex<double>, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  BlockVector<std::complex<double>, MemorySpace::Default>>);
 #      endif
-    template class BlockVector<std::complex<double>>;
+    template class BlockVector<std::complex<double>, MemorySpace::Host>;
+    template class BlockVector<std::complex<double>, MemorySpace::Default>;
 #    endif
 #  endif
   } // namespace TpetraWrappers
index 21f7ee2562747aaf78c2a07dae25fb519924aa72..0f8d3f77ee28527661fd18b71ea2b6be00f55706 100644 (file)
@@ -27,74 +27,171 @@ namespace LinearAlgebra
   namespace TpetraWrappers
   {
 #      ifdef HAVE_TPETRA_INST_FLOAT
-    template class PreconditionBase<float>;
-    template class PreconditionIdentity<float>;
-    template class PreconditionIfpackBase<float>;
-    template class PreconditionIfpack<float>;
-    template class PreconditionJacobi<float>;
-    template class PreconditionL1Jacobi<float>;
-    template class PreconditionL1GaussSeidel<float>;
-    template class PreconditionSOR<float>;
-    template class PreconditionSSOR<float>;
-    template class PreconditionBlockJacobi<float>;
-    template class PreconditionBlockSOR<float>;
-    template class PreconditionBlockSSOR<float>;
-    template class PreconditionChebyshev<float>;
-    template class PreconditionILU<float>;
-    template class PreconditionILUT<float>;
+    template class PreconditionBase<float, MemorySpace::Host>;
+    template class PreconditionIdentity<float, MemorySpace::Host>;
+    template class PreconditionIfpackBase<float, MemorySpace::Host>;
+    template class PreconditionIfpack<float, MemorySpace::Host>;
+    template class PreconditionJacobi<float, MemorySpace::Host>;
+    template class PreconditionL1Jacobi<float, MemorySpace::Host>;
+    template class PreconditionL1GaussSeidel<float, MemorySpace::Host>;
+    template class PreconditionSOR<float, MemorySpace::Host>;
+    template class PreconditionSSOR<float, MemorySpace::Host>;
+    template class PreconditionBlockJacobi<float, MemorySpace::Host>;
+    template class PreconditionBlockSOR<float, MemorySpace::Host>;
+    template class PreconditionBlockSSOR<float, MemorySpace::Host>;
+    template class PreconditionChebyshev<float, MemorySpace::Host>;
+    template class PreconditionILU<float, MemorySpace::Host>;
+    template class PreconditionILUT<float, MemorySpace::Host>;
+
+    template class PreconditionBase<float, MemorySpace::Default>;
+    template class PreconditionIdentity<float, MemorySpace::Default>;
+    template class PreconditionIfpackBase<float, MemorySpace::Default>;
+    template class PreconditionIfpack<float, MemorySpace::Default>;
+    template class PreconditionJacobi<float, MemorySpace::Default>;
+    template class PreconditionL1Jacobi<float, MemorySpace::Default>;
+    template class PreconditionL1GaussSeidel<float, MemorySpace::Default>;
+    template class PreconditionSOR<float, MemorySpace::Default>;
+    template class PreconditionSSOR<float, MemorySpace::Default>;
+    template class PreconditionBlockJacobi<float, MemorySpace::Default>;
+    template class PreconditionBlockSOR<float, MemorySpace::Default>;
+    template class PreconditionBlockSSOR<float, MemorySpace::Default>;
+    template class PreconditionChebyshev<float, MemorySpace::Default>;
+    template class PreconditionILU<float, MemorySpace::Default>;
+    template class PreconditionILUT<float, MemorySpace::Default>;
 #      endif
 
 #      ifdef HAVE_TPETRA_INST_DOUBLE
-    template class PreconditionBase<double>;
-    template class PreconditionIdentity<double>;
-    template class PreconditionIfpackBase<double>;
-    template class PreconditionIfpack<double>;
-    template class PreconditionJacobi<double>;
-    template class PreconditionL1Jacobi<double>;
-    template class PreconditionL1GaussSeidel<double>;
-    template class PreconditionSOR<double>;
-    template class PreconditionSSOR<double>;
-    template class PreconditionBlockJacobi<double>;
-    template class PreconditionBlockSOR<double>;
-    template class PreconditionBlockSSOR<double>;
-    template class PreconditionChebyshev<double>;
-    template class PreconditionILU<double>;
-    template class PreconditionILUT<double>;
+    template class PreconditionBase<double, MemorySpace::Host>;
+    template class PreconditionIdentity<double, MemorySpace::Host>;
+    template class PreconditionIfpackBase<double, MemorySpace::Host>;
+    template class PreconditionIfpack<double, MemorySpace::Host>;
+    template class PreconditionJacobi<double, MemorySpace::Host>;
+    template class PreconditionL1Jacobi<double, MemorySpace::Host>;
+    template class PreconditionL1GaussSeidel<double, MemorySpace::Host>;
+    template class PreconditionSOR<double, MemorySpace::Host>;
+    template class PreconditionSSOR<double, MemorySpace::Host>;
+    template class PreconditionBlockJacobi<double, MemorySpace::Host>;
+    template class PreconditionBlockSOR<double, MemorySpace::Host>;
+    template class PreconditionBlockSSOR<double, MemorySpace::Host>;
+    template class PreconditionChebyshev<double, MemorySpace::Host>;
+    template class PreconditionILU<double, MemorySpace::Host>;
+    template class PreconditionILUT<double, MemorySpace::Host>;
+
+    template class PreconditionBase<double, MemorySpace::Default>;
+    template class PreconditionIdentity<double, MemorySpace::Default>;
+    template class PreconditionIfpackBase<double, MemorySpace::Default>;
+    template class PreconditionIfpack<double, MemorySpace::Default>;
+    template class PreconditionJacobi<double, MemorySpace::Default>;
+    template class PreconditionL1Jacobi<double, MemorySpace::Default>;
+    template class PreconditionL1GaussSeidel<double, MemorySpace::Default>;
+    template class PreconditionSOR<double, MemorySpace::Default>;
+    template class PreconditionSSOR<double, MemorySpace::Default>;
+    template class PreconditionBlockJacobi<double, MemorySpace::Default>;
+    template class PreconditionBlockSOR<double, MemorySpace::Default>;
+    template class PreconditionBlockSSOR<double, MemorySpace::Default>;
+    template class PreconditionChebyshev<double, MemorySpace::Default>;
+    template class PreconditionILU<double, MemorySpace::Default>;
+    template class PreconditionILUT<double, MemorySpace::Default>;
 #      endif
 #      ifdef DEAL_II_WITH_COMPLEX_VALUES
 #        ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
-    template class PreconditionBase<std::complex<float>>;
-    template class PreconditionIdentity<std::complex<float>>;
-    template class PreconditionIfpackBase<std::complex<float>>;
-    template class PreconditionIfpack<std::complex<float>>;
-    template class PreconditionJacobi<std::complex<float>>;
-    template class PreconditionL1Jacobi<std::complex<float>>;
-    template class PreconditionL1GaussSeidel<std::complex<float>>;
-    template class PreconditionSOR<std::complex<float>>;
-    template class PreconditionSSOR<std::complex<float>>;
-    template class PreconditionBlockJacobi<std::complex<float>>;
-    template class PreconditionBlockSOR<std::complex<float>>;
-    template class PreconditionBlockSSOR<std::complex<float>>;
-    template class PreconditionChebyshev<std::complex<float>>;
-    template class PreconditionILU<std::complex<float>>;
-    template class PreconditionILUT<std::complex<float>>;
+    template class PreconditionBase<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionIdentity<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionIfpackBase<std::complex<float>,
+                                          MemorySpace::Host>;
+    template class PreconditionIfpack<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionJacobi<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionL1Jacobi<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionL1GaussSeidel<std::complex<float>,
+                                             MemorySpace::Host>;
+    template class PreconditionSOR<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionSSOR<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionBlockJacobi<std::complex<float>,
+                                           MemorySpace::Host>;
+    template class PreconditionBlockSOR<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionBlockSSOR<std::complex<float>,
+                                         MemorySpace::Host>;
+    template class PreconditionChebyshev<std::complex<float>,
+                                         MemorySpace::Host>;
+    template class PreconditionILU<std::complex<float>, MemorySpace::Host>;
+    template class PreconditionILUT<std::complex<float>, MemorySpace::Host>;
+
+    template class PreconditionBase<std::complex<float>, MemorySpace::Default>;
+    template class PreconditionIdentity<std::complex<float>,
+                                        MemorySpace::Default>;
+    template class PreconditionIfpackBase<std::complex<float>,
+                                          MemorySpace::Default>;
+    template class PreconditionIfpack<std::complex<float>,
+                                      MemorySpace::Default>;
+    template class PreconditionJacobi<std::complex<float>,
+                                      MemorySpace::Default>;
+    template class PreconditionL1Jacobi<std::complex<float>,
+                                        MemorySpace::Default>;
+    template class PreconditionL1GaussSeidel<std::complex<float>,
+                                             MemorySpace::Default>;
+    template class PreconditionSOR<std::complex<float>, MemorySpace::Default>;
+    template class PreconditionSSOR<std::complex<float>, MemorySpace::Default>;
+    template class PreconditionBlockJacobi<std::complex<float>,
+                                           MemorySpace::Default>;
+    template class PreconditionBlockSOR<std::complex<float>,
+                                        MemorySpace::Default>;
+    template class PreconditionBlockSSOR<std::complex<float>,
+                                         MemorySpace::Default>;
+    template class PreconditionChebyshev<std::complex<float>,
+                                         MemorySpace::Default>;
+    template class PreconditionILU<std::complex<float>, MemorySpace::Default>;
+    template class PreconditionILUT<std::complex<float>, MemorySpace::Default>;
 #        endif
 #        ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
-    template class PreconditionBase<std::complex<double>>;
-    template class PreconditionIdentity<std::complex<double>>;
-    template class PreconditionIfpackBase<std::complex<double>>;
-    template class PreconditionIfpack<std::complex<double>>;
-    template class PreconditionJacobi<std::complex<double>>;
-    template class PreconditionL1Jacobi<std::complex<double>>;
-    template class PreconditionL1GaussSeidel<std::complex<double>>;
-    template class PreconditionSOR<std::complex<double>>;
-    template class PreconditionSSOR<std::complex<double>>;
-    template class PreconditionBlockJacobi<std::complex<double>>;
-    template class PreconditionBlockSOR<std::complex<double>>;
-    template class PreconditionBlockSSOR<std::complex<double>>;
-    template class PreconditionChebyshev<std::complex<double>>;
-    template class PreconditionILU<std::complex<double>>;
-    template class PreconditionILUT<std::complex<double>>;
+    template class PreconditionBase<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionIdentity<std::complex<double>,
+                                        MemorySpace::Host>;
+    template class PreconditionIfpackBase<std::complex<double>,
+                                          MemorySpace::Host>;
+    template class PreconditionIfpack<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionJacobi<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionL1Jacobi<std::complex<double>,
+                                        MemorySpace::Host>;
+    template class PreconditionL1GaussSeidel<std::complex<double>,
+                                             MemorySpace::Host>;
+    template class PreconditionSOR<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionSSOR<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionBlockJacobi<std::complex<double>,
+                                           MemorySpace::Host>;
+    template class PreconditionBlockSOR<std::complex<double>,
+                                        MemorySpace::Host>;
+    template class PreconditionBlockSSOR<std::complex<double>,
+                                         MemorySpace::Host>;
+    template class PreconditionChebyshev<std::complex<double>,
+                                         MemorySpace::Host>;
+    template class PreconditionILU<std::complex<double>, MemorySpace::Host>;
+    template class PreconditionILUT<std::complex<double>, MemorySpace::Host>;
+
+    template class PreconditionBase<std::complex<double>, MemorySpace::Default>;
+    template class PreconditionIdentity<std::complex<double>,
+                                        MemorySpace::Default>;
+    template class PreconditionIfpackBase<std::complex<double>,
+                                          MemorySpace::Default>;
+    template class PreconditionIfpack<std::complex<double>,
+                                      MemorySpace::Default>;
+    template class PreconditionJacobi<std::complex<double>,
+                                      MemorySpace::Default>;
+    template class PreconditionL1Jacobi<std::complex<double>,
+                                        MemorySpace::Default>;
+    template class PreconditionL1GaussSeidel<std::complex<double>,
+                                             MemorySpace::Default>;
+    template class PreconditionSOR<std::complex<double>, MemorySpace::Default>;
+    template class PreconditionSSOR<std::complex<double>, MemorySpace::Default>;
+    template class PreconditionBlockJacobi<std::complex<double>,
+                                           MemorySpace::Default>;
+    template class PreconditionBlockSOR<std::complex<double>,
+                                        MemorySpace::Default>;
+    template class PreconditionBlockSSOR<std::complex<double>,
+                                         MemorySpace::Default>;
+    template class PreconditionChebyshev<std::complex<double>,
+                                         MemorySpace::Default>;
+    template class PreconditionILU<std::complex<double>, MemorySpace::Default>;
+    template class PreconditionILUT<std::complex<double>, MemorySpace::Default>;
 #        endif
 #      endif
 
index 095ef21a60bc06c5f05cc1cf7c281015742caf94..97a201a496eb081523973d4e913f23f907540c53 100644 (file)
@@ -26,26 +26,42 @@ namespace LinearAlgebra
   namespace TpetraWrappers
   {
 #      ifdef HAVE_TPETRA_INST_FLOAT
-    template class SolverDirectBase<float>;
-    template class SolverDirect<float>;
-    template class SolverDirectKLU2<float>;
+    template class SolverDirectBase<float, MemorySpace::Host>;
+    template class SolverDirect<float, MemorySpace::Host>;
+    template class SolverDirectKLU2<float, MemorySpace::Host>;
+
+    template class SolverDirectBase<float, MemorySpace::Default>;
+    template class SolverDirect<float, MemorySpace::Default>;
+    template class SolverDirectKLU2<float, MemorySpace::Default>;
 #      endif
 
 #      ifdef HAVE_TPETRA_INST_DOUBLE
-    template class SolverDirectBase<double>;
-    template class SolverDirect<double>;
-    template class SolverDirectKLU2<double>;
+    template class SolverDirectBase<double, MemorySpace::Host>;
+    template class SolverDirect<double, MemorySpace::Host>;
+    template class SolverDirectKLU2<double, MemorySpace::Host>;
+
+    template class SolverDirectBase<double, MemorySpace::Default>;
+    template class SolverDirect<double, MemorySpace::Default>;
+    template class SolverDirectKLU2<double, MemorySpace::Default>;
 #      endif
 #      ifdef DEAL_II_WITH_COMPLEX_VALUES
 #        ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
-    template class SolverDirectBase<std::complex<float>>;
-    template class SolverDirect<std::complex<float>>;
-    template class SolverDirectKLU2<std::complex<float>>;
+    template class SolverDirectBase<std::complex<float>, MemorySpace::Host>;
+    template class SolverDirect<std::complex<float>, MemorySpace::Host>;
+    template class SolverDirectKLU2<std::complex<float>, MemorySpace::Host>;
+
+    template class SolverDirectBase<std::complex<float>, MemorySpace::Default>;
+    template class SolverDirect<std::complex<float>, MemorySpace::Default>;
+    template class SolverDirectKLU2<std::complex<float>, MemorySpace::Default>;
 #        endif
 #        ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
-    template class SolverDirectBase<std::complex<double>>;
-    template class SolverDirect<std::complex<double>>;
-    template class SolverDirectKLU2<std::complex<double>>;
+    template class SolverDirectBase<std::complex<double>, MemorySpace::Host>;
+    template class SolverDirect<std::complex<double>, MemorySpace::Host>;
+    template class SolverDirectKLU2<std::complex<double>, MemorySpace::Host>;
+
+    template class SolverDirectBase<std::complex<double>, MemorySpace::Default>;
+    template class SolverDirect<std::complex<double>, MemorySpace::Default>;
+    template class SolverDirectKLU2<std::complex<double>, MemorySpace::Default>;
 #        endif
 #      endif
 
index 3cc43d6226cd7e7973a8a724a526d12f01611e79..61f113372de1a9b13cd7f3d7f73b3a0e7b3d6f84 100644 (file)
@@ -26,17 +26,17 @@ namespace LinearAlgebra
 {
   namespace TpetraWrappers
   {
-    template class SparseMatrix<double>;
+    template class SparseMatrix<double, MemorySpace::Host>;
 
     template void
-    SparseMatrix<double>::reinit(
+    SparseMatrix<double, MemorySpace::Host>::reinit(
       const IndexSet                       &parallel_partitioning,
       const dealii::DynamicSparsityPattern &sparsity_pattern,
       const MPI_Comm                        communicator,
       const bool                            exchange_data);
 
     template void
-    SparseMatrix<double>::reinit(
+    SparseMatrix<double, MemorySpace::Host>::reinit(
       const IndexSet                       &row_parallel_partitioning,
       const IndexSet                       &col_parallel_partitioning,
       const dealii::DynamicSparsityPattern &sparsity_pattern,
@@ -44,39 +44,109 @@ namespace LinearAlgebra
       const bool                            exchange_data);
 
     template void
-    SparseMatrix<double>::reinit(const dealii::DynamicSparsityPattern &);
+    SparseMatrix<double, MemorySpace::Host>::reinit(
+      const dealii::DynamicSparsityPattern &);
 
     template void
-    SparseMatrix<double>::vmult(Vector<double>       &dst,
-                                const Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::vmult(
+      Vector<double, MemorySpace::Host>       &dst,
+      const Vector<double, MemorySpace::Host> &src) const;
 
     template void
-    SparseMatrix<double>::Tvmult(Vector<double>       &dst,
-                                 const Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::Tvmult(
+      Vector<double, MemorySpace::Host>       &dst,
+      const Vector<double, MemorySpace::Host> &src) const;
 
     template void
-    SparseMatrix<double>::vmult_add(Vector<double>       &dst,
-                                    const Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::vmult_add(
+      Vector<double, MemorySpace::Host>       &dst,
+      const Vector<double, MemorySpace::Host> &src) const;
 
     template void
-    SparseMatrix<double>::Tvmult_add(Vector<double>       &dst,
-                                     const Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::Tvmult_add(
+      Vector<double, MemorySpace::Host>       &dst,
+      const Vector<double, MemorySpace::Host> &src) const;
 
     template void
-    SparseMatrix<double>::vmult(::dealii::Vector<double>       &dst,
-                                const ::dealii::Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::vmult(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
 
     template void
-    SparseMatrix<double>::Tvmult(::dealii::Vector<double>       &dst,
-                                 const ::dealii::Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::Tvmult(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
 
     template void
-    SparseMatrix<double>::vmult_add(::dealii::Vector<double>       &dst,
-                                    const ::dealii::Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::vmult_add(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
 
     template void
-    SparseMatrix<double>::Tvmult_add(::dealii::Vector<double>       &dst,
-                                     const ::dealii::Vector<double> &src) const;
+    SparseMatrix<double, MemorySpace::Host>::Tvmult_add(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
+
+    template class SparseMatrix<double, MemorySpace::Default>;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::reinit(
+      const IndexSet                       &parallel_partitioning,
+      const dealii::DynamicSparsityPattern &sparsity_pattern,
+      const MPI_Comm                        communicator,
+      const bool                            exchange_data);
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::reinit(
+      const IndexSet                       &row_parallel_partitioning,
+      const IndexSet                       &col_parallel_partitioning,
+      const dealii::DynamicSparsityPattern &sparsity_pattern,
+      const MPI_Comm                        communicator,
+      const bool                            exchange_data);
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::reinit(
+      const dealii::DynamicSparsityPattern &);
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::vmult(
+      Vector<double, MemorySpace::Default>       &dst,
+      const Vector<double, MemorySpace::Default> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::Tvmult(
+      Vector<double, MemorySpace::Default>       &dst,
+      const Vector<double, MemorySpace::Default> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::vmult_add(
+      Vector<double, MemorySpace::Default>       &dst,
+      const Vector<double, MemorySpace::Default> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::Tvmult_add(
+      Vector<double, MemorySpace::Default>       &dst,
+      const Vector<double, MemorySpace::Default> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::vmult(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::Tvmult(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::vmult_add(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
+
+    template void
+    SparseMatrix<double, MemorySpace::Default>::Tvmult_add(
+      ::dealii::Vector<double>       &dst,
+      const ::dealii::Vector<double> &src) const;
   } // namespace TpetraWrappers
 } // namespace LinearAlgebra
 #  endif // DOXYGEN
index f7f2755692491afa624d8b40957870b97a59686e..5b1e4b113b8835c5776b72f78586c74586627342 100644 (file)
@@ -32,59 +32,92 @@ namespace LinearAlgebra
 
 #  ifdef HAVE_TPETRA_INST_FLOAT
 #    ifdef DEAL_II_HAVE_CXX20
-    static_assert(concepts::is_vector_space_vector<Vector<float>>);
+    static_assert(
+      concepts::is_vector_space_vector<Vector<float, MemorySpace::Host>>);
+    static_assert(
+      concepts::is_vector_space_vector<Vector<float, MemorySpace::Default>>);
 #    endif
-    template class Vector<float>;
-    template Vector<float> &
-    Vector<float>::operator=<float>(const dealii::Vector<float> &);
+    template class Vector<float, MemorySpace::Host>;
+    template class Vector<float, MemorySpace::Default>;
+    template Vector<float, MemorySpace::Host> &
+    Vector<float, MemorySpace::Host>::operator=
+      <float>(const dealii::Vector<float> &);
+    template Vector<float, MemorySpace::Default> &
+    Vector<float, MemorySpace::Default>::operator=
+      <float>(const dealii::Vector<float> &);
     namespace internal
     {
-      template class VectorReference<float>;
-    }
+      template class VectorReference<float, MemorySpace::Host>;
+      template class VectorReference<float, MemorySpace::Default>;
+    } // namespace internal
 #  endif
 
 #  ifdef HAVE_TPETRA_INST_DOUBLE
 #    ifdef DEAL_II_HAVE_CXX20
-    static_assert(concepts::is_vector_space_vector<Vector<double>>);
+    static_assert(
+      concepts::is_vector_space_vector<Vector<double, MemorySpace::Host>>);
+    static_assert(
+      concepts::is_vector_space_vector<Vector<double, MemorySpace::Default>>);
 #    endif
-    template class Vector<double>;
-    template Vector<double> &
-    Vector<double>::operator=<double>(const dealii::Vector<double> &);
+    template class Vector<double, MemorySpace::Host>;
+    template class Vector<double, MemorySpace::Default>;
+    template Vector<double, MemorySpace::Host> &
+    Vector<double, MemorySpace::Host>::operator=
+      <double>(const dealii::Vector<double> &);
+    template Vector<double, MemorySpace::Default> &
+    Vector<double, MemorySpace::Default>::operator=
+      <double>(const dealii::Vector<double> &);
     namespace internal
     {
-      template class VectorReference<double>;
-    }
+      template class VectorReference<double, MemorySpace::Host>;
+      template class VectorReference<double, MemorySpace::Default>;
+    } // namespace internal
 #  endif
 
 #  ifdef DEAL_II_WITH_COMPLEX_VALUES
 #    ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
 #      ifdef DEAL_II_HAVE_CXX20
-    static_assert(
-      concepts::is_vector_space_vector<Vector<std::complex<float>>>);
+    static_assert(concepts::is_vector_space_vector<
+                  Vector<std::complex<float>, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  Vector<std::complex<float>, MemorySpace::Default>>);
 #      endif
-    template class Vector<std::complex<float>>;
-    template Vector<std::complex<float>> &
-    Vector<std::complex<float>>::operator=
+    template class Vector<std::complex<float>, MemorySpace::Host>;
+    template class Vector<std::complex<float>, MemorySpace::Default>;
+    template Vector<std::complex<float>, MemorySpace::Host> &
+    Vector<std::complex<float>, MemorySpace::Host>::operator=
+      <std::complex<float>>(const dealii::Vector<std::complex<float>> &);
+    template Vector<std::complex<float>, MemorySpace::Default> &
+    Vector<std::complex<float>, MemorySpace::Default>::operator=
       <std::complex<float>>(const dealii::Vector<std::complex<float>> &);
     namespace internal
     {
-      template class VectorReference<std::complex<float>>;
-    }
+      template class VectorReference<std::complex<float>, MemorySpace::Host>;
+      template class VectorReference<std::complex<float>, MemorySpace::Default>;
+    } // namespace internal
 #    endif
 
 #    ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
 #      ifdef DEAL_II_HAVE_CXX20
-    static_assert(
-      concepts::is_vector_space_vector<Vector<std::complex<double>>>);
+    static_assert(concepts::is_vector_space_vector<
+                  Vector<std::complex<double>, MemorySpace::Host>>);
+    static_assert(concepts::is_vector_space_vector<
+                  Vector<std::complex<double>, MemorySpace::Default>>);
 #      endif
-    template class Vector<std::complex<double>>;
-    template Vector<std::complex<double>> &
-    Vector<std::complex<double>>::operator=
+    template class Vector<std::complex<double>, MemorySpace::Host>;
+    template class Vector<std::complex<double>, MemorySpace::Default>;
+    template Vector<std::complex<double>, MemorySpace::Host> &
+    Vector<std::complex<double>, MemorySpace::Host>::operator=
+      <std::complex<double>>(const dealii::Vector<std::complex<double>> &);
+    template Vector<std::complex<double>, MemorySpace::Default> &
+    Vector<std::complex<double>, MemorySpace::Default>::operator=
       <std::complex<double>>(const dealii::Vector<std::complex<double>> &);
     namespace internal
     {
-      template class VectorReference<std::complex<double>>;
-    }
+      template class VectorReference<std::complex<double>, MemorySpace::Host>;
+      template class VectorReference<std::complex<double>,
+                                     MemorySpace::Default>;
+    } // namespace internal
 #    endif
 #  endif
   } // namespace TpetraWrappers
index d50a270c0ea22fe6e180fd6b812e2f5c08632a6e..7bbed57d59c658db926771c9b39a9b69f35cda8d 100644 (file)
@@ -85,35 +85,63 @@ Vector<int>::lp_norm(const real_type) const
 #ifdef DEAL_II_TRILINOS_WITH_TPETRA
 #  ifdef HAVE_TPETRA_INST_FLOAT
 template Vector<float>::Vector(
-  const LinearAlgebra::TpetraWrappers::Vector<float> &);
+  const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &);
+template Vector<float>::Vector(
+  const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default> &);
+template Vector<float> &
+Vector<float>::operator=<float>(
+  const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Host> &);
 template Vector<float> &
-Vector<float>::operator=
-  <float>(const LinearAlgebra::TpetraWrappers::Vector<float> &);
+Vector<float>::operator=<float>(
+  const LinearAlgebra::TpetraWrappers::Vector<float, MemorySpace::Default> &);
 #  endif
 
 #  ifdef HAVE_TPETRA_INST_DOUBLE
 template Vector<double>::Vector(
-  const LinearAlgebra::TpetraWrappers::Vector<double> &);
+  const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &);
+template Vector<double>::Vector(
+  const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &);
 template Vector<double> &
-Vector<double>::operator=
-  <double>(const LinearAlgebra::TpetraWrappers::Vector<double> &);
+Vector<double>::operator=<double>(
+  const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Host> &);
+template Vector<double> &
+Vector<double>::operator=<double>(
+  const LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &);
 #  endif
 
 #  ifdef DEAL_II_WITH_COMPLEX_VALUES
 #    ifdef HAVE_TPETRA_INST_COMPLEX_FLOAT
 template Vector<std::complex<float>>::Vector(
-  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>> &);
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                              MemorySpace::Host> &);
+template Vector<std::complex<float>>::Vector(
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                              MemorySpace::Default> &);
 template Vector<std::complex<float>> &
 Vector<std::complex<float>>::operator=<std::complex<float>>(
-  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>> &);
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                              MemorySpace::Host> &);
+template Vector<std::complex<float>> &
+Vector<std::complex<float>>::operator=<std::complex<float>>(
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<float>,
+                                              MemorySpace::Default> &);
 #    endif
 
 #    ifdef HAVE_TPETRA_INST_COMPLEX_DOUBLE
 template Vector<std::complex<double>>::Vector(
-  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>> &);
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                              MemorySpace::Host> &);
+template Vector<std::complex<double>>::Vector(
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                              MemorySpace::Default> &);
+template Vector<std::complex<double>> &
+Vector<std::complex<double>>::operator=<std::complex<double>>(
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                              MemorySpace::Host> &);
 template Vector<std::complex<double>> &
 Vector<std::complex<double>>::operator=<std::complex<double>>(
-  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>> &);
+  const LinearAlgebra::TpetraWrappers::Vector<std::complex<double>,
+                                              MemorySpace::Default> &);
 #    endif
 #  endif
 #endif
index e8ca662ded4695c023f2901df8699b135ddfbdd2..a59a0cf1b2f83028f097cf16bc56b21d39651c4d 100644 (file)
@@ -27,7 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -66,7 +67,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index cafa94b0d71e74df3a3dd9c930e743b3684d6036..c3d6529a62624d725fe9fdd1b9c092167b4d0ea2 100644 (file)
@@ -27,7 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -72,7 +73,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 104de096a20b776e819121f51f6b67b71c3294bf..c0716ea9288ddb92c053672efc4be569d8a1767e 100644 (file)
@@ -31,7 +31,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -76,7 +77,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index d488188e95dc1a8c0130637b9cec7e0c00b00d54..11c8f4e6ace3af2421d4d004c724fbe10e1da80e 100644 (file)
@@ -26,7 +26,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   AssertThrow(m.m() == 5, ExcInternalError());
   AssertThrow(m.n() == 5, ExcInternalError());
@@ -48,7 +49,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 42067d58402881cc1161b41e5b7ee25f6f13192e..def86ef8cdf7f931b14ad634a56bfa37305726d2 100644 (file)
@@ -27,7 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries. count how many
   // entries we have
@@ -62,7 +63,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 6b08722953b22ab235404aa42536580ad178f6b2..40bd1f3fb94776d3c00ea36deeab6c880eca389a 100644 (file)
@@ -25,7 +25,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries. count how many
   // entries we have
@@ -63,7 +64,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index acef4d7c63b15d18910ed9739e5cbcc2544f1f35..2e8dab2246159599d96eebf01838ace450c8bf79 100644 (file)
@@ -26,7 +26,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -71,7 +72,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 37bcbe50caafaae509ac0a154b9b6e7c62010693..7779511fd832e911194531b0067bd44a580543d7 100644 (file)
@@ -26,7 +26,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -71,7 +72,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 8cddd57f5aa1359f393ce674ebfe1638d45ac8c6..b233008443933d9d5d8d3bb8fe5f682265d3de10 100644 (file)
@@ -26,7 +26,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the vector
   for (unsigned int i = 0; i < v.size(); i += 1 + i)
@@ -53,7 +53,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index c23bc5eddcba511526540d3674ec8236ff1fdfc8..c74507af58b95b2a69167907be04958c9c3a803e 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -65,7 +65,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 6bbfbdb60732285585bfe9134da0bbccf8b801fe..abe64983dbd89b0e6a9460ad62205b4996a233df 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -65,7 +65,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 17508e1274b123e7a21d12ee0cf09635b5ebe77b..1c98a9fa16ddf31a8f130ad09ca2eacd76b8ea91 100644 (file)
@@ -41,7 +41,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -83,7 +83,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index b1d6a676d929a963538df6db1546617b0265aa52..8fd451ec5ba310b0c84d50a78e7835f57f51d4e3 100644 (file)
@@ -44,7 +44,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -83,7 +83,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index ea9e1994353743590a92e4fdcf28e8b12d05d02a..9d8ca8108f3ded5c8978111af01a619dd119fe5a 100644 (file)
@@ -44,7 +44,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -84,7 +84,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index d511d00a97e5d8baa8d8b7627c64508b4ca8a248..ea5e6639c4851daee251a4a94d883ed2a25a3590 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   double norm = 0;
@@ -58,7 +58,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index bafa7bbb716a1cba358a86fa23bb3601bf386c1b..4c131958eafe06ca2174c4b6da0ed19f50ee7103 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   TrilinosScalar norm = 0;
@@ -59,7 +59,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index fac8224eff7740cd58ed6113d3655b61327cc802..1ba2ce6e8c5fd7a570b6e5c2f636cb8e9b8218dc 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   double norm = 0;
@@ -58,7 +58,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 95d12048f9d4109aab388a4da3c8a6adfa905000..54f399c6fb04b3115fe5ccf3ece6b66c2c92ae2d 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -66,7 +66,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index c619e7f1371512ea4742dee447e10a3f5e9da2cb..683028a9b90358a4896a6401b39d45e3c6e4454a 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -66,7 +66,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 941f89099dd3417839fd25e04b1cf3145da57147..2cedfe4773fa6a850d7fea662df4e5d341129b33 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector, but disjoint sets of elements
@@ -61,9 +61,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 20681b25846d9e5509012ef29816aaa9b1945bf6..07b98841cbbdd824a04dbc73e86bc3aea9f6fb66 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector, and record the expected scalar
@@ -68,9 +68,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index bf0dd6c537f44a6a5fba1280a0f270500afb7d76..41d919cdd12d0791d0d64a1f9100eab04dccff0e 100644 (file)
@@ -30,7 +30,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some entries of the vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -62,7 +62,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 4844bb910846cf532a05d79461a73ffdc970fc6d..b2f29c4f7158cf4d9e03326cc4fa110c3e7a7b90 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some entries of the vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -36,7 +36,7 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
   v.compress(VectorOperation::insert);
 
   // then copy it
-  LinearAlgebra::TpetraWrappers::Vector<double> w;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
   w.reinit(complete_index_set(v.size()), MPI_COMM_WORLD);
   w = v;
 
@@ -64,7 +64,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index c15f6307e9d0cf462d2fc9eb174e815f6055933e..ecc9bb5ac39f64f5d1a7a6559eaa6ed294ae0490 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some entries of the vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -38,7 +38,7 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
 
   // then copy it to a vector of different
   // size
-  LinearAlgebra::TpetraWrappers::Vector<double> w;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
   w.reinit(complete_index_set(1), MPI_COMM_WORLD);
   w = v;
 
@@ -66,7 +66,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 04ab5f280f8e4adf1cac26e1432fce3fc2e20911..9063d439c2931ef0590377a0c4561a98513debab 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   v.reinit(complete_index_set(13), MPI_COMM_WORLD);
 
@@ -50,7 +50,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 5af7dd695c4a94dc0e15ee880831bc101a4e1bbb..703606c115fc3ed0e42b88492d5e964c32169f0a 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some entries of the vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -58,7 +58,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 8035958cc87998485ad81ba41169c3c1e173d589..6e2d35ec16cdf12fde83bcd0d99ab5d1b6060cf9 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   TrilinosScalar norm = 0;
@@ -59,7 +59,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 608052c97b5d9ee36229e02b9c8fcb2504577e7a..56436456e62712307add7fc7a05f799d24fd0b65 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   TrilinosScalar sum = 0;
@@ -60,7 +60,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index d1c5b853f4aa91a474642cac69f595e06501cce4..3cf6dcf963a73c028c009486d84f0707ab230d57 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some elements of the vector
   double sum = 0;
@@ -61,7 +61,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 0901b9a13bcfdc4a905ad8ce9884acec6d5104ca..57b3e4aa53d3c5acbe67f3b7f8e2a3aededc3835 100644 (file)
@@ -27,8 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -77,9 +77,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 8a90ae46fe0cffbe961f33e801240aff4aae715e..a309dd99dc0923cf065fda465522d3ea176c1ad5 100644 (file)
@@ -27,8 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -77,9 +77,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index cefd5b163adeae192358af298e57fbd9407ed7df..e2a7574b205cea01905b28d57e907566b866055d 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     v(i) = i;
@@ -57,7 +57,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 6e388e90d63f352fac419d5839de6d6f161b5748..b660b5bbe6c2c6e04bec4fe9bc91a1e39ff10839 100644 (file)
@@ -27,8 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     {
@@ -65,9 +65,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 0a1253e86ab9c5bd4d59530410dc19a364e51b38..37d65edd31887dab9288c278493ea748353e130c 100644 (file)
@@ -27,9 +27,9 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w,
-     LinearAlgebra::TpetraWrappers::Vector<double> &x)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &x)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     {
@@ -69,11 +69,11 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> x;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> x;
         x.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w, x);
       }
index 0afc4ce54d6e0f74dbc5099802099d78fb2f2c47..15f2fb0fa558f46a1b9df04e8d370fe4d275bf6b 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     {
@@ -66,9 +66,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 30e741349c25f5ecd81946c37f542efece6e2f18..8d0b684c829198ac0cce65e3df08176acca94f9a 100644 (file)
@@ -27,8 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     {
@@ -65,9 +65,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 80c500fdf503bae16f8e25f9c88a15158229f85c..3f500cff234c595d937c9f988b4b151d56dc8bd8 100644 (file)
@@ -27,8 +27,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   for (unsigned int i = 0; i < v.size(); ++i)
     {
@@ -65,9 +65,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 56e31989b2e8a1ef88559c201c12006c4c026b0f..8f50f0ac585a2f7c2ff86a673fad34fa26bfead5 100644 (file)
@@ -29,7 +29,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   dealii::Vector<TrilinosScalar> w(v.size());
 
@@ -63,7 +63,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index d1419e915753ea2a8f1374fad38a40d9a9c32428..382369a41bd8cff08ed61aa59baf13791c64f4e3 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set some entries of the vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -37,7 +37,7 @@ test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
   v.compress(VectorOperation::insert);
 
   // then copy it
-  LinearAlgebra::TpetraWrappers::Vector<double> w(v);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w(v);
   w.compress(VectorOperation::insert);
 
   // make sure they're equal
@@ -64,7 +64,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 593d4e4b78002fa0db26f9667bd63fa3f1bc6f2e..21fa7182e697a09ff2f6ff0a9b376a259ebdf677 100644 (file)
@@ -28,7 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -70,10 +71,11 @@ main(int argc, char **argv)
       {
         std::vector<unsigned int> row_lengths(5, 3U);
         row_lengths.back() = 2;
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(
-          static_cast<types::global_dof_index>(5U),
-          static_cast<types::global_dof_index>(5U),
-          row_lengths);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(static_cast<types::global_dof_index>(5U),
+            static_cast<types::global_dof_index>(5U),
+            row_lengths);
         test(m);
       }
     }
index cad10618b40ea6e755ec7ce8a307f1caece9ae18..07e21aa2f40ce64e5f971c886652a8f8abf4fa82 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -69,7 +69,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index dd0d9b88eff4f81a8d8767560681e2fd4042c2a7..e1a46fa3ad4f4bdf1712190d3e65a928d65418ab 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -69,7 +69,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 2eec167758441ba625e74f987adf98bebc515f6f..2a6e01690c1455492afb4ccbfade84b2ae58a294 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -68,7 +68,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 1a0231290420deb2b2426f5ce692658b1bddd3bf..754c5fbb117dc2446c7237a28aa8b3778531cbc9 100644 (file)
@@ -28,7 +28,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. have a bit pattern of where we
@@ -68,7 +68,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 9612b8cb33c53c152030ba31fb50e67e90724523..b929352d69e8f52057e5065acd2e851664586458 100644 (file)
@@ -27,7 +27,7 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   // set only certain elements of the
   // vector. they are all positive
@@ -66,7 +66,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v);
       }
index 870543ae898c386b33fe0a08a5e85a4436acf0d8..c67f5c164da13df85a3efa55dad0634920db1606 100644 (file)
@@ -28,7 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   AssertThrow(m.m() != 0, ExcInternalError());
   AssertThrow(m.n() != 0, ExcInternalError());
@@ -55,7 +56,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(100U, 100U, 5U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(100U, 100U, 5U);
         test(v);
       }
     }
index f8d8688642c253ac454de52ecd000281f20fa9e1..cfe4031d0e51a10de1525c1829a85e045a605fdd 100644 (file)
@@ -26,7 +26,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   AssertThrow(m.m() == 100, ExcInternalError());
   AssertThrow(m.n() == 100, ExcInternalError());
@@ -53,7 +54,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(100U, 100U, 5U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(100U, 100U, 5U);
         test(v);
       }
     }
index a294ae4a45062bf25a530b46268a75e452c2924e..2a93c37e10189e3c572524bfc8e761cca54ca25f 100644 (file)
@@ -61,10 +61,11 @@ main(int argc, char **argv)
       {
         const unsigned int n_dofs = 420;
         // check
-        // LinearAlgebra::TpetraWrappers::SparseMatrix<double>
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v1(n_dofs,
-                                                               n_dofs,
-                                                               5U);
+        // LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+        // MemorySpace::Default>
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v1(n_dofs, n_dofs, 5U);
         test(v1);
 
         // check
@@ -77,9 +78,9 @@ main(int argc, char **argv)
         const unsigned int n_local_dofs = n_dofs / n_jobs;
         IndexSet           local_rows(n_dofs);
         local_rows.add_range(n_local_dofs * my_id, n_local_dofs * (my_id + 1));
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v2(local_rows,
-                                                               MPI_COMM_WORLD,
-                                                               5);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v2(local_rows, MPI_COMM_WORLD, 5);
         test(v2);
       }
     }
index e28488e43fdaad980beb4ee6ba8ba07c81930557..ad15dec3c6b6e26a1f4dd8652c667d8d29787c2d 100644 (file)
@@ -28,7 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   Assert(m.m() != 0, ExcInternalError());
   Assert(m.n() != 0, ExcInternalError());
@@ -107,7 +108,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(14U, 14U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(14U, 14U, 3U);
         test(v);
       }
     }
index d59543e27dbac8e3b85017633e874436f3c08b03..9c630615b01ce53b45935adc5d9f73df7706fdbb 100644 (file)
@@ -28,7 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   Assert(m.m() != 0, ExcInternalError());
   Assert(m.n() != 0, ExcInternalError());
@@ -113,7 +114,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(14U, 14U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(14U, 14U, 3U);
         test(v);
       }
     }
index ffdccc1a8f029fe1a008af6664d8314a9cdd8ef4..7c18509c1c882972d266f953ecb35a34a8f8e608 100644 (file)
@@ -29,7 +29,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   Assert(m.m() != 0, ExcInternalError());
   Assert(m.n() != 0, ExcInternalError());
@@ -114,7 +115,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(14U, 14U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(14U, 14U, 3U);
         test(v);
       }
     }
index 45d93f09a4c3108dd48d77685bfba1e412b8ec0e..876a981db4289f7beab27647781b761b7034d636 100644 (file)
@@ -29,7 +29,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   Assert(m.m() != 0, ExcInternalError());
   Assert(m.n() != 0, ExcInternalError());
@@ -122,7 +123,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> v(14U, 14U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          v(14U, 14U, 3U);
         test(v);
       }
     }
index 180281b0004318189e10d5d02313f9a200216f5b..a431be2c851c9ccfd42b3b329b90bfc721dbb9db 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m2(m.m(), m.n(), 3U),
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m2(
+    m.m(), m.n(), 3U),
     m3(m.m(), m.n(), 3U);
 
   // first set a few entries one-by-one
@@ -59,7 +61,9 @@ test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
   Vector<double> src(m.m()), dst(m.m());
   src = 1.;
 
-  LinearAlgebra::TpetraWrappers::PreconditionJacobi<double> prec;
+  LinearAlgebra::TpetraWrappers::PreconditionJacobi<double,
+                                                    MemorySpace::Default>
+    prec;
   prec.initialize(m);
 
   m.vmult(dst, src);
@@ -93,7 +97,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
 
         test(m);
       }
index 0ba5045435b92e898f6b799b4021e6aeb38685c9..9d209b39c18bf1590586bcb6fbf8caad72bc84ef 100644 (file)
@@ -58,23 +58,26 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(control,
-                                                                   mem);
-    PreconditionIdentity                                    preconditioner;
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem);
+    PreconditionIdentity preconditioner;
 
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
 
index 9ba3a2dae4c8a0ded78da88a5f2bc70f3052560b..065c0a5ae2fe0db53dc7d03def0425764155252d 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii8SolverCGINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii8SolverCGINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped within 42 - 44 iterations
index 01350ad3c3215774e16270dd0fa01a78f45eebe8..b403fbac88fcce42a7db23e3a121b0d8178e41aa 100644 (file)
@@ -59,22 +59,25 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverBicgstab<LinearAlgebra::TpetraWrappers::Vector<double>>      solver(
-      control, mem);
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverBicgstab<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem);
     PreconditionIdentity preconditioner;
 
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
index ceafaf1d09f7a667fa0d85e20688cfe9ea864c2c..7ce9609c322eb496228f5897f49572b4b71583b9 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii14SolverBicgstabINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii14SolverBicgstabINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped within 49 - 51 iterations
index 1b926dae5c42d7561797ec752f181c3323ab340e..57fa49f96d5e41b949e855ff7d3367aeaa9b6e0c 100644 (file)
@@ -61,26 +61,29 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverGMRES<LinearAlgebra::TpetraWrappers::Vector<double>>::AdditionalData
-                                                               sol_data(28);
-    SolverGMRES<LinearAlgebra::TpetraWrappers::Vector<double>> solver(control,
-                                                                      mem,
-                                                                      sol_data);
-    PreconditionIdentity                                       preconditioner;
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverGMRES<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>::
+      AdditionalData sol_data(28);
+    SolverGMRES<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem, sol_data);
+    PreconditionIdentity preconditioner;
 
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
 
index 9d72b0e9c58a43d18c359063c0f6d45514b83a26..9e919b6b2fbb4945ef2a159eb51a75c9b98de0dd 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii11SolverGMRESINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii11SolverGMRESINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped within 74 - 76 iterations
index e4c7ae7c7347b178278cfee521a4017d80e493c4..8487d66d30b0455a1e4f83f8e3926a868d436f94 100644 (file)
@@ -60,23 +60,26 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverMinRes<LinearAlgebra::TpetraWrappers::Vector<double>> solver(control,
-                                                                       mem);
-    PreconditionIdentity                                        preconditioner;
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverMinRes<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem);
+    PreconditionIdentity preconditioner;
 
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
 
index 662bfbeceb5dba9d86f472162f13a72262d6d47c..59257f28941999fe7cd5bfa8aaf9821ac5348bd1 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii12SolverMinResINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii12SolverMinResINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped after 43 iterations
index 2cd5b919ab395cb607d6bb41024c45a226a78d14..02253e3c7414d9ba1b8f22479a11086924a5f35b 100644 (file)
@@ -59,23 +59,26 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverQMRS<LinearAlgebra::TpetraWrappers::Vector<double>> solver(control,
-                                                                     mem);
-    PreconditionIdentity                                      preconditioner;
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverQMRS<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem);
+    PreconditionIdentity preconditioner;
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
 
     check_solver_within_range(solver.solve(A, u, f, preconditioner),
index d15b2da96fc38bfc13cea48d9db38b97857981b7..9ffde8920607d5dd481d99ea8724804fcfec3dd0 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii10SolverQMRSINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii10SolverQMRSINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped within 45 - 47 iterations
index a5a104fcac4bc2cb29576d5c9aaf256b12801022..6581a6fee2a14b33587eed5c2117ebbe6c2d94a5 100644 (file)
@@ -58,25 +58,29 @@ main(int argc, char **argv)
     FDMatrix               testproblem(size, size);
     DynamicSparsityPattern csp(dim, dim);
     testproblem.five_point_structure(csp);
-    LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+    LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
     A.reinit(csp);
     testproblem.five_point(A);
 
-    LinearAlgebra::TpetraWrappers::Vector<double> f;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> f;
     f.reinit(complete_index_set(dim), MPI_COMM_WORLD);
-    LinearAlgebra::TpetraWrappers::Vector<double> u;
+    LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> u;
     u.reinit(complete_index_set(dim), MPI_COMM_WORLD);
     f.trilinos_rcp()->putScalar(1.0);
     A.compress(VectorOperation::insert);
     f.compress(VectorOperation::insert);
     u.compress(VectorOperation::insert);
 
-    GrowingVectorMemory<LinearAlgebra::TpetraWrappers::Vector<double>> mem;
-    SolverRichardson<LinearAlgebra::TpetraWrappers::Vector<double>>::
+    GrowingVectorMemory<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      mem;
+    SolverRichardson<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>::
       AdditionalData data(
         /*omega=*/0.1);
-    SolverRichardson<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      control, mem, data);
+    SolverRichardson<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                         solver(control, mem, data);
     PreconditionIdentity preconditioner;
     deallog << "Solver type: " << typeid(solver).name() << std::endl;
 
index 039bff27a178c77555f0b6658e09b332bf9c80b3..c82a0d9a71d1a633dc9b1f286b5206b1a225a5be 100644 (file)
@@ -1,4 +1,4 @@
 
 DEAL::Size 32 Unknowns 961
-DEAL::Solver type: N6dealii16SolverRichardsonINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace4HostEEEEE
+DEAL::Solver type: N6dealii16SolverRichardsonINS_13LinearAlgebra14TpetraWrappers6VectorIdNS_11MemorySpace7DefaultEEEEE
 DEAL::Solver stopped within 5269 - 5271 iterations
index 24f71ee43f43bbbe1cfad1d4d51633326f088acc..bc965f3607ec4ebe5e8b0d0cc2f3b1e0431d1a39 100644 (file)
@@ -71,11 +71,14 @@ private:
   AffineConstraints<double> constraints;
   SparsityPattern           sparsity_pattern;
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> system_matrix;
-
-  LinearAlgebra::TpetraWrappers::Vector<double> solution;
-  LinearAlgebra::TpetraWrappers::Vector<double> system_rhs;
-  LinearAlgebra::TpetraWrappers::Vector<double> system_rhs_two;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    system_matrix;
+
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> solution;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    system_rhs;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    system_rhs_two;
 };
 
 
@@ -300,20 +303,23 @@ void
 Step4<dim>::solve()
 {
   // Compute 'reference' solution with CG solver and SSOR preconditioner
-  LinearAlgebra::TpetraWrappers::PreconditionSSOR<double> preconditioner;
+  LinearAlgebra::TpetraWrappers::PreconditionSSOR<double, MemorySpace::Default>
+    preconditioner;
   preconditioner.initialize(system_matrix);
-  LinearAlgebra::TpetraWrappers::Vector<double> temp_solution(system_rhs);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    temp_solution(system_rhs);
   temp_solution = 0;
   SolverControl solver_control(1000, 1e-12);
-  SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-    solver_control);
+  SolverCG<LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+    solver(solver_control);
 
   solver.solve(system_matrix, temp_solution, system_rhs, preconditioner);
 
   constraints.distribute(temp_solution);
   solution = temp_solution;
 
-  LinearAlgebra::TpetraWrappers::Vector<double> output(temp_solution);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> output(
+    temp_solution);
 
   // do CG solve for new rhs
   temp_solution = 0;
@@ -323,7 +329,8 @@ Step4<dim>::solve()
   constraints.distribute(temp_solution);
   solution = temp_solution;
 
-  LinearAlgebra::TpetraWrappers::Vector<double> output_two(temp_solution);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    output_two(temp_solution);
 
   // factorize matrix for direct solver
   temp_solution = 0;
@@ -331,10 +338,10 @@ Step4<dim>::solve()
 
   {
     deallog.push("DirectKLU2");
-    LinearAlgebra::TpetraWrappers::SolverDirect<double>::AdditionalData data(
-      "KLU2");
-    LinearAlgebra::TpetraWrappers::SolverDirect<double> direct_solver(
-      solver_control, data);
+    LinearAlgebra::TpetraWrappers::SolverDirect<double, MemorySpace::Default>::
+      AdditionalData data("KLU2");
+    LinearAlgebra::TpetraWrappers::SolverDirect<double, MemorySpace::Default>
+      direct_solver(solver_control, data);
 
     Teuchos::ParameterList amesos2_params("Amesos2");
     Teuchos::ParameterList klu2_params = amesos2_params.sublist("KLU2");
@@ -384,12 +391,13 @@ Step4<dim>::solve()
     // MEASLES is a non-existent solver so it throws the exception
     // independent of the Amesos2 configuration.
     deallog.push("DirectMEASLES");
-    LinearAlgebra::TpetraWrappers::SolverDirect<double>::AdditionalData data(
-      "MEASLES");
+    LinearAlgebra::TpetraWrappers::SolverDirect<double, MemorySpace::Default>::
+      AdditionalData data("MEASLES");
     try
       {
-        LinearAlgebra::TpetraWrappers::SolverDirect<double> direct_solver(
-          solver_control, data);
+        LinearAlgebra::TpetraWrappers::SolverDirect<double,
+                                                    MemorySpace::Default>
+          direct_solver(solver_control, data);
       }
     catch (dealii::ExceptionBase &exc)
       {
index e384b2fe0bc603a44895abb908ea25842801f524..cf940b4a59cf8ca24c9a0a11d156d67fe0f8ad31 100644 (file)
@@ -70,11 +70,14 @@ private:
   AffineConstraints<double> constraints;
   SparsityPattern           sparsity_pattern;
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> system_matrix;
-
-  LinearAlgebra::TpetraWrappers::Vector<double> solution;
-  LinearAlgebra::TpetraWrappers::Vector<double> system_rhs;
-  LinearAlgebra::TpetraWrappers::Vector<double> system_rhs_two;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    system_matrix;
+
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> solution;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    system_rhs;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    system_rhs_two;
 };
 
 
@@ -299,20 +302,23 @@ void
 Step4<dim>::solve()
 {
   // Compute 'reference' solution with CG solver and SSOR preconditioner
-  LinearAlgebra::TpetraWrappers::PreconditionSSOR<double> preconditioner;
+  LinearAlgebra::TpetraWrappers::PreconditionSSOR<double, MemorySpace::Default>
+    preconditioner;
   preconditioner.initialize(system_matrix);
-  LinearAlgebra::TpetraWrappers::Vector<double> temp_solution(system_rhs);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    temp_solution(system_rhs);
   temp_solution = 0;
   SolverControl solver_control(1000, 1e-12);
-  SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-    solver_control);
+  SolverCG<LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+    solver(solver_control);
 
   solver.solve(system_matrix, temp_solution, system_rhs, preconditioner);
 
   constraints.distribute(temp_solution);
   solution = temp_solution;
 
-  LinearAlgebra::TpetraWrappers::Vector<double> output(temp_solution);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> output(
+    temp_solution);
 
   // do CG solve for new rhs
   temp_solution = 0;
@@ -322,16 +328,18 @@ Step4<dim>::solve()
   constraints.distribute(temp_solution);
   solution = temp_solution;
 
-  LinearAlgebra::TpetraWrappers::Vector<double> output_two(temp_solution);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    output_two(temp_solution);
 
   // factorize matrix for direct solver
   temp_solution = 0;
   solution      = 0;
 
   deallog.push("DirectKLU2");
-  LinearAlgebra::TpetraWrappers::SolverDirectKLU2<double>::AdditionalData data;
-  LinearAlgebra::TpetraWrappers::SolverDirectKLU2<double> direct_solver(
-    solver_control, data);
+  LinearAlgebra::TpetraWrappers::
+    SolverDirectKLU2<double, MemorySpace::Default>::AdditionalData data;
+  LinearAlgebra::TpetraWrappers::SolverDirectKLU2<double, MemorySpace::Default>
+    direct_solver(solver_control, data);
   direct_solver.initialize(system_matrix);
 
   // do solve 1
index 3c2d965178c7b1636434e7c677418012ec0dfc47..94452a969e11a83701b5f0d68c454cd83ed0882f 100644 (file)
@@ -49,7 +49,9 @@ test()
       my_set.add_range(400, 529);
     }
   my_set.compress();
-  my_set.make_tpetra_map(MPI_COMM_WORLD, false);
+  my_set.template make_tpetra_map<
+    LinearAlgebra::TpetraWrappers::TpetraTypes::NodeType<MemorySpace::Default>>(
+    MPI_COMM_WORLD, false);
 }
 
 
index cca9edf331164924976407bb41e82ef9e878c6cb..fb17aae46193c6423236ba17d455dcf847b31cf0 100644 (file)
@@ -26,11 +26,13 @@ void
 test()
 {
   // create an empty sparsity pattern
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity(4, 5, 1);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity(
+    4, 5, 1);
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A(sparsity);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A(
+    sparsity);
 
   // see how many nonzero elements it reports
   deallog << A.n_nonzero_elements() << std::endl;
index 9089ed47291d5b37277c1d673d1e3c67b8f4ab20..0d8d8dd579498d7368ee33fc5c2ac3a311107631 100644 (file)
@@ -44,7 +44,7 @@ test()
   coupling.fill(DoFTools::none);
 
   // create an empty sparsity pattern
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity;
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity;
   sparsity.reinit(dof_handler.n_dofs(), dof_handler.n_dofs());
   DoFTools::make_sparsity_pattern(dof_handler,
                                   coupling,
@@ -56,7 +56,7 @@ test()
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A;
   A.reinit(sparsity);
 
   // see how many nonzero elements it reports
index 51367754521804fd0c55488110130411e76549a7..eacea604a30f15cb5f7775f20f120a48391a7ee2 100644 (file)
@@ -87,7 +87,7 @@ test()
   IndexSet           locally_owned_dofs(N);
   locally_owned_dofs.add_range(start_row[my_id], local_rows_per_process[my_id]);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m;
   m.reinit(locally_owned_dofs, locally_owned_dofs, csp, MPI_COMM_WORLD);
   // now write into the exact same matrix
   // entries as have been created by the
index 7ecb8536bf084acadf75750b7bf445afc5d56803..0d7cf4a0323d193629d3c9590a43d52ebf55fc4d 100644 (file)
@@ -70,10 +70,12 @@ private:
 
   AffineConstraints<double> constraints;
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> system_matrix;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    system_matrix;
 
-  LinearAlgebra::TpetraWrappers::Vector<double> solution;
-  LinearAlgebra::TpetraWrappers::Vector<double> system_rhs;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> solution;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>
+    system_rhs;
 };
 
 
@@ -233,11 +235,14 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("Identity");
     static constexpr std::array<unsigned int, 2> lower{{49, 100}};
-    LinearAlgebra::TpetraWrappers::PreconditionIdentity<double> preconditioner;
+    LinearAlgebra::TpetraWrappers::PreconditionIdentity<double,
+                                                        MemorySpace::Default>
+      preconditioner;
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                           solver(solver_control);
     Teuchos::ParameterList precon_params;
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
@@ -253,13 +258,15 @@ Step4<dim>::solve(int cycle)
     // For this we use the point relaxation (SSOR)
     // with default parameters, resulting in symmetric Gauss-Seidel (SGS)
     deallog.push("CustomSGS");
-    static constexpr std::array<unsigned int, 2>              lower{{49, 100}};
-    LinearAlgebra::TpetraWrappers::PreconditionIfpack<double> preconditioner(
-      "RELAXATION");
+    static constexpr std::array<unsigned int, 2> lower{{49, 100}};
+    LinearAlgebra::TpetraWrappers::PreconditionIfpack<double,
+                                                      MemorySpace::Default>
+      preconditioner("RELAXATION");
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+                           solver(solver_control);
     Teuchos::ParameterList precon_params;
     precon_params.set("relaxation: type", "Symmetric Gauss-Seidel");
     preconditioner.set_parameter_list(precon_params);
@@ -274,13 +281,16 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("Jacobi");
-    static constexpr std::array<unsigned int, 2>              lower{{49, 100}};
-    LinearAlgebra::TpetraWrappers::PreconditionJacobi<double> preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{{49, 100}};
+    LinearAlgebra::TpetraWrappers::PreconditionJacobi<double,
+                                                      MemorySpace::Default>
+      preconditioner;
     solution = 0;
 
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -293,12 +303,15 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("l1Jacobi");
     static constexpr std::array<unsigned int, 2> lower{{49, 100}};
-    LinearAlgebra::TpetraWrappers::PreconditionL1Jacobi<double> preconditioner;
+    LinearAlgebra::TpetraWrappers::PreconditionL1Jacobi<double,
+                                                        MemorySpace::Default>
+      preconditioner;
     solution = 0;
 
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -311,13 +324,15 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("l1GaussSeidel");
     static constexpr std::array<unsigned int, 2> lower{{31, 62}};
-    LinearAlgebra::TpetraWrappers::PreconditionL1GaussSeidel<double>
-      preconditioner;
+    LinearAlgebra::TpetraWrappers::
+      PreconditionL1GaussSeidel<double, MemorySpace::Default>
+        preconditioner;
     solution = 0;
 
     SolverControl solver_control(1000, 1e-10);
-    SolverBicgstab<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverBicgstab<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -329,13 +344,15 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("SOR");
-    static constexpr std::array<unsigned int, 2>           lower{{31, 62}};
-    LinearAlgebra::TpetraWrappers::PreconditionSOR<double> preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{{31, 62}};
+    LinearAlgebra::TpetraWrappers::PreconditionSOR<double, MemorySpace::Default>
+      preconditioner;
     solution = 0;
 
     SolverControl solver_control(1000, 1e-5);
-    SolverBicgstab<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverBicgstab<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -347,13 +364,16 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("SSOR");
-    static constexpr std::array<unsigned int, 2>            lower{{40, 77}};
-    LinearAlgebra::TpetraWrappers::PreconditionSSOR<double> preconditioner;
+    static constexpr std::array<unsigned int, 2> lower{{40, 77}};
+    LinearAlgebra::TpetraWrappers::PreconditionSSOR<double,
+                                                    MemorySpace::Default>
+      preconditioner;
     solution = 0;
 
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -366,15 +386,18 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("BlockJacobi");
     static constexpr std::array<unsigned int, 2> lower{{73, 145}};
-    LinearAlgebra::TpetraWrappers::PreconditionBlockJacobi<double>
+    LinearAlgebra::TpetraWrappers::PreconditionBlockJacobi<double,
+                                                           MemorySpace::Default>
       preconditioner;
     LinearAlgebra::TpetraWrappers::PreconditionBlockJacobi<
-      double>::AdditionalData data;
+      double,
+      MemorySpace::Default>::AdditionalData data;
     data.n_local_parts = 16;
     solution           = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix, data);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -386,16 +409,19 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("BlockSOR");
-    static constexpr std::array<unsigned int, 2>                lower{{18, 37}};
-    LinearAlgebra::TpetraWrappers::PreconditionBlockSOR<double> preconditioner;
-    LinearAlgebra::TpetraWrappers::PreconditionBlockSOR<double>::AdditionalData
-      data;
+    static constexpr std::array<unsigned int, 2> lower{{18, 37}};
+    LinearAlgebra::TpetraWrappers::PreconditionBlockSOR<double,
+                                                        MemorySpace::Default>
+      preconditioner;
+    LinearAlgebra::TpetraWrappers::
+      PreconditionBlockSOR<double, MemorySpace::Default>::AdditionalData data;
     data.n_local_parts = 16;
     data.omega         = 0.8;
     solution           = 0;
     SolverControl solver_control(1000, 1e-5);
-    SolverBicgstab<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverBicgstab<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix, data);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -408,15 +434,18 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("BlockSSOR");
     static constexpr std::array<unsigned int, 2> lower{{30, 59}};
-    LinearAlgebra::TpetraWrappers::PreconditionBlockSSOR<double> preconditioner;
-    LinearAlgebra::TpetraWrappers::PreconditionBlockSSOR<double>::AdditionalData
-      data;
+    LinearAlgebra::TpetraWrappers::PreconditionBlockSSOR<double,
+                                                         MemorySpace::Default>
+      preconditioner;
+    LinearAlgebra::TpetraWrappers::
+      PreconditionBlockSSOR<double, MemorySpace::Default>::AdditionalData data;
     data.n_local_parts = 16;
     data.omega         = 1.2;
     solution           = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix, data);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -429,11 +458,13 @@ Step4<dim>::solve(int cycle)
   {
     static constexpr std::array<unsigned int, 2> lower{{30, 56}};
     deallog.push("ILU");
-    LinearAlgebra::TpetraWrappers::PreconditionILU<double> preconditioner;
+    LinearAlgebra::TpetraWrappers::PreconditionILU<double, MemorySpace::Default>
+      preconditioner;
     solution = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -445,16 +476,19 @@ Step4<dim>::solve(int cycle)
 
   {
     deallog.push("ILUT");
-    static constexpr std::array<unsigned int, 2>            lower{{11, 19}};
-    LinearAlgebra::TpetraWrappers::PreconditionILUT<double> preconditioner;
-    LinearAlgebra::TpetraWrappers::PreconditionILUT<double>::AdditionalData
-      data;
+    static constexpr std::array<unsigned int, 2> lower{{11, 19}};
+    LinearAlgebra::TpetraWrappers::PreconditionILUT<double,
+                                                    MemorySpace::Default>
+      preconditioner;
+    LinearAlgebra::TpetraWrappers::
+      PreconditionILUT<double, MemorySpace::Default>::AdditionalData data;
     data.ilut_drop = 1e-6;
     data.ilut_fill = 3;
     solution       = 0;
     SolverControl solver_control(1000, 1e-5);
-    SolverBicgstab<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverBicgstab<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix, data);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -467,15 +501,18 @@ Step4<dim>::solve(int cycle)
   {
     deallog.push("Chebyshev");
     static constexpr std::array<unsigned int, 2> lower{{23, 46}};
-    LinearAlgebra::TpetraWrappers::PreconditionChebyshev<double> preconditioner;
-    LinearAlgebra::TpetraWrappers::PreconditionChebyshev<double>::AdditionalData
-      data;
+    LinearAlgebra::TpetraWrappers::PreconditionChebyshev<double,
+                                                         MemorySpace::Default>
+      preconditioner;
+    LinearAlgebra::TpetraWrappers::
+      PreconditionChebyshev<double, MemorySpace::Default>::AdditionalData data;
     data.max_eigenvalue = 2.5;
     data.degree         = 3;
     solution            = 0;
     SolverControl solver_control(1000, 1e-10);
-    SolverCG<LinearAlgebra::TpetraWrappers::Vector<double>> solver(
-      solver_control);
+    SolverCG<
+      LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default>>
+      solver(solver_control);
     preconditioner.initialize(system_matrix, data);
     check_solver_within_range(
       solver.solve(system_matrix, solution, system_rhs, preconditioner),
@@ -510,7 +547,8 @@ Step4<dim>::solve(int cycle)
     deallog.push("CustomIGLOO");
     try
       {
-        LinearAlgebra::TpetraWrappers::PreconditionIfpack<double>
+        LinearAlgebra::TpetraWrappers::PreconditionIfpack<double,
+                                                          MemorySpace::Default>
           preconditioner("IGLOO");
       }
     catch (dealii::ExceptionBase &exc)
index 005522857760246c916a4f172cae918093708ce6..95efd95335ade8980247756c07877bbd8e15ef24 100644 (file)
@@ -38,7 +38,8 @@ test()
   const unsigned int N = 200;
 
   // build the sparse matrix
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> matrix(N * N, N * N, 5U);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    matrix(N * N, N * N, 5U);
   for (unsigned int i = 0; i < N; ++i)
     for (unsigned int j = 0; j < N; ++j)
       {
@@ -71,9 +72,9 @@ test()
   // then do a single matrix-vector
   // multiplication with subsequent formation
   // of the matrix norm
-  LinearAlgebra::TpetraWrappers::Vector<double> v1;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v1;
   v1.reinit(complete_index_set(N * N), MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<double> v2;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v2;
   v2.reinit(complete_index_set(N * N), MPI_COMM_WORLD);
   for (unsigned int i = 0; i < N * N; ++i)
     v1(i) = i;
index 75a7b9a16dfe6dd491ed8ca5d4bfc342e83a78b3..ebe48b6efba9736816edd24b5e5604f1ea56faea 100644 (file)
@@ -39,9 +39,8 @@ test()
 
   // build the sparse matrix
   IndexSet indices = complete_index_set(N * N);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> matrix(indices,
-                                                             MPI_COMM_WORLD,
-                                                             5);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    matrix(indices, MPI_COMM_WORLD, 5);
   for (unsigned int i = 0; i < N; ++i)
     for (unsigned int j = 0; j < N; ++j)
       {
@@ -73,8 +72,10 @@ test()
   // then do a single matrix-vector
   // multiplication with subsequent formation
   // of the matrix norm
-  LinearAlgebra::TpetraWrappers::Vector<double> v1(indices, MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<double> v2(indices, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v1(
+    indices, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v2(
+    indices, MPI_COMM_WORLD);
   for (unsigned int i = 0; i < N * N; ++i)
     v1(i) = i;
   matrix.vmult(v2, v1);
index 79ca15c8243b055a5f56794f70976fed13197f76..93c2fe7bba159d1c2dbc76e877a9aa823ee5e083 100644 (file)
@@ -67,9 +67,8 @@ test()
 
   // build the sparse matrix
   IndexSet indices = complete_index_set(N * N);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> matrix(indices,
-                                                             MPI_COMM_WORLD,
-                                                             5);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    matrix(indices, MPI_COMM_WORLD, 5);
   for (unsigned int i_ = 0; i_ < N; ++i_)
     for (unsigned int j_ = 0; j_ < N; ++j_)
       {
@@ -104,8 +103,10 @@ test()
   // then do a single matrix-vector
   // multiplication with subsequent formation
   // of the matrix norm
-  LinearAlgebra::TpetraWrappers::Vector<double> v1(indices, MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<double> v2(indices, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v1(
+    indices, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v2(
+    indices, MPI_COMM_WORLD);
   for (unsigned int i = 0; i < N * N; ++i)
     v1(i) = i;
   matrix.vmult(v2, v1);
index d01a631773bc66a43b66da2aae4df146cfcf661a..8df7a82c48b50b4527358d5bc79f2f2b328d524f 100644 (file)
@@ -54,7 +54,8 @@ main(int argc, char **argv)
 
   // now copy everything into a Trilinos matrix
   const auto local_rows = complete_index_set(5);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> tmatrix;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    tmatrix;
   tmatrix.reinit(local_rows, local_rows, matrix, MPI_COMM_SELF);
 
   deallog << "Copy with all values:" << std::endl;
index d7bf2e22927507986d73f335150bff630f228c4c..c6585b17eaf4be0cb3be691f3c032ee62f33e835 100644 (file)
@@ -54,7 +54,8 @@ main(int argc, char **argv)
 
   // now copy everything into a Trilinos matrix
   const auto local_rows = complete_index_set(5);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> tmatrix;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    tmatrix;
   tmatrix.reinit(local_rows, local_rows, matrix, MPI_COMM_SELF, 4.);
 
   deallog << "Copy with a drop tolerance of 4:" << std::endl;
index 304762a628beca2c7ad30ad53ca64cb710d1efbd..3b600247aaf51324bf1ccd8de682ff7258a69085 100644 (file)
@@ -54,7 +54,8 @@ main(int argc, char **argv)
 
   // now copy everything into a Trilinos matrix
   const auto local_rows = complete_index_set(5);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> tmatrix;
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>
+    tmatrix;
   tmatrix.reinit(local_rows, local_rows, matrix, MPI_COMM_SELF, 0, false);
 
   deallog << "Copy structure only:" << std::endl;
index d64e1a96582cec539c8ab1107535180cc6f87220..86755ccba3e62efbd5565bbe68b38f7ea6d259e6 100644 (file)
@@ -54,8 +54,8 @@ test()
   // with reordered dofs by its components, such that the rows in the
   // final matrix are locally not in a contiguous set.
 
-  dealii::LinearAlgebra::TpetraWrappers::SparsityPattern sp_M(
-    parallel_partitioning, MPI_COMM_WORLD, 2);
+  dealii::LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default>
+    sp_M(parallel_partitioning, MPI_COMM_WORLD, 2);
 
   sp_M.add(MyPID, MyPID);
   sp_M.add(MyPID, NumProc + MyPID);
@@ -65,7 +65,9 @@ test()
   sp_M.compress();
 
   // create matrix with dummy entries on the diagonal
-  dealii::LinearAlgebra::TpetraWrappers::SparseMatrix<double> M0;
+  dealii::LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                      MemorySpace::Default>
+    M0;
   M0.reinit(sp_M);
   M0 = 0;
 
@@ -78,7 +80,9 @@ test()
   // test ::add(TrilinosScalar, SparseMatrix)
   //
 
-  dealii::LinearAlgebra::TpetraWrappers::SparseMatrix<double> M1;
+  dealii::LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                      MemorySpace::Default>
+    M1;
   M1.reinit(sp_M); // avoid deep copy
   M1 = 0;
   M1.copy_from(M0);
index 0657d1c22e3cb34b23f0bf1d04a87d96993e4c54..5bfa1ab68d509fca9a4bb2ba40fbc1dca9821e20 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 5U);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    5U, 5U, 5U);
   m.set(0, 0, 1);
   m.set(1, 1, 2);
   m.set(1, 2, 3);
   m.compress(VectorOperation::insert);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator i =
-    m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>::
+    const_iterator i = m.begin();
   deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
   ++i;
   deallog << i->row() << ' ' << i->column() << ' ' << i->value() << std::endl;
index 6f8ac7249a60c00184d0db66fdf8e886ffe9fc74..00aab2cb0dfa31f990281792a0b9fc749b4c7cfb 100644 (file)
@@ -29,7 +29,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
   // first set a few entries one-by-one
   for (unsigned int i = 0; i < m.m(); ++i)
@@ -39,9 +40,8 @@ test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
 
   m.compress(VectorOperation::insert);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m2(m.m(),
-                                                         m.n(),
-                                                         m.n() / 3 + 1);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m2(
+    m.m(), m.n(), m.n() / 3 + 1);
 
   // now set the same elements row-wise
   {
@@ -100,7 +100,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(5U, 5U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(5U, 5U, 3U);
         test(m);
       }
     }
index 0a294ebc7f67a99b756cc649b827f348f76a3467..a69d6a7c54c8f03ebc6f27c20fe3423149154967 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::SparseMatrix<double> &m)
+test(
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> &m)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m2(m.m(), m.n(), 3U);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m2(
+    m.m(), m.n(), 3U);
 
   // first set a few entries one-by-one and
   // initialize the sparsity pattern for m2
@@ -98,7 +100,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(16U, 16U, 3U);
+        LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                                    MemorySpace::Default>
+          m(16U, 16U, 3U);
         test(m);
       }
     }
index 21bb646b887a0b3b7f74a2ed1a88d2bbe104a4e4..7054b9332064f095b9ebb0727ea019f9bfc81197 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -76,9 +75,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 20382f5c847e5782d201d8aa37302bc061501c69..73bd4e118607fbff272c1d94490b64a47da538ed 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -76,9 +75,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 90e920f7f62af423f26b991a93c464fd6c9ea3bc..b19c9ae79eca30a458a50109782207b0aa64fc56 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -79,9 +78,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 5369704b5da6df575047d1f9751f5772c162b086..f99dfc872c7ec150a89a269114db6c25c91195b2 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -78,9 +77,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 2e57681848af5889255846635c3601743c35675c..b18a4a6aecb2bcdc649c6bd5c764f31f000b3b86 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -82,9 +81,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 62e3e079524394c5536b4dd59db2f1741a8ddeb8..5f5a54980cf8c0f2cdb9727aa7f6165562944558 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -74,7 +73,7 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(30), MPI_COMM_WORLD);
         test(v);
       }
index edaae70e3fbe19b16919f594b6887cd57db20830..3037c1bef2393798c83a3fe5cbe3092ad8415cda 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w,
-     LinearAlgebra::TpetraWrappers::Vector<double> &x)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &x)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.m(); ++j)
       m.set(i, j, i + 2 * j);
@@ -84,11 +83,11 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> x;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> x;
         x.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w, x);
       }
index 47e28b6b4b38710dae73240b603a15ff46161882..b0f1ab030154c1d93dad972f447bd3dc60135880 100644 (file)
@@ -30,9 +30,8 @@
 void
 test(Vector<double> &v, Vector<double> &w)
 {
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(w.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    w.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.n(); ++j)
       m.set(i, j, i + 2 * j);
index f77ec866471f19b5c366f143092fcf526ae05c0b..cce4fa75806c1c10801baccb2114d445cdf8965a 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   LinearAlgebra::ReadWriteVector<double> read_write_v(v.size());
   LinearAlgebra::ReadWriteVector<double> read_write_w(w.size());
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(w.size(),
-                                                        v.size(),
-                                                        v.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    w.size(), v.size(), v.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.n(); ++j)
       m.set(i, j, i + 2 * j);
@@ -91,10 +90,10 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v(complete_index_set(100),
-                                                        MPI_COMM_SELF);
-        LinearAlgebra::TpetraWrappers::Vector<double> w(complete_index_set(95),
-                                                        MPI_COMM_SELF);
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v(
+          complete_index_set(100), MPI_COMM_SELF);
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w(
+          complete_index_set(95), MPI_COMM_SELF);
         test(v, w);
       }
     }
index 4bb72978df12c2850ece1ced8fd7b1e695a7610f..b4227d294b722260cc0302afa6cf2f750bbf69c4 100644 (file)
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   LinearAlgebra::ReadWriteVector<double> read_write_v(v.size());
   LinearAlgebra::ReadWriteVector<double> read_write_w(w.size());
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(v.size(),
-                                                        w.size(),
-                                                        w.size());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    v.size(), w.size(), w.size());
   for (unsigned int i = 0; i < m.m(); ++i)
     for (unsigned int j = 0; j < m.n(); ++j)
       m.set(i, j, i + 2 * j);
@@ -90,10 +89,10 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v(complete_index_set(95),
-                                                        MPI_COMM_SELF);
-        LinearAlgebra::TpetraWrappers::Vector<double> w(complete_index_set(100),
-                                                        MPI_COMM_SELF);
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v(
+          complete_index_set(95), MPI_COMM_SELF);
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w(
+          complete_index_set(100), MPI_COMM_SELF);
         test(v, w);
       }
     }
index 3504607d32f56c9f9baeaafe4249ad699a124cd3..75d5895f8cd9692a1e36f665c6692646d15bfed8 100644 (file)
@@ -44,10 +44,10 @@ test()
     }
   parallel_partitioner_1.compress();
   parallel_partitioner_2.compress();
-  LinearAlgebra::TpetraWrappers::Vector<Number> a;
-  LinearAlgebra::TpetraWrappers::Vector<Number> b(parallel_partitioner_1,
-                                                  MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<Number> c(b);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> a;
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> b(
+    parallel_partitioner_1, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> c(b);
 
   AssertThrow(a.size() == 0, ExcMessage("Vector has the wrong size."));
   AssertThrow(b.size() == 10, ExcMessage("Vector has the wrong size."));
index 0072891a8188a79b76f11588584e65b640751c54..0a85342b8c2d6e77d63fa9f4236cda8fb5f1cbe0 100644 (file)
@@ -44,12 +44,12 @@ test()
     }
   parallel_partitioner_1.compress();
   parallel_partitioner_2.compress();
-  LinearAlgebra::TpetraWrappers::Vector<Number> a(parallel_partitioner_1,
-                                                  MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<Number> b(parallel_partitioner_1,
-                                                  MPI_COMM_WORLD);
-  LinearAlgebra::TpetraWrappers::Vector<Number> c(parallel_partitioner_2,
-                                                  MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> a(
+    parallel_partitioner_1, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> b(
+    parallel_partitioner_1, MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> c(
+    parallel_partitioner_2, MPI_COMM_WORLD);
 
   IndexSet read_write_index_set(10);
   if (rank == 0)
@@ -117,7 +117,7 @@ test()
     }
 
 
-  LinearAlgebra::TpetraWrappers::Vector<Number> d(a);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> d(a);
   a.add(2., b, 3., d);
   read_write_3.import_elements(a, VectorOperation::insert);
   if (rank == 0)
index 29d705f544512231cc9b594e02960f8a4b4c84f3..43eb2a0b062bee31e1b4880bd26c7615fd3ed172 100644 (file)
@@ -38,8 +38,8 @@ test()
   locally_owned.add_range(my_id * 2, my_id * 2 + 2);
   locally_owned.compress();
 
-  LinearAlgebra::TpetraWrappers::Vector<Number> v(locally_owned,
-                                                  MPI_COMM_WORLD);
+  LinearAlgebra::TpetraWrappers::Vector<Number, MemorySpace::Default> v(
+    locally_owned, MPI_COMM_WORLD);
 
   IndexSet     workaround_set(n_procs * 2);
   unsigned int my_first_index  = (my_id * 2 + 2) % (n_procs * 2);
index 9c167c52a6001e82e368cef5c44b1d434dc9133e..aeca86290111b925cea91e839fc80532e48c1534 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if ((i + 2 * j + 1) % 3 == 0)
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>                 m(sp);
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator i =
-    m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>::
+    const_iterator i = m.begin();
   deallog << i->value() << std::endl;
   ++i;
   deallog << i->value() << std::endl;
index 0d4020bd1ce527788db7006d55d1f87805bea7f8..6e97f5d75145378cfbffe0aea55d9d7cc801402a 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, i * j);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator i =
-    m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>::
+    const_iterator i = m.begin();
   for (; i != m.end(); ++i)
     {
       deallog << i->row() << ' ' << i->column() << ' ' << i->value()
index 4ef6c64c24762a2bb9337f2bafd6b4625fdbd854..bee0fe26164eef41d351ab78409a9b31fe0b5d71 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, i * j);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     {
       deallog << i->row() << ' ' << i->column() << ' ' << i->value()
index 60558dd2010a5d58939ce973bfe520fb0049dd3d..8d4badda1682491f919d730dfbd0c2ca65aee5bc 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     i->value() = i->row() * i->column();
   m.compress(VectorOperation::insert);
index 9470ad84f86231163a5e73bd655154ddac4e173a..20332c4f4f3ff56f6fc54e85336acc6827f46c54 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, 1.);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     i->value() += i->row() * i->column();
   m.compress(VectorOperation::insert);
index e05fbd2e1f2154b86c49c96b211aac41d3ac4f69..3b974dadb0727c87ee725adc9a7e9e081f1868d4 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, 1.);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     i->value() -= i->row() * i->column();
   m.compress(VectorOperation::insert);
index b1ab10382429ffe6f8f3fbed531c4669a064312a..465369b044aa06711ac0e392b50ded55eb135b3e 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, i * j);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     i->value() *= 2;
   m.compress(VectorOperation::insert);
index af5b5a58ea85079c346b525a784443fa48d2cde7..30a9ffb377ec651e224989a000b9ff2a777a3421 100644 (file)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::SparsityPattern sp(5, 5, 3);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sp(5,
+                                                                          5,
+                                                                          3);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         sp.add(i, j);
   sp.compress();
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> m(sp);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> m(
+    sp);
   for (unsigned int i = 0; i < 5; ++i)
     for (unsigned int j = 0; j < 5; ++j)
       if (((i + 2 * j + 1) % 3 == 0) || (i == j))
         m.set(i, j, i * j);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator i = m.begin();
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    i = m.begin();
   for (; i != m.end(); ++i)
     i->value() /= 2;
   m.compress(VectorOperation::insert);
index e5598b203a75c4ecd6a61a0dd79db9bcef74c0db..761d04f536570da05b1c7efac9c1ef8b38ba8741 100644 (file)
@@ -31,17 +31,20 @@ test()
   // create a sparsity pattern with totally
   // empty lines (not even diagonals, since
   // not quadratic)
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity(4, 5, 1);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity(
+    4, 5, 1);
   sparsity.add(1, 1);
   sparsity.add(3, 1);
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A(sparsity);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A(
+    sparsity);
 
   // and loop over the elements of it
-  for (LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator k =
-         A.begin();
+  for (LinearAlgebra::TpetraWrappers::
+         SparseMatrix<double, MemorySpace::Default>::const_iterator k =
+           A.begin();
        k != A.end();
        ++k)
     deallog << k->row() << ' ' << k->column() << ' ' << k->value() << std::endl;
index 5ced6a843f4e2330e22703910763fff335f5d16c..21f16b0dfed2318d71ce65dd45916259cf69e21e 100644 (file)
@@ -33,17 +33,20 @@ test()
   // create a sparsity pattern with totally
   // empty lines (not even diagonals, since
   // not quadratic)
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity(4, 5, 1);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity(
+    4, 5, 1);
   sparsity.add(1, 1);
   sparsity.add(3, 1);
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A(sparsity);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A(
+    sparsity);
 
   // and loop over the elements of it
-  for (LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator k =
-         A.begin();
+  for (LinearAlgebra::TpetraWrappers::
+         SparseMatrix<double, MemorySpace::Default>::const_iterator k =
+           A.begin();
        k != A.end();
        k++)
     deallog << k->row() << ' ' << k->column() << ' ' << k->value() << std::endl;
index 2ae83bda5784e0db84132dc7b3815b997154826b..ff77e782cd78897fb69528dc16fbd03594c41645 100644 (file)
@@ -30,17 +30,20 @@ test()
   // create a sparsity pattern with totally
   // empty lines (not even diagonals, since
   // not quadratic)
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity(4, 5, 1);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity(
+    4, 5, 1);
   sparsity.add(1, 1);
   sparsity.add(3, 1);
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A(sparsity);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A(
+    sparsity);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::iterator k = A.begin(),
-                                                                j = std::next(
-                                                                  A.begin());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double,
+                                              MemorySpace::Default>::iterator
+    k = A.begin(),
+    j = std::next(A.begin());
 
   AssertThrow(k < j, ExcInternalError());
   AssertThrow(j > k, ExcInternalError());
index f9bcb8ca1618de3b7e40e4dff6a78084ea739bd2..783267609371c8622dd902e30ab6dca13d9de7e3 100644 (file)
@@ -30,17 +30,19 @@ test()
   // create a sparsity pattern with totally
   // empty lines (not even diagonals, since
   // not quadratic)
-  LinearAlgebra::TpetraWrappers::SparsityPattern sparsity(4, 5, 1);
+  LinearAlgebra::TpetraWrappers::SparsityPattern<MemorySpace::Default> sparsity(
+    4, 5, 1);
   sparsity.add(1, 1);
   sparsity.add(3, 1);
   sparsity.compress();
 
   // attach a sparse matrix to it
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double> A(sparsity);
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default> A(
+    sparsity);
 
-  LinearAlgebra::TpetraWrappers::SparseMatrix<double>::const_iterator
-    k = A.begin(),
-    j = std::next(A.begin());
+  LinearAlgebra::TpetraWrappers::SparseMatrix<double, MemorySpace::Default>::
+    const_iterator k = A.begin(),
+                   j = std::next(A.begin());
 
   AssertThrow(k < j, ExcInternalError());
   AssertThrow(j > k, ExcInternalError());
index 43fa1cbaf8de4a9119f807c854990e3a19682891..f0e167e5e9bae04b6a90f66f6e60ac057cc3208e 100644 (file)
@@ -33,8 +33,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set the first vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -64,9 +64,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 9a25a63ccf66d16efb034cab1631618daaef44d8..c351417b8a160bc6ef8161e0658d20e5c3585ca3 100644 (file)
@@ -32,8 +32,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set the first vector
   for (unsigned int i = 0; i < v.size(); ++i)
@@ -63,9 +63,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 5b74a951b25eb8aba70f8f5c63738e77fbc9dadd..d2876eb6033628812fcff03195deb9af27a46236 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -59,9 +59,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index a7b43e2f9df9ebc8288b4cf16f0fbf0fdc96e99b..8b873db8f6519a1b383ef7b94970c81f4d8f8485 100644 (file)
@@ -29,8 +29,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -62,9 +62,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 0e189172f7328807ee5ec916e717d893e9d5659a..9226e1c98bbb6f397a94759c02308a141c2a8c1e 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -59,9 +59,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index e86fc1631896582bac4c7575a246f910637cb5a4..1b910c76c7252560804ed23594002d89d457b321 100644 (file)
@@ -28,8 +28,8 @@
 
 
 void
-test(LinearAlgebra::TpetraWrappers::Vector<double> &v,
-     LinearAlgebra::TpetraWrappers::Vector<double> &w)
+test(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v,
+     LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &w)
 {
   // set only certain elements of each
   // vector
@@ -61,9 +61,9 @@ main(int argc, char **argv)
   try
     {
       {
-        LinearAlgebra::TpetraWrappers::Vector<double> v;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
         v.reinit(complete_index_set(100), MPI_COMM_WORLD);
-        LinearAlgebra::TpetraWrappers::Vector<double> w;
+        LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
         w.reinit(complete_index_set(100), MPI_COMM_WORLD);
         test(v, w);
       }
index 27c67d6686dc77cd025c20f7418d6e7bafb1acc6..fbd7f8e46ce8a8c967795e7364ceb38e9fc721e6 100644 (file)
@@ -31,7 +31,7 @@
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::Vector<double> v;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
   v.reinit(complete_index_set(3), MPI_COMM_WORLD);
   v(0) = 0;
   v(1) = 1;
index 24af4e3c73db6fb459e3d31f4381a8ffde4d08b8..7a3f4387cc047e2b1353f065074e9483dd7e19b5 100644 (file)
@@ -58,7 +58,7 @@ test()
 
   IndexSet locally_owned_dofs = dof_handler.locally_owned_dofs();
 
-  LinearAlgebra::TpetraWrappers::Vector<double> vector_Re;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> vector_Re;
   vector_Re.reinit(locally_owned_dofs, mpi_communicator);
 
   deallog << "OK" << std::endl;
index 574b0deb7a7811f8110f4a71fe143792f2b39a5f..c7cad30baca537b9f8495508ba0e4cb9315a4d21 100644 (file)
@@ -28,7 +28,7 @@
 #include "../tests.h"
 
 void
-print(LinearAlgebra::TpetraWrappers::Vector<double> &v)
+print(LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> &v)
 {
   deallog << "size= " << v.size() << " el(0)= " << v(0)
           << " l2norm()= " << v.l2_norm() << std::endl;
@@ -38,11 +38,11 @@ print(LinearAlgebra::TpetraWrappers::Vector<double> &v)
 void
 test()
 {
-  LinearAlgebra::TpetraWrappers::Vector<double> v;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> v;
   v.reinit(complete_index_set(5), MPI_COMM_WORLD);
   for (unsigned int i = 0; i < v.size(); ++i)
     v(i) = 1;
-  LinearAlgebra::TpetraWrappers::Vector<double> w;
+  LinearAlgebra::TpetraWrappers::Vector<double, MemorySpace::Default> w;
   w.reinit(complete_index_set(9), MPI_COMM_WORLD);
   for (unsigned int i = 0; i < w.size(); ++i)
     w(i) = 2;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.