]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated parallel::distributed::CellDataTransfer::CoarseningStrategies
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 25 May 2021 15:44:11 +0000 (11:44 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 25 May 2021 16:26:19 +0000 (12:26 -0400)
doc/news/changes/incompatibilities/20210525DanielArndt [new file with mode: 0644]
include/deal.II/distributed/cell_data_transfer.h
include/deal.II/distributed/cell_data_transfer.templates.h

diff --git a/doc/news/changes/incompatibilities/20210525DanielArndt b/doc/news/changes/incompatibilities/20210525DanielArndt
new file mode 100644 (file)
index 0000000..e5713b9
--- /dev/null
@@ -0,0 +1,5 @@
+Removed the deprecated 
+parallel::distributed::CellDataTransfer::CoarseningStrategies
+use AdaptationStrategies::Coarsening instead.
+<br>
+(Daniel Arndt, 2021/05/25)
index 9198c2d48628961a3428bf8cdbfff9f7b24e94f7..115ff2edaddbc90d83e605549880b72bc2750560 100644 (file)
@@ -133,77 +133,6 @@ namespace parallel
       using value_type = typename VectorType::value_type;
 
     public:
-      /**
-       * When data is transferred during coarsening, it is not trivial to decide
-       * how to handle data of child cells which will be coarsened. Or in other
-       * words, which data should be stored in the corresponding parent cell.
-       *
-       * In this struct, we offer a few strategies that cope with this
-       * problem. Such strategies can be passed to the CellDataTransfer and
-       * parallel::distributed::CellDataTransfer constructors.
-       *
-       * @deprecated Use the namespace dealii::AdaptationStrategies::Coarsening instead.
-       */
-      struct DEAL_II_DEPRECATED CoarseningStrategies
-      {
-        /**
-         * @copydoc dealii::AdaptationStrategies::Coarsening::check_equality()
-         *
-         * @deprecated Use dealii::AdaptationStrategies::Coarsening::check_equality() instead.
-         */
-        DEAL_II_DEPRECATED static typename VectorType::value_type
-        check_equality(const typename parallel::distributed::
-                         Triangulation<dim, spacedim>::cell_iterator &parent,
-                       const VectorType &input_vector)
-        {
-          const typename VectorType::value_type value =
-            input_vector[parent->child(0)->active_cell_index()];
-
-          for (unsigned int child_index = 1; child_index < parent->n_children();
-               ++child_index)
-            Assert(
-              value ==
-                input_vector[parent->child(child_index)->active_cell_index()],
-              ExcMessage(
-                "Values on cells that will be coarsened are not equal!"));
-
-          return value;
-        }
-
-        /**
-         * @copydoc dealii::AdaptationStrategies::Coarsening::sum()
-         *
-         * @deprecated Use dealii::AdaptationStrategies::Coarsening::sum() instead.
-         */
-        DEAL_II_DEPRECATED static typename VectorType::value_type
-        sum(const typename parallel::distributed::Triangulation<dim, spacedim>::
-              cell_iterator & parent,
-            const VectorType &input_vector)
-        {
-          typename VectorType::value_type sum = 0;
-
-          for (unsigned int child_index = 0; child_index < parent->n_children();
-               ++child_index)
-            sum +=
-              input_vector[parent->child(child_index)->active_cell_index()];
-
-          return sum;
-        }
-
-        /**
-         * @copydoc dealii::AdaptationStrategies::Coarsening::mean()
-         *
-         * @deprecated Use dealii::AdaptationStrategies::Coarsening::mean() instead.
-         */
-        DEAL_II_DEPRECATED static typename VectorType::value_type
-        mean(const typename parallel::distributed::
-               Triangulation<dim, spacedim>::cell_iterator &parent,
-             const VectorType &                             input_vector)
-        {
-          return sum(parent, input_vector) / parent->n_children();
-        }
-      };
-
       /**
        * Constructor.
        *
@@ -236,30 +165,6 @@ namespace parallel
           &dealii::AdaptationStrategies::Coarsening::
             check_equality<dim, spacedim, value_type>);
 
-      /**
-       * Constructor.
-       *
-       * @param[in] triangulation The triangulation on which all operations will
-       *   happen. At the time when this constructor is called, the refinement
-       *   in question has not happened yet.
-       * @param[in] transfer_variable_size_data Specify whether your VectorType
-       *   container stores values that differ in size. A varying amount of data
-       *   may be packed per cell, if for example the underlying ValueType of
-       *   the VectorType container is a container itself.
-       * @param[in] coarsening_strategy %Function deciding which data to store
-       *   on a cell whose children will get coarsened into.
-       *
-       * @deprecated Use the above constructor instead.
-       */
-      DEAL_II_DEPRECATED
-      CellDataTransfer(const parallel::distributed::Triangulation<dim, spacedim>
-                         &        triangulation,
-                       const bool transfer_variable_size_data,
-                       const std::function<value_type(
-                         const typename parallel::distributed::
-                           Triangulation<dim, spacedim>::cell_iterator &parent,
-                         const VectorType &input_vector)> coarsening_strategy);
-
       /**
        * Prepare the current object for coarsening and refinement.
        *
index 260d97a8e54fa8c9e4bb6bdf9088e01adeaff9e4..5b4b82eabc207283ce48ce20b8a9e352e2f75ff6 100644 (file)
@@ -89,56 +89,6 @@ namespace parallel
       , handle(numbers::invalid_unsigned_int)
     {}
 
-    template <int dim, int spacedim, typename VectorType>
-    DEAL_II_DEPRECATED
-    CellDataTransfer<dim, spacedim, VectorType>::CellDataTransfer(
-      const parallel::distributed::Triangulation<dim, spacedim> &triangulation,
-      const bool transfer_variable_size_data,
-      const std::function<
-        value_type(const typename parallel::distributed::
-                     Triangulation<dim, spacedim>::cell_iterator &parent,
-                   const VectorType &input_vector)> coarsening_strategy)
-      : triangulation(&triangulation, typeid(*this).name())
-      , transfer_variable_size_data(transfer_variable_size_data)
-      , refinement_strategy(&dealii::AdaptationStrategies::Refinement::
-                              preserve<dim, spacedim, value_type>)
-      , handle(numbers::invalid_unsigned_int)
-    {
-      value_type (*const *old_strategy)(
-        const typename parallel::distributed::Triangulation<dim, spacedim>::
-          cell_iterator &,
-        const VectorType &) =
-        coarsening_strategy.template target<
-          value_type (*)(const typename parallel::distributed::
-                           Triangulation<dim, spacedim>::cell_iterator &,
-                         const VectorType &)>();
-
-      if (*old_strategy == CoarseningStrategies::check_equality)
-        const_cast<std::function<value_type(
-          const typename dealii::Triangulation<dim, spacedim>::cell_iterator &,
-          const std::vector<value_type> &)> &>(this->coarsening_strategy) =
-          &dealii::AdaptationStrategies::Coarsening::
-            check_equality<dim, spacedim, value_type>;
-      else if (*old_strategy == CoarseningStrategies::sum)
-        const_cast<std::function<value_type(
-          const typename dealii::Triangulation<dim, spacedim>::cell_iterator &,
-          const std::vector<value_type> &)> &>(this->coarsening_strategy) =
-          &dealii::AdaptationStrategies::Coarsening::
-            sum<dim, spacedim, value_type>;
-      else if (*old_strategy == CoarseningStrategies::mean)
-        const_cast<std::function<value_type(
-          const typename dealii::Triangulation<dim, spacedim>::cell_iterator &,
-          const std::vector<value_type> &)> &>(this->coarsening_strategy) =
-          &dealii::AdaptationStrategies::Coarsening::
-            mean<dim, spacedim, value_type>;
-      else
-        Assert(
-          false,
-          ExcMessage(
-            "The constructor using the former function type of the "
-            "coarsening_strategy parameter is no longer supported. Please use "
-            "the latest function type instead"));
-    }
 
 
     // Interface for packing

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.