From d21b2a9064356332ad81f905ae54d42f84b51ce6 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 11 Mar 2019 15:32:21 -0400 Subject: [PATCH] Excise remaining calls to VectorSlice. --- .../meshworker/vector_selector.templates.h | 49 +++++++++---------- source/lac/chunk_sparsity_pattern.cc | 2 +- source/lac/sparsity_pattern.cc | 2 +- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/include/deal.II/meshworker/vector_selector.templates.h b/include/deal.II/meshworker/vector_selector.templates.h index 1efeaa4852..acf92bac61 100644 --- a/include/deal.II/meshworker/vector_selector.templates.h +++ b/include/deal.II/meshworker/vector_selector.templates.h @@ -132,21 +132,21 @@ namespace MeshWorker for (unsigned int i = 0; i < this->n_values(); ++i) { const VectorType *src = data.read_ptr(this->value_index(i)); - VectorSlice>> - 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(this->gradient_index(i)); - VectorSlice>>> - 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(this->hessian_index(i)); - VectorSlice>>> - 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 *src = data.read_ptr>(this->value_index(i)); - VectorSlice>> - 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 *src = data.read_ptr>(this->value_index(i)); - VectorSlice>>> - 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 *src = data.read_ptr>(this->value_index(i)); - VectorSlice>>> - 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); } } diff --git a/source/lac/chunk_sparsity_pattern.cc b/source/lac/chunk_sparsity_pattern.cc index db9cc4bbe4..836c5077e3 100644 --- a/source/lac/chunk_sparsity_pattern.cc +++ b/source/lac/chunk_sparsity_pattern.cc @@ -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); } diff --git a/source/lac/sparsity_pattern.cc b/source/lac/sparsity_pattern.cc index 2eb565a454..0e747a27c1 100644 --- a/source/lac/sparsity_pattern.cc +++ b/source/lac/sparsity_pattern.cc @@ -605,7 +605,7 @@ SparsityPattern::reinit(const size_type m, const size_type n, const std::vector &row_lengths) { - reinit(m, n, make_slice(row_lengths)); + reinit(m, n, make_array_view(row_lengths)); } -- 2.39.5