From: Jean-Paul Pelteret Date: Thu, 30 Apr 2020 22:02:52 +0000 (+0200) Subject: Remove MeshWorker::CopyData::operator=(double) X-Git-Tag: v9.2.0-rc1~123^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a51f8d8f92dbd09d4f66cd24df9302d92bf92a5;p=dealii.git Remove MeshWorker::CopyData::operator=(double) --- 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