]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove MeshWorker::CopyData::operator=(double)
authorJean-Paul Pelteret <jppelteret@gmail.com>
Thu, 30 Apr 2020 22:02:52 +0000 (00:02 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 5 May 2020 20:12:11 +0000 (22:12 +0200)
doc/news/changes/incompatibilities/20200430Jean-PaulPelteret [new file with mode: 0644]
include/deal.II/meshworker/copy_data.h

diff --git a/doc/news/changes/incompatibilities/20200430Jean-PaulPelteret b/doc/news/changes/incompatibilities/20200430Jean-PaulPelteret
new file mode 100644 (file)
index 0000000..c867e5f
--- /dev/null
@@ -0,0 +1,6 @@
+Removed: The function `MeshWorker::CopyData::operator=(const double)` has been
+removed, as resetting the state of the `copier` from within a `boundary_worker`
+or `face_worker` is not permitted and can lead to hard to trace bugs within a
+user's code.
+<br>
+(Jean-Paul Pelteret, 2020/04/30)
index 866034034da35d03356fb64f541bf33a4aff8297..63ed18007f17d143352c4af0e846bd5e82c95806 100644 (file)
@@ -71,19 +71,6 @@ namespace MeshWorker
     CopyData(const CopyData<n_matrices, n_vectors, n_dof_indices> &other) =
       default;
 
-    /**
-     * Allow resetting of all elements of the struct to zero, by simply
-     * calling `(*this) = 0;`
-     *
-     * Notice that the only allowed number here is really `0`. Calling this
-     * function with any other number will trigger an assertion.
-     *
-     * The elements of the arrays of local degrees of freedom indices are
-     * all set to numbers::invalid_dof_index.
-     */
-    void
-    operator=(const double number);
-
     /**
      * An array of local matrices.
      */
@@ -136,25 +123,6 @@ namespace MeshWorker
       local_dof_indices[i].resize(dof_indices_sizes[i++]);
   }
 
-
-
-  template <int n_matrices, int n_vectors, int n_dof_indices>
-  void
-  CopyData<n_matrices, n_vectors, n_dof_indices>::operator=(const double number)
-  {
-    Assert(number == 0.0,
-           ExcMessage("You should only call this method with "
-                      "argument 0.0"));
-
-    for (auto &m : matrices)
-      m = number;
-    for (auto &v : vectors)
-      v = number;
-    for (auto &d : local_dof_indices)
-      for (auto &val : d)
-        val = numbers::invalid_dof_index;
-  }
-
 #endif // DOXYGEN
 } // namespace MeshWorker
 

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.