]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated parallel::CellWeights member functions 12329/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 27 May 2021 21:05:04 +0000 (17:05 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 27 May 2021 21:08:55 +0000 (17:08 -0400)
doc/news/changes/incompatibilities/20210527DanielArndt-1 [new file with mode: 0644]
include/deal.II/distributed/cell_weights.h
source/distributed/cell_weights.cc

diff --git a/doc/news/changes/incompatibilities/20210527DanielArndt-1 b/doc/news/changes/incompatibilities/20210527DanielArndt-1
new file mode 100644 (file)
index 0000000..ad790d5
--- /dev/null
@@ -0,0 +1,3 @@
+Removed: Deprecated parallel::CellWeights member functions have been removed.
+<br>
+(Daniel Arndt, 2021/05/27)
index a19ff4e2537bfa4ca29233fae3f1971cfef9a27e..7804dc0a6e6ab749738b5151d78fbd3cbdcac0cc 100644 (file)
@@ -186,97 +186,7 @@ namespace parallel
      * @}
      */
 
-    /**
-     * @name Deprecated functions
-     * @{
-     */
-
-    /**
-     * Constructor.
-     *
-     * @param[in] dof_handler The DoFHandler which will be used to
-     *    determine each cell's finite element.
-     */
-    DEAL_II_DEPRECATED
-    CellWeights(const dealii::DoFHandler<dim, spacedim> &dof_handler);
-
-    /**
-     * Choose a constant weight @p factor on each cell.
-     *
-     * @deprecated Use CellWeights::constant_weighting() instead.
-     */
-    DEAL_II_DEPRECATED void
-    register_constant_weighting(const unsigned int factor = 1000);
-
-    /**
-     * Choose a weight for each cell that is proportional to its number of
-     * degrees of freedom with a factor @p factor.
-     *
-     * @deprecated Use CellWeights::ndofs_weighting() instead.
-     */
-    DEAL_II_DEPRECATED void
-    register_ndofs_weighting(const unsigned int factor = 1000);
-
-    /**
-     * Choose a weight for each cell that is proportional to its number of
-     * degrees of freedom <i>squared</i> with a factor @p factor.
-     *
-     * @deprecated Use CellWeights::ndofs_weighting() instead.
-     */
-    DEAL_II_DEPRECATED void
-    register_ndofs_squared_weighting(const unsigned int factor = 1000);
-
-    /**
-     * Register a custom weight for each cell by providing a function as a
-     * parameter.
-     *
-     * @param[in] custom_function The custom weighting function returning
-     *    the weight of each cell as an unsigned integer. It is required
-     *    to have two arguments, namely the FiniteElement that will be
-     *    active on the particular cell, and the cell itself of type
-     *    DoFHandler::cell_iterator. We require both to make sure to
-     *    get the right active FiniteElement on each cell in case that we
-     *    coarsen the Triangulation.
-     */
-    DEAL_II_DEPRECATED void
-    register_custom_weighting(
-      const std::function<
-        unsigned int(const FiniteElement<dim, spacedim> &,
-                     const typename DoFHandler<dim, spacedim>::cell_iterator &)>
-        custom_function);
-
-    /**
-     * @}
-     */
-
   private:
