From: Jean-Paul Pelteret Date: Sat, 30 Jan 2021 20:56:48 +0000 (+0100) Subject: Add const version of MeshWorker::ScratchData::get_general_data_storage() X-Git-Tag: v9.3.0-rc1~328^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=853517b9ceda24340dcd09d50c357c8834ff8c28;p=dealii.git Add const version of MeshWorker::ScratchData::get_general_data_storage() --- diff --git a/doc/news/changes/minor/20210313Jean-PaulPelteret b/doc/news/changes/minor/20210313Jean-PaulPelteret new file mode 100644 index 0000000000..2e9d92ffb5 --- /dev/null +++ b/doc/news/changes/minor/20210313Jean-PaulPelteret @@ -0,0 +1,5 @@ +Improved: The MeshWorker::ScratchData::get_general_data_storage() method now has +a `const` variant. +
+(Jean-Paul Pelteret, 2021/03/13) + diff --git a/include/deal.II/meshworker/scratch_data.h b/include/deal.II/meshworker/scratch_data.h index 2d7b3b5255..36c42ad360 100644 --- a/include/deal.II/meshworker/scratch_data.h +++ b/include/deal.II/meshworker/scratch_data.h @@ -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 */ diff --git a/source/meshworker/scratch_data.cc b/source/meshworker/scratch_data.cc index 85f3ed4f6d..de34ac5312 100644 --- a/source/meshworker/scratch_data.cc +++ b/source/meshworker/scratch_data.cc @@ -375,6 +375,15 @@ namespace MeshWorker + template + const GeneralDataStorage & + ScratchData::get_general_data_storage() const + { + return user_data_storage; + } + + + template const Mapping & ScratchData::get_mapping() const