]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add const version of MeshWorker::ScratchData::get_general_data_storage() 11897/head
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 30 Jan 2021 20:56:48 +0000 (21:56 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sat, 13 Mar 2021 12:38:00 +0000 (13:38 +0100)
doc/news/changes/minor/20210313Jean-PaulPelteret [new file with mode: 0644]
include/deal.II/meshworker/scratch_data.h
source/meshworker/scratch_data.cc

diff --git a/doc/news/changes/minor/20210313Jean-PaulPelteret b/doc/news/changes/minor/20210313Jean-PaulPelteret
new file mode 100644 (file)
index 0000000..2e9d92f
--- /dev/null
@@ -0,0 +1,5 @@
+Improved: The MeshWorker::ScratchData::get_general_data_storage() method now has
+a `const` variant.
+<br>
+(Jean-Paul Pelteret, 2021/03/13)
+
index 2d7b3b5255274beca6e732a746cf3b39fe829078..36c42ad36096f74985439c869e126506633b3291 100644 (file)
@@ -523,6 +523,14 @@ namespace MeshWorker
     GeneralDataStorage &
     get_general_data_storage();
 
+    /**
+     * Return a GeneralDataStorage object that can be used to store any amount
+     * of data, of any type, which is then made accessible by an identifier
+     * string.
+     */
+    const GeneralDataStorage &
+    get_general_data_storage() const;
+
     /**
      * @name Evaluation of finite element fields and their derivatives on the current cell
      */
index 85f3ed4f6d3c38d834891f64578e3775b406e045..de34ac531242b355fbcd257576a01f244e2d3fb7 100644 (file)
@@ -375,6 +375,15 @@ namespace MeshWorker
 
 
 
+  template <int dim, int spacedim>
+  const GeneralDataStorage &
+  ScratchData<dim, spacedim>::get_general_data_storage() const
+  {
+    return user_data_storage;
+  }
+
+
+
   template <int dim, int spacedim>
   const Mapping<dim, spacedim> &
   ScratchData<dim, spacedim>::get_mapping() const

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.