From: Daniel Arndt Date: Thu, 5 Sep 2019 20:14:21 +0000 (-0400) Subject: Fix undefined references for set_zero_all X-Git-Tag: v9.2.0-rc1~1135^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=577950151ad8b3572811a0065328e89d2ea6816f;p=dealii.git Fix undefined references for set_zero_all --- diff --git a/include/deal.II/lac/la_vector.h b/include/deal.II/lac/la_vector.h index 66e8f57e82..6bb3a3bfdd 100644 --- a/include/deal.II/lac/la_vector.h +++ b/include/deal.II/lac/la_vector.h @@ -160,6 +160,15 @@ namespace LinearAlgebra reinit(const VectorSpaceVector &V, const bool omit_zeroing_entries = false) override; + /** + * Returns `false` as this is a serial vector. + * + * This functionality only needs to be called if using MPI based vectors and + * exists in other objects for compatibility. + */ + bool + has_ghost_elements() const; + /** * Copies the data of the input vector @p in_vector. */ @@ -508,6 +517,21 @@ template struct is_serial_vector> : std::true_type {}; +#ifndef DOXYGEN +/*----------------------- Inline functions ----------------------------------*/ + +namespace LinearAlgebra +{ + template + inline bool + Vector::has_ghost_elements() const + { + return false; + } +} // namespace LinearAlgebra + +#endif + DEAL_II_NAMESPACE_CLOSE diff --git a/source/lac/affine_constraints.cu b/source/lac/affine_constraints.cu index c686dc4fb2..8b79fe6d61 100644 --- a/source/lac/affine_constraints.cu +++ b/source/lac/affine_constraints.cu @@ -17,6 +17,23 @@ DEAL_II_NAMESPACE_OPEN + +namespace internal +{ + namespace AffineConstraintsImplementation + { + template void + set_zero_all( + const std::vector & cm, + LinearAlgebra::distributed::Vector &vec); + + template void + set_zero_all( + const std::vector & cm, + LinearAlgebra::distributed::Vector &vec); + } // namespace AffineConstraintsImplementation +} // namespace internal + template void AffineConstraints::set_zero< LinearAlgebra::distributed::Vector>( diff --git a/source/lac/affine_constraints.inst.in b/source/lac/affine_constraints.inst.in index 4523cad087..bb0d4f5b42 100644 --- a/source/lac/affine_constraints.inst.in +++ b/source/lac/affine_constraints.inst.in @@ -345,3 +345,16 @@ for (T : DEAL_II_VEC_TEMPLATES) template void dealii::AffineConstraints::distribute>( T &) const; } + + +for (T : VECTOR_TYPES) + { + namespace internal + { + namespace AffineConstraintsImplementation + { + template void + set_zero_all(const std::vector &, T &vec); + \} + \} + }