From be8a5353f632c2d87546f5c284523ebd44eec49a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 5 Oct 2017 13:17:11 -0600 Subject: [PATCH] Entirely avoid memory allocation in two places. --- include/deal.II/numerics/vector_tools.templates.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index a4bf302661..ada229938a 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -136,7 +136,7 @@ namespace VectorTools auto shifted_view = boost::make_iterator_range( std::begin(function_values[i]) + offset, std::begin(function_values[i]) + offset + dim); - std::vector old_value(dim); + std::array old_value; std::copy(std::begin(shifted_view), std::end(shifted_view), std::begin(old_value)); @@ -164,7 +164,7 @@ namespace VectorTools auto shifted_view = boost::make_iterator_range( std::begin(function_values[i]) + offset, std::begin(function_values[i]) + offset + dim); - std::vector old_value(dim); + std::array old_value; std::copy(std::begin(shifted_view), std::end(shifted_view), std::begin(old_value)); -- 2.39.5