]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Excise remaining calls to VectorSlice.
authorDavid Wells <drwells@email.unc.edu>
Mon, 11 Mar 2019 19:32:21 +0000 (15:32 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 11 Mar 2019 19:39:12 +0000 (15:39 -0400)
include/deal.II/meshworker/vector_selector.templates.h
source/lac/chunk_sparsity_pattern.cc
source/lac/sparsity_pattern.cc

index 1efeaa4852ea2ec87d20a72023812129b6e8459b..acf92bac61b471040354babbe00ba5fd6d1ba7ef 100644 (file)
@@ -132,21 +132,21 @@ namespace MeshWorker
     for (unsigned int i = 0; i < this->n_values(); ++i)
       {
         const VectorType *src = data.read_ptr<VectorType>(this->value_index(i));
-        VectorSlice<std::vector<std::vector<typename VectorType::value_type>>>
-          dst(values[i], component, n_comp);
-        fe.get_function_values(*src, make_slice(index, start, size), dst, true);
+        fe.get_function_values(*src,
+                               make_array_view(index, start, size),
+                               make_array_view(values[i], component, n_comp),
+                               true);
       }
 
     for (unsigned int i = 0; i < this->n_gradients(); ++i)
       {
         const VectorType *src =
           data.read_ptr<VectorType>(this->gradient_index(i));
-        VectorSlice<std::vector<
-          std::vector<Tensor<1, spacedim, typename VectorType::value_type>>>>
-          dst(gradients[i], component, n_comp);
         fe.get_function_gradients(*src,
-                                  make_slice(index, start, size),
-                                  dst,
+                                  make_array_view(index, start, size),
+                                  make_array_view(gradients[i],
+                                                  component,
+                                                  n_comp),
                                   true);
       }
 
@@ -154,12 +154,11 @@ namespace MeshWorker
       {
         const VectorType *src =
           data.read_ptr<VectorType>(this->hessian_index(i));
-        VectorSlice<std::vector<
-          std::vector<Tensor<2, spacedim, typename VectorType::value_type>>>>
-          dst(hessians[i], component, n_comp);
         fe.get_function_hessians(*src,
-                                 make_slice(index, start, size),
-                                 dst,
+                                 make_array_view(index, start, size),
+                                 make_array_view(hessians[i],
+                                                 component,
+                                                 n_comp),
                                  true);
       }
   }
@@ -233,11 +232,9 @@ namespace MeshWorker
       {
         const MGLevelObject<VectorType> *src =
           data.read_ptr<MGLevelObject<VectorType>>(this->value_index(i));
-        VectorSlice<std::vector<std::vector<typename VectorType::value_type>>>
-          dst(values[i], component, n_comp);
         fe.get_function_values((*src)[level],
-                               make_slice(index, start, size),
-                               dst,
+                               make_array_view(index, start, size),
+                               make_array_view(values[i], component, n_comp),
                                true);
       }
 
@@ -245,12 +242,11 @@ namespace MeshWorker
       {
         const MGLevelObject<VectorType> *src =
           data.read_ptr<MGLevelObject<VectorType>>(this->value_index(i));
-        VectorSlice<std::vector<
-          std::vector<Tensor<1, spacedim, typename VectorType::value_type>>>>
-          dst(gradients[i], component, n_comp);
         fe.get_function_gradients((*src)[level],
-                                  make_slice(index, start, size),
-                                  dst,
+                                  make_array_view(index, start, size),
+                                  make_array_view(gradients[i],
+                                                  component,
+                                                  n_comp),
                                   true);
       }
 
@@ -258,12 +254,11 @@ namespace MeshWorker
       {
         const MGLevelObject<VectorType> *src =
           data.read_ptr<MGLevelObject<VectorType>>(this->value_index(i));
-        VectorSlice<std::vector<
-          std::vector<Tensor<2, spacedim, typename VectorType::value_type>>>>
-          dst(hessians[i], component, n_comp);
         fe.get_function_hessians((*src)[level],
-                                 make_slice(index, start, size),
-                                 dst,
+                                 make_array_view(index, start, size),
+                                 make_array_view(hessians[i],
+                                                 component,
+                                                 n_comp),
                                  true);
       }
   }
index db9cc4bbe47bc9531ea1c114d6fba919bbb14a82..836c5077e393721ac8876b8fc929cc82662f7f0b 100644 (file)
@@ -264,7 +264,7 @@ ChunkSparsityPattern::reinit(const size_type               m,
 {
   Assert(chunk_size > 0, ExcInvalidNumber(chunk_size));
 
-  reinit(m, n, make_slice(row_lengths), chunk_size);
+  reinit(m, n, make_array_view(row_lengths), chunk_size);
 }
 
 
index 2eb565a4542dcf09635dee41ee2ed21bfcf91fb9..0e747a27c1a05564366ee8eea236b62a5a9b4fa2 100644 (file)
@@ -605,7 +605,7 @@ SparsityPattern::reinit(const size_type                  m,
                         const size_type                  n,
                         const std::vector<unsigned int> &row_lengths)
 {
-  reinit(m, n, make_slice(row_lengths));
+  reinit(m, n, make_array_view(row_lengths));
 }
 
 

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.