-    /**
-     * @name Deprecated members
-     * @{
-     */
-
-    /**
-     * Pointer to the degree of freedom handler.
-     */
-    DEAL_II_DEPRECATED
-    SmartPointer<const dealii::DoFHandler<dim, spacedim>, CellWeights>
-      dof_handler;
-
-    /**
-     * Pointer to the Triangulation associated with the degree of freedom
-     * handler.
-     *
-     * We store both to make sure to always work on the correct combination of
-     * both.
-     */
-    DEAL_II_DEPRECATED
-    SmartPointer<const parallel::TriangulationBase<dim, spacedim>, CellWeights>
-      triangulation;
-
-    /**
-     * @}
-     */
-
     /**
      * A connection to the corresponding cell_weight signal of the Triangulation
      * which is attached to the DoFHandler.
index 51dff77f44ebd21383b9f19a7f46b5d9dd9cecb9..2218f2ee42301aa43926bfe65e45c066e7fc8bb8 100644 (file)
@@ -216,127 +216,6 @@ namespace parallel
     // Return the cell weight determined by the function of choice.
     return weighting_function(cell, dof_handler.get_fe(fe_index));
   }
-
-
-
-  // ---------- deprecated functions ----------
-
-  template <int dim, int spacedim>
-  CellWeights<dim, spacedim>::CellWeights(
-    const dealii::DoFHandler<dim, spacedim> &dof_handler)
-    : dof_handler(&dof_handler)
-    , triangulation(
-        dynamic_cast<const parallel::TriangulationBase<dim, spacedim> *>(
-          &(dof_handler.get_triangulation())))
-  {
-    Assert(
-      triangulation != nullptr,
-      ExcMessage(
-        "parallel::CellWeights requires a parallel::TriangulationBase object."));
-
-    register_constant_weighting();
-  }
-
-
-
-  template <int dim, int spacedim>
-  void
-  CellWeights<dim, spacedim>::register_constant_weighting(
-    const unsigned int factor)
-  {
-    connection.disconnect();
-
-    connection = triangulation->signals.cell_weight.connect(
-      [this,
-       factor](const typename Triangulation<dim, spacedim>::cell_iterator &cell,
-               const typename Triangulation<dim, spacedim>::CellStatus status)
-        -> unsigned int {
-        return this->weighting_callback(cell,
-                                        status,
-                                        std::cref(*(this->dof_handler)),
-                                        std::cref(*(this->triangulation)),
-                                        this->constant_weighting(factor));
-      });
-  }
-
-
-
-  template <int dim, int spacedim>
-  void
-  CellWeights<dim, spacedim>::register_ndofs_weighting(
-    const unsigned int factor)
-  {
-    connection.disconnect();
-
-    connection = triangulation->signals.cell_weight.connect(
-      [this,
-       factor](const typename Triangulation<dim, spacedim>::cell_iterator &cell,
-               const typename Triangulation<dim, spacedim>::CellStatus status)
-        -> unsigned int {
-        return this->weighting_callback(cell,
-                                        status,
-                                        std::cref(*(this->dof_handler)),
-                                        std::cref(*(this->triangulation)),
-                                        this->ndofs_weighting({factor, 1}));
-      });
-  }
-
-
-
-  template <int dim, int spacedim>
-  void
-  CellWeights<dim, spacedim>::register_ndofs_squared_weighting(
-    const unsigned int factor)
-  {
-    connection.disconnect();
-
-    connection = triangulation->signals.cell_weight.connect(
-      [this,
-       factor](const typename Triangulation<dim, spacedim>::cell_iterator &cell,
-               const typename Triangulation<dim, spacedim>::CellStatus status)
-        -> unsigned int {
-        return this->weighting_callback(cell,
-                                        status,
-                                        std::cref(*(this->dof_handler)),
-                                        std::cref(*(this->triangulation)),
-                                        this->ndofs_weighting({factor, 2}));
-      });
-  }
-
-
-
-  template <int dim, int spacedim>
-  void
-  CellWeights<dim, spacedim>::register_custom_weighting(
-    const std::function<
-      unsigned int(const FiniteElement<dim, spacedim> &,
-                   const typename DoFHandler<dim, spacedim>::cell_iterator &)>
-      custom_function)
-  {
-    connection.disconnect();
-
-    const std::function<
-      unsigned int(const typename DoFHandler<dim, spacedim>::cell_iterator &,
-                   const FiniteElement<dim, spacedim> &)>
-      converted_function =
-        [&custom_function](
-          const typename DoFHandler<dim, spacedim>::cell_iterator &cell,
-          const FiniteElement<dim, spacedim> &future_fe) -> unsigned int {
-      return custom_function(future_fe, cell);
-    };
-
-    connection = triangulation->signals.cell_weight.connect(
-      [this, converted_function](
-        const typename Triangulation<dim, spacedim>::cell_iterator &cell,
-        const typename Triangulation<dim, spacedim>::CellStatus     status)
-        -> unsigned int {
-        return this->weighting_callback(cell,
-                                        status,
-                                        std::cref(*(this->dof_handler)),
-                                        std::cref(*(this->triangulation)),
-                                        converted_function);
-      });
-  }
 } // namespace parallel
 
 

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.