From: Denis Davydov Date: Tue, 12 Jun 2018 14:21:45 +0000 (+0200) Subject: return from reset_ghost_values() immediately if exchanger.ghosts_were_set == true X-Git-Tag: v9.1.0-rc1~1045^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f87c9a6b2f057faf546083a65f231b1e44a5be3;p=dealii.git return from reset_ghost_values() immediately if exchanger.ghosts_were_set == true --- diff --git a/include/deal.II/matrix_free/matrix_free.h b/include/deal.II/matrix_free/matrix_free.h index 337069426b..154c9a6b4e 100644 --- a/include/deal.II/matrix_free/matrix_free.h +++ b/include/deal.II/matrix_free/matrix_free.h @@ -3151,6 +3151,10 @@ namespace internal reset_ghost_values(const std::vector &vec, VectorDataExchange &exchanger) { + // return immediately if there is nothing to do. + if (exchanger.ghosts_were_set == true) + return; + for (unsigned int comp = 0; comp < vec.size(); comp++) reset_ghost_values(vec[comp], exchanger); } @@ -3162,6 +3166,10 @@ namespace internal reset_ghost_values(const std::vector &vec, VectorDataExchange & exchanger) { + // return immediately if there is nothing to do. + if (exchanger.ghosts_were_set == true) + return; + for (unsigned int comp = 0; comp < vec.size(); comp++) reset_ghost_values(*vec[comp], exchanger); } @@ -3174,6 +3182,10 @@ namespace internal std::integral_constant, VectorDataExchange &exchanger) { + // return immediately if there is nothing to do. + if (exchanger.ghosts_were_set == true) + return; + for (unsigned int i = 0; i < vec.n_blocks(); ++i) reset_ghost_values(vec.block(i), exchanger); }