]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove deprecated LegacySignal. 15539/head
authorMarc Fehling <mafehling.git@gmail.com>
Sat, 17 Dec 2022 04:31:32 +0000 (21:31 -0700)
committerMarc Fehling <mafehling.git@gmail.com>
Tue, 27 Jun 2023 22:31:16 +0000 (16:31 -0600)
doc/news/changes/incompatibilities/20230627Fehling [new file with mode: 0644]
include/deal.II/grid/tria.h

diff --git a/doc/news/changes/incompatibilities/20230627Fehling b/doc/news/changes/incompatibilities/20230627Fehling
new file mode 100644 (file)
index 0000000..77ea5ad
--- /dev/null
@@ -0,0 +1,5 @@
+Removed: The deprecated signal Triangulation::Signals::cell_weight
+has been removed along with the deprecated class LegacySignal. Use
+Triangulation::Signals::weight instead.
+<br>
+(Marc Fehling, 2023/06/27)
index f0777fc82ffeae5dba6b52d5943256149836bd6b..cd10daeed10ccb60af09c3fb5803fca1e24a62d0 100644 (file)
@@ -2242,160 +2242,6 @@ public:
                             CellWeightSum<unsigned int>>
       weight;
 
-    /**
-     * Constructor.
-     *
-     * Connects a deprecated signal to its successor.
-     */
-    Signals()
-      : cell_weight(weight)
-    {}
-
-    /**
-     * Legacy signal emulation to deprecate the old signal.
-     */
-    class LegacySignal
-    {
-    public:
-      using signature_type = unsigned int(const cell_iterator &,
-                                          const CellStatus);
-      using combiner_type  = CellWeightSum<unsigned int>;
-
-      using slot_function_type = boost::function<signature_type>;
-      using slot_type =
-        boost::signals2::slot<signature_type, slot_function_type>;
-
-      /**
-       * Constructor.
-       */
-      LegacySignal(
-        boost::signals2::signal<signature_type, combiner_type> &new_signal)
-        : new_signal(new_signal)
-      {}
-
-      /**
-       * Destructor.
-       */
-      ~LegacySignal()
-      {
-        base_weight.disconnect();
-      }
-
-      /**
-       * Connects a function to the signal.
-       *
-       * Connects an additional base weight function if signal was previously
-       * empty.
-       */
-      DEAL_II_DEPRECATED
-      boost::signals2::connection
-      connect(
-        const slot_type &                 slot,
-        boost::signals2::connect_position position = boost::signals2::at_back)
-      {
-        if (base_weight.connected() == false)
-          {
-            base_weight = new_signal.connect(
-              [](const cell_iterator &, const CellStatus) -> unsigned int {
-                return 1000;
-              });
-            Assert(base_weight.connected() && new_signal.num_slots() == 1,
-                   ExcInternalError());
-          }
-
-        return new_signal.connect(slot, position);
-      }
-
-      /**
-       * Returns the number of connected functions <em>without</em> the base
-       * weight.
-       */
-      DEAL_II_DEPRECATED
-      std::size_t
-      num_slots() const
-      {
-        return new_signal.num_slots() -
-               static_cast<std::size_t>(base_weight.connected());
-      }
-
-      /**
-       * Checks if there are any connected functions to the signal.
-       */
-      DEAL_II_DEPRECATED
-      bool
-      empty() const
-      {
-        if (num_slots() == 0)
-          {
-            Assert(new_signal.num_slots() == 0, ExcInternalError());
-            return true;
-          }
-        return false;
-      }
-
-      /**
-       * Disconnects a function from the signal.
-       *
-       * Also disconnects the base weight function if it is the last connected
-       * function.
-       */
-      template <typename S>
-      DEAL_II_DEPRECATED void
-      disconnect(const S &connection)
-      {
-        new_signal.disconnect(connection);
-
-        if (num_slots() == 0)
-          {
-            Assert(base_weight.connected() && new_signal.num_slots() == 1,
-                   ExcInternalError());
-            new_signal.disconnect(base_weight);
-          }
-      }
-
-      /**
-       * Triggers the signal.
-       */
-      DEAL_II_DEPRECATED
-      unsigned int
-      operator()(const cell_iterator &iterator, const CellStatus status)
-      {
-        return new_signal(iterator, status);
-      }
-
-    private:
-      /**
-       * Monitors the connection of the base weight function.
-       */
-      boost::signals2::connection base_weight;
-
-      /**
-       * Reference to the successor signal.
-       */
-      boost::signals2::signal<signature_type, combiner_type> &new_signal;
-    };
-
-    /**
-     * @copydoc weight
-     *
-     * As a reference, a value of 1000 is added for every cell to the total
-     * weight. This means a signal return value of 1000 (resulting in a weight
-     * of 2000) means that it is twice as expensive for a process to handle this
-     * particular cell.
-     *
-     * @deprecated Use the `weight` signal instead which omits the base weight.
-     * You can invoke the old behavior by connecting a function to the signal
-     * that returns the base weight as follows. This function should be added
-     * <em>in addition</em> to the one that actually computes the weight.
-     * @code{.cc}
-     * triangulation.signals.weight.connect(
-     *   [](const typename Triangulation<dim>::cell_iterator &,
-     *      const typename Triangulation<dim>::CellStatus)
-     *     -> unsigned int { return 1000; });
-     * @endcode
-     */
-    LegacySignal cell_weight;
-
     /**
      * This signal is triggered at the beginning of execution of the
      * parallel::distributed::Triangulation::execute_coarsening_and_refinement()

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.