From 9a51f8d8f92dbd09d4f66cd24df9302d92bf92a5 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 1 May 2020 00:02:52 +0200 Subject: [PATCH] Remove MeshWorker::CopyData::operator=(double) --- .../20200430Jean-PaulPelteret | 6 ++++ include/deal.II/meshworker/copy_data.h | 32 ------------------- 2 files changed, 6 insertions(+), 32 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20200430Jean-PaulPelteret diff --git a/doc/news/changes/incompatibilities/20200430Jean-PaulPelteret b/doc/news/changes/incompatibilities/20200430Jean-PaulPelteret new file mode 100644 index 0000000000..c867e5f34b --- /dev/null +++ b/doc/news/changes/incompatibilities/20200430Jean-PaulPelteret @@ -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. +
+(Jean-Paul Pelteret, 2020/04/30) diff --git a/include/deal.II/meshworker/copy_data.h b/include/deal.II/meshworker/copy_data.h index 866034034d..63ed18007f 100644 --- a/include/deal.II/meshworker/copy_data.h +++ b/include/deal.II/meshworker/copy_data.h @@ -71,19 +71,6 @@ namespace MeshWorker CopyData(const CopyData &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 - void - CopyData::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 -- 2.39.5