]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add MGTransferGlobalCoarsening::interpolate_to_mg() that does not take DoFHandler 12858/head
authorPeter Munch <peterrmuench@gmail.com>
Thu, 21 Oct 2021 17:33:46 +0000 (19:33 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Thu, 21 Oct 2021 19:52:35 +0000 (21:52 +0200)
include/deal.II/multigrid/mg_transfer_global_coarsening.h

index 11ec8da08b00ec14472ade9b6166eefd9c6f2e40..a9bdbfc5c88ca260ff2214183d0cffe4d9beee9e 100644 (file)
@@ -525,8 +525,16 @@ public:
    *
    * If an inner vector of @p dst is empty or has incorrect locally owned size,
    * it will be resized to locally relevant degrees of freedom on each level.
-   *
-   * @note DoFHandler is not needed here, but is required by the interface.
+   */
+  template <class InVector, int spacedim>
+  void
+  interpolate_to_mg(MGLevelObject<VectorType> &dst, const InVector &src) const;
+
+  /**
+   * Like the above function but with a user-provided DoFHandler as
+   * additional argument. However, this DoFHandler is not used internally, but
+   * is required to be able to use MGTransferGlobalCoarsening and
+   * MGTransferMatrixFree as template argument.
    */
   template <class InVector, int spacedim>
   void
@@ -661,12 +669,9 @@ template <int dim, typename VectorType>
 template <class InVector, int spacedim>
 void
 MGTransferGlobalCoarsening<dim, VectorType>::interpolate_to_mg(
-  const DoFHandler<dim, spacedim> &dof_handler,
-  MGLevelObject<VectorType> &      dst,
-  const InVector &                 src) const
+  MGLevelObject<VectorType> &dst,
+  const InVector &           src) const
 {
-  (void)dof_handler;
-
   Assert(
     initialize_dof_vector,
     ExcMessage(
@@ -691,6 +696,21 @@ MGTransferGlobalCoarsening<dim, VectorType>::interpolate_to_mg(
 
 
 
+template <int dim, typename VectorType>
+template <class InVector, int spacedim>
+void
+MGTransferGlobalCoarsening<dim, VectorType>::interpolate_to_mg(
+  const DoFHandler<dim, spacedim> &dof_handler,
+  MGLevelObject<VectorType> &      dst,
+  const InVector &                 src) const
+{
+  (void)dof_handler;
+
+  this->interpolate_to_mg(dst, src);
+}
+
+
+
 template <int dim, typename VectorType>
 std::size_t
 MGTransferGlobalCoarsening<dim, VectorType>::memory_consumption() const

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.