From: Wolfgang Bangerth Date: Thu, 5 Oct 2017 19:17:11 +0000 (-0600) Subject: Entirely avoid memory allocation in two places. X-Git-Tag: v9.0.0-rc1~993^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be8a5353f632c2d87546f5c284523ebd44eec49a;p=dealii.git Entirely avoid memory allocation in two places. --- 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));