]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix undefined references for set_zero_all
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 5 Sep 2019 20:14:21 +0000 (16:14 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 5 Sep 2019 22:41:34 +0000 (18:41 -0400)
include/deal.II/lac/la_vector.h
source/lac/affine_constraints.cu
source/lac/affine_constraints.inst.in

index 66e8f57e82d81a1cd9e9dd86f23f3e9bec65bcf6..6bb3a3bfdd919a0c9e263f328c43b4ee85a7f50b 100644 (file)
@@ -160,6 +160,15 @@ namespace LinearAlgebra
     reinit(const VectorSpaceVector<Number> &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 <typename Number>
 struct is_serial_vector<LinearAlgebra::Vector<Number>> : std::true_type
 {};
 
+#ifndef DOXYGEN
+/*----------------------- Inline functions ----------------------------------*/
+
+namespace LinearAlgebra
+{
+  template <typename Number>
+  inline bool
+  Vector<Number>::has_ghost_elements() const
+  {
+    return false;
+  }
+} // namespace LinearAlgebra
+
+#endif
+
 
 DEAL_II_NAMESPACE_CLOSE
 
index c686dc4fb2705abfe56588ec6a8c337645af8a9a..8b79fe6d616598c1b253fcf42df36b0d463902ea 100644 (file)
 
 DEAL_II_NAMESPACE_OPEN
 
+
+namespace internal
+{
+  namespace AffineConstraintsImplementation
+  {
+    template void
+    set_zero_all(
+      const std::vector<types::global_dof_index> &                  cm,
+      LinearAlgebra::distributed::Vector<float, MemorySpace::CUDA> &vec);
+
+    template void
+    set_zero_all(
+      const std::vector<types::global_dof_index> &                   cm,
+      LinearAlgebra::distributed::Vector<double, MemorySpace::CUDA> &vec);
+  } // namespace AffineConstraintsImplementation
+} // namespace internal
+
 template void
 AffineConstraints<float>::set_zero<
   LinearAlgebra::distributed::Vector<float, MemorySpace::CUDA>>(
index 4523cad087ba1cab7335d61d5c5049bc86e105c6..bb0d4f5b42dd260a5849fa08fdf18323348c9b96 100644 (file)
@@ -345,3 +345,16 @@ for (T : DEAL_II_VEC_TEMPLATES)
     template void dealii::AffineConstraints<double>::distribute<T<float>>(
       T<float> &) const;
   }
+
+
+for (T : VECTOR_TYPES)
+  {
+    namespace internal
+    {
+      namespace AffineConstraintsImplementation
+      {
+        template void
+        set_zero_all(const std::vector<types::global_dof_index> &, T &vec);
+      \}
+    \}
+  }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.