From: David Wells Date: Thu, 5 Oct 2017 20:32:09 +0000 (-0400) Subject: Prefer VectorType to VEC. X-Git-Tag: v9.0.0-rc1~990^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafdacb6bbc562c3e058bf8ec9434d122f6372c9;p=dealii.git Prefer VectorType to VEC. --- diff --git a/include/deal.II/lac/constraint_matrix.templates.h b/include/deal.II/lac/constraint_matrix.templates.h index 219f2e5cb7..458c793856 100644 --- a/include/deal.II/lac/constraint_matrix.templates.h +++ b/include/deal.II/lac/constraint_matrix.templates.h @@ -513,8 +513,10 @@ namespace internal { typedef types::global_dof_index size_type; - template - void set_zero_parallel(const std::vector &cm, VEC &vec, size_type shift = 0) + template + void set_zero_parallel(const std::vector &cm, + VectorType &vec, + size_type shift = 0) { Assert(!vec.has_ghost_elements(), ExcInternalError()); IndexSet locally_owned = vec.locally_owned_elements(); @@ -530,7 +532,7 @@ namespace internal continue; size_type idx = *it - shift; if (idx::set(0., idx, vec); + internal::ElementAccess::set(0., idx, vec); } } @@ -554,15 +556,19 @@ namespace internal vec.zero_out_ghosts(); } - template - void set_zero_in_parallel(const std::vector &cm, VEC &vec, std::integral_constant) + template + void set_zero_in_parallel(const std::vector &cm, + VectorType &vec, + std::integral_constant) { set_zero_parallel(cm, vec, 0); } // in parallel for BlockVectors - template - void set_zero_in_parallel(const std::vector &cm, VEC &vec, std::integral_constant) + template + void set_zero_in_parallel(const std::vector &cm, + VectorType &vec, + std::integral_constant) { size_type start_shift = 0; for (size_type j=0; j - void set_zero_serial(const std::vector &cm, VEC &vec) + template + void set_zero_serial(const std::vector &cm, + VectorType &vec) { for (typename std::vector::const_iterator it = cm.begin(); it != cm.end(); ++it) vec(*it) = 0.; } - template - void set_zero_all(const std::vector &cm, VEC &vec) + template + void set_zero_all(const std::vector &cm, + VectorType &vec) { - set_zero_in_parallel(cm, vec, std::integral_constant::value>()); + set_zero_in_parallel(cm, vec, std::integral_constant::value>()); vec.compress(VectorOperation::insert); }