From: Wolfgang Bangerth Date: Sat, 9 May 2015 03:36:20 +0000 (-0500) Subject: Minor cleanups. X-Git-Tag: v8.3.0-rc1~184^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca62de33a8afa6f21e589ef45af2bc5eef37f08f;p=dealii.git Minor cleanups. --- diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index b78abbb44d..c9b851f19c 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -7009,17 +7009,22 @@ namespace VectorTools } } - // move to deal.ii/base/numbers.h ? - namespace internal + namespace { template - void set_possibly_complex_number(Number &n, const double &r, const double &) + void set_possibly_complex_number(const double &r, + const double &, + Number &n) { n = r; } + + template - void set_possibly_complex_number(std::complex &n, const double &r, const double &i) + void set_possibly_complex_number(const double &r, + const double &i, + std::complex &n) { n = std::complex(r,i); } @@ -7083,7 +7088,8 @@ namespace VectorTools MPI_SUM, p_d_triangulation->get_communicator()); - internal::set_possibly_complex_number(mean,global_values[0],global_values[1]); + set_possibly_complex_number(global_values[0], global_values[1], + mean); area = global_values[2]; } #endif