From 031eb51ab08fcecd492a10cb1c57c809c6817dca Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 29 Mar 2018 01:46:06 +0200 Subject: [PATCH] Let FiniteElement::get_*data return a std::unique_ptr --- include/deal.II/fe/fe.h | 6 ++-- include/deal.II/fe/fe_dgp_nonparametric.h | 2 +- include/deal.II/fe/fe_enriched.h | 8 ++--- include/deal.II/fe/fe_face.h | 13 ++++---- include/deal.II/fe/fe_nothing.h | 2 +- include/deal.II/fe/fe_p1nc.h | 9 +++-- include/deal.II/fe/fe_poly.h | 7 ++-- include/deal.II/fe/fe_poly_face.h | 14 ++++---- include/deal.II/fe/fe_poly_tensor.h | 7 ++-- include/deal.II/fe/fe_system.h | 11 ++++--- source/fe/fe.cc | 4 +-- source/fe/fe_dgp_nonparametric.cc | 7 ++-- source/fe/fe_enriched.cc | 12 +++---- source/fe/fe_nothing.cc | 6 ++-- source/fe/fe_p1nc.cc | 12 +++---- source/fe/fe_system.cc | 40 ++++++++++------------- source/fe/fe_values.cc | 14 ++++---- 17 files changed, 86 insertions(+), 88 deletions(-) diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index e632908b56..59d11241db 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -2660,7 +2660,7 @@ protected: * it is no longer necessary. */ virtual - InternalDataBase * + std::unique_ptr get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, @@ -2708,7 +2708,7 @@ protected: * it is no longer necessary. */ virtual - InternalDataBase * + std::unique_ptr get_face_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, @@ -2756,7 +2756,7 @@ protected: * it is no longer necessary. */ virtual - InternalDataBase * + std::unique_ptr get_subface_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/include/deal.II/fe/fe_dgp_nonparametric.h b/include/deal.II/fe/fe_dgp_nonparametric.h index b42a1c1a2e..205a1c0942 100644 --- a/include/deal.II/fe/fe_dgp_nonparametric.h +++ b/include/deal.II/fe/fe_dgp_nonparametric.h @@ -508,7 +508,7 @@ protected: * cell. */ virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/include/deal.II/fe/fe_enriched.h b/include/deal.II/fe/fe_enriched.h index f97dc7bc81..1d223508aa 100644 --- a/include/deal.II/fe/fe_enriched.h +++ b/include/deal.II/fe/fe_enriched.h @@ -552,7 +552,7 @@ protected: * enrichment functions at each quadrature point depending on @p flags. */ template - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> setup_data (std::unique_ptr::InternalDataBase> &&fes_data, const UpdateFlags flags, const Quadrature &quadrature) const; @@ -563,19 +563,19 @@ protected: * (FEValues) then has to assume ownership (which includes destruction when it is no * more needed). */ - virtual typename FiniteElement::InternalDataBase * + virtual std::unique_ptr::InternalDataBase> get_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const; - virtual typename FiniteElement::InternalDataBase * + virtual std::unique_ptr::InternalDataBase> get_face_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const; - virtual typename FiniteElement::InternalDataBase * + virtual std::unique_ptr::InternalDataBase> get_subface_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/include/deal.II/fe/fe_face.h b/include/deal.II/fe/fe_face.h index 8f50d417ef..88f8989e99 100644 --- a/include/deal.II/fe/fe_face.h +++ b/include/deal.II/fe/fe_face.h @@ -339,24 +339,23 @@ protected: virtual - typename FiniteElement<1,spacedim>::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags /*update_flags*/, const Mapping<1,spacedim> &/*mapping*/, const Quadrature<1> &/*quadrature*/, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<1, spacedim> &/*output_data*/) const { - return new typename FiniteElement<1, spacedim>::InternalDataBase; + return std_cxx14::make_unique::InternalDataBase>(); } - typename FiniteElement<1,spacedim>::InternalDataBase * + std::unique_ptr::InternalDataBase> get_face_data(const UpdateFlags update_flags, const Mapping<1,spacedim> &/*mapping*/, const Quadrature<0> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<1, spacedim> &/*output_data*/) const { // generate a new data object and initialize some fields - typename FiniteElement<1,spacedim>::InternalDataBase *data = - new typename FiniteElement<1,spacedim>::InternalDataBase; + auto data = std_cxx14::make_unique::InternalDataBase>(); data->update_each = requires_update_flags(update_flags); const unsigned int n_q_points = quadrature.size(); @@ -369,10 +368,10 @@ protected: Assert(false, ExcNotImplemented()); } - return data; + return std::move(data); } - typename FiniteElement<1,spacedim>::InternalDataBase * + std::unique_ptr::InternalDataBase> get_subface_data(const UpdateFlags update_flags, const Mapping<1,spacedim> &mapping, const Quadrature<0> &quadrature, diff --git a/include/deal.II/fe/fe_nothing.h b/include/deal.II/fe/fe_nothing.h index 991fd9bdec..dffd199162 100644 --- a/include/deal.II/fe/fe_nothing.h +++ b/include/deal.II/fe/fe_nothing.h @@ -167,7 +167,7 @@ public: * no meaningful data exists for this element. */ virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/include/deal.II/fe/fe_p1nc.h b/include/deal.II/fe/fe_p1nc.h index e393ad441e..eee4138bcd 100644 --- a/include/deal.II/fe/fe_p1nc.h +++ b/include/deal.II/fe/fe_p1nc.h @@ -297,19 +297,22 @@ private: * It returns an empty variable type of @ InternalDataBase and updates @ update_flags, * and computes trivially zero Hessian for each cell if it is needed. */ - virtual FiniteElement<2,2>::InternalDataBase * + virtual + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<2> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2,2> &output_data) const; - virtual FiniteElement<2,2>::InternalDataBase * + virtual + std::unique_ptr::InternalDataBase> get_face_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<1> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2,2> &output_data) const; - virtual FiniteElement<2,2>::InternalDataBase * + virtual + std::unique_ptr::InternalDataBase> get_subface_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<1> &quadrature, diff --git a/include/deal.II/fe/fe_poly.h b/include/deal.II/fe/fe_poly.h index 4ec0e9c77c..a4a1b77737 100644 --- a/include/deal.II/fe/fe_poly.h +++ b/include/deal.II/fe/fe_poly.h @@ -19,6 +19,7 @@ #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -218,7 +219,7 @@ protected: virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data(const UpdateFlags update_flags, const Mapping &/*mapping*/, const Quadrature &quadrature, @@ -226,7 +227,7 @@ protected: { // generate a new data object and // initialize some fields - InternalData *data = new InternalData; + auto data = std_cxx14::make_unique(); data->update_each = requires_update_flags(update_flags); const unsigned int n_q_points = quadrature.size(); @@ -321,7 +322,7 @@ protected: for (unsigned int k=0; kdofs_per_cell; ++k) data->shape_3rd_derivatives[k][i] = third_derivatives[k]; } - return data; + return std::move(data); } virtual diff --git a/include/deal.II/fe/fe_poly_face.h b/include/deal.II/fe/fe_poly_face.h index b8d519c2bc..c419732109 100644 --- a/include/deal.II/fe/fe_poly_face.h +++ b/include/deal.II/fe/fe_poly_face.h @@ -18,6 +18,7 @@ #include +#include #include @@ -81,17 +82,16 @@ protected: virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags /*update_flags*/, const Mapping &/*mapping*/, const Quadrature &/*quadrature*/, dealii::internal::FEValuesImplementation::FiniteElementRelatedData &/*output_data*/) const { - InternalData *data = new InternalData; - return data; + return std_cxx14::make_unique(); } - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_face_data(const UpdateFlags update_flags, const Mapping &/*mapping*/, const Quadrature &quadrature, @@ -99,7 +99,7 @@ protected: { // generate a new data object and // initialize some fields - InternalData *data = new InternalData; + auto data = std_cxx14::make_unique(); data->update_each = requires_update_flags(update_flags); const unsigned int n_q_points = quadrature.size(); @@ -137,10 +137,10 @@ protected: Assert(false, ExcNotImplemented()); } - return data; + return std::move(data); } - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_subface_data(const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/include/deal.II/fe/fe_poly_tensor.h b/include/deal.II/fe/fe_poly_tensor.h index aef8817302..46181817b4 100644 --- a/include/deal.II/fe/fe_poly_tensor.h +++ b/include/deal.II/fe/fe_poly_tensor.h @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -208,7 +209,7 @@ protected: /* NOTE: The following function has its definition inlined into the class declaration because we otherwise run into a compiler error with MS Visual Studio. */ virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_data(const UpdateFlags update_flags, const Mapping &/*mapping*/, const Quadrature &quadrature, @@ -216,7 +217,7 @@ protected: { // generate a new data object and // initialize some fields - InternalData *data = new InternalData; + auto data = std_cxx14::make_unique(); data->update_each = requires_update_flags(update_flags); const unsigned int n_q_points = quadrature.size(); @@ -328,7 +329,7 @@ protected: } } - return data; + return std::move(data); } virtual diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index de79655185..7ac364896b 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -959,21 +959,22 @@ public: protected: - virtual typename FiniteElement::InternalDataBase * + virtual + std::unique_ptr::InternalDataBase> get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData &output_data) const; virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_face_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData &output_data) const; virtual - typename FiniteElement::InternalDataBase * + std::unique_ptr::InternalDataBase> get_subface_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, @@ -1115,7 +1116,7 @@ private: * base_noth base element. */ void set_fe_data(const unsigned int base_no, - typename FiniteElement::InternalDataBase *); + std::unique_ptr::InternalDataBase>); /** * Give read-access to the pointer to a @p InternalData of the @p @@ -1144,7 +1145,7 @@ private: * necessarily the same, we only need as many of these objects as there * are base elements, irrespective of their multiplicity. */ - typename std::vector::InternalDataBase *> base_fe_datas; + typename std::vector::InternalDataBase > > base_fe_datas; /** * A collection of objects to which the base elements will write their diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 2a92dbe918..56c998e135 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -1193,7 +1193,7 @@ FiniteElement::compute_n_nonzero_components ( /*------------------------------- FiniteElement ----------------------*/ template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FiniteElement::get_face_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature, @@ -1207,7 +1207,7 @@ FiniteElement::get_face_data (const UpdateFlags flags, template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FiniteElement::get_subface_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/source/fe/fe_dgp_nonparametric.cc b/source/fe/fe_dgp_nonparametric.cc index d1986485cd..faacf76506 100644 --- a/source/fe/fe_dgp_nonparametric.cc +++ b/source/fe/fe_dgp_nonparametric.cc @@ -255,7 +255,7 @@ FE_DGPNonparametric::requires_update_flags (const UpdateFlags flag //--------------------------------------------------------------------------- template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_DGPNonparametric:: get_data (const UpdateFlags update_flags, const Mapping &, @@ -263,14 +263,13 @@ get_data (const UpdateFlags u dealii::internal::FEValuesImplementation::FiniteElementRelatedData &/*output_data*/) const { // generate a new data object - typename FiniteElement::InternalDataBase *data - = new typename FiniteElement::InternalDataBase; + auto data = std_cxx14::make_unique::InternalDataBase>(); data->update_each = requires_update_flags(update_flags); // other than that, there is nothing we can add here as discussed // in the general documentation of this class - return data; + return std::move(data); } diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index 5cce24b6f1..164daa8a2f 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -288,7 +288,7 @@ FE_Enriched::requires_update_flags (const UpdateFlags flags) const template template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_Enriched::setup_data (std::unique_ptr::InternalDataBase> &&fes_data, const UpdateFlags flags, const Quadrature &quadrature) const @@ -300,7 +300,7 @@ FE_Enriched::setup_data (std::unique_ptr::InternalData *data_fesystem = static_cast::InternalData *> (fes_data.release()); - InternalData *data = new InternalData(std::unique_ptr::InternalData>(data_fesystem)); + auto data = std_cxx14::make_unique(std::unique_ptr::InternalData>(data_fesystem)); // copy update_each from FESystem data: data->update_each = data_fesystem->update_each; @@ -326,12 +326,12 @@ FE_Enriched::setup_data (std::unique_ptr -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_Enriched::get_face_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, @@ -344,7 +344,7 @@ FE_Enriched::get_face_data (const UpdateFlags update_flags, template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_Enriched::get_subface_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature, @@ -357,7 +357,7 @@ FE_Enriched::get_subface_data (const UpdateFlags update_flags template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_Enriched::get_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature, diff --git a/source/fe/fe_nothing.cc b/source/fe/fe_nothing.cc index 2efbafd62b..3ab91744c3 100644 --- a/source/fe/fe_nothing.cc +++ b/source/fe/fe_nothing.cc @@ -99,7 +99,7 @@ FE_Nothing::shape_value (const unsigned int /*i*/, template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_Nothing::get_data (const UpdateFlags /*update_flags*/, const Mapping &/*mapping*/, const Quadrature &/*quadrature*/, @@ -108,9 +108,7 @@ FE_Nothing::get_data (const UpdateFlags // Create a default data object. Normally we would then // need to resize things to hold the appropriate numbers // of dofs, but in this case all data fields are empty. - typename FiniteElement::InternalDataBase *data - = new typename FiniteElement::InternalDataBase(); - return data; + return std_cxx14::make_unique::InternalDataBase>(); } diff --git a/source/fe/fe_p1nc.cc b/source/fe/fe_p1nc.cc index c978d62ea0..6155396ee2 100644 --- a/source/fe/fe_p1nc.cc +++ b/source/fe/fe_p1nc.cc @@ -124,13 +124,13 @@ FE_P1NC::get_linear_shape_coefficients (const Triangulation<2,2>::cell_iterator -FiniteElement<2,2>::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_P1NC::get_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<2> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2,2> &output_data) const { - FiniteElement<2,2>::InternalDataBase *data = new FiniteElement<2,2>::InternalDataBase; + auto data = std_cxx14::make_unique::InternalDataBase>(); data->update_each = requires_update_flags(update_flags); @@ -146,13 +146,13 @@ FE_P1NC::get_data (const UpdateFlags update_flags, -FiniteElement<2,2>::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_P1NC::get_face_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<1> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2,2> &output_data) const { - FiniteElement<2,2>::InternalDataBase *data = new FiniteElement<2,2>::InternalDataBase; + auto data = std_cxx14::make_unique::InternalDataBase>(); data->update_each = requires_update_flags(update_flags); @@ -168,13 +168,13 @@ FE_P1NC::get_face_data (const UpdateFlags update_flags, -FiniteElement<2,2>::InternalDataBase * +std::unique_ptr::InternalDataBase> FE_P1NC::get_subface_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<1> &quadrature, dealii::internal::FEValuesImplementation::FiniteElementRelatedData<2,2> &output_data) const { - FiniteElement<2,2>::InternalDataBase *data = new FiniteElement<2,2>::InternalDataBase; + auto data = std_cxx14::make_unique::InternalDataBase>(); data->update_each = requires_update_flags(update_flags); diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 81c9671f1d..2896f59dd7 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -63,11 +63,7 @@ FESystem::InternalData::~InternalData() { // delete pointers and set them to zero to avoid inadvertent use for (unsigned int i=0; i void FESystem:: InternalData::set_fe_data (const unsigned int base_no, - typename FiniteElement::InternalDataBase *ptr) + std::unique_ptr::InternalDataBase> ptr) { Assert(base_no::requires_update_flags (const UpdateFlags flags) const template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FESystem:: get_data (const UpdateFlags flags, const Mapping &mapping, @@ -897,7 +893,7 @@ get_data (const UpdateFlags f // and so the current object's update_each flag needs to be // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. - InternalData *data = new InternalData(this->n_base_elements()); + auto data = std_cxx14::make_unique(this->n_base_elements()); data->update_each = requires_update_flags(flags); // get data objects from each of the base elements and store @@ -925,21 +921,21 @@ get_data (const UpdateFlags f // out of the base output object into the system output object, // but we can't because we can't know what the elements already // copied and/or will want to update on every cell - typename FiniteElement::InternalDataBase *base_fe_data = + auto base_fe_data = base_element(base_no).get_data (flags, mapping, quadrature, base_fe_output_object); - data->set_fe_data(base_no, base_fe_data); + data->set_fe_data(base_no, std::move(base_fe_data)); } - return data; + return std::move(data); } // The following function is a clone of get_data, with the exception // that get_face_data of the base elements is called. template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FESystem:: get_face_data (const UpdateFlags flags, const Mapping &mapping, @@ -953,7 +949,7 @@ get_face_data (const UpdateFlags // and so the current object's update_each flag needs to be // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. - InternalData *data = new InternalData(this->n_base_elements()); + auto data = std_cxx14::make_unique(this->n_base_elements()); data->update_each = requires_update_flags(flags); // get data objects from each of the base elements and store @@ -981,14 +977,14 @@ get_face_data (const UpdateFlags // out of the base output object into the system output object, // but we can't because we can't know what the elements already // copied and/or will want to update on every cell - typename FiniteElement::InternalDataBase *base_fe_data = + auto base_fe_data = base_element(base_no).get_face_data (flags, mapping, quadrature, base_fe_output_object); - data->set_fe_data(base_no, base_fe_data); + data->set_fe_data(base_no, std::move(base_fe_data)); } - return data; + return std::move(data); } @@ -997,7 +993,7 @@ get_face_data (const UpdateFlags // that get_subface_data of the base elements is called. template -typename FiniteElement::InternalDataBase * +std::unique_ptr::InternalDataBase> FESystem:: get_subface_data (const UpdateFlags flags, const Mapping &mapping, @@ -1011,7 +1007,7 @@ get_subface_data (const UpdateFlags // and so the current object's update_each flag needs to be // correct in case the current FESystem is a base element for another, // higher-level FESystem itself. - InternalData *data = new InternalData(this->n_base_elements()); + auto data = std_cxx14::make_unique(this->n_base_elements()); data->update_each = requires_update_flags(flags); // get data objects from each of the base elements and store @@ -1039,14 +1035,14 @@ get_subface_data (const UpdateFlags // out of the base output object into the system output object, // but we can't because we can't know what the elements already // copied and/or will want to update on every cell - typename FiniteElement::InternalDataBase *base_fe_data = + auto base_fe_data = base_element(base_no).get_subface_data (flags, mapping, quadrature, base_fe_output_object); - data->set_fe_data(base_no, base_fe_data); + data->set_fe_data(base_no, std::move(base_fe_data)); } - return data; + return std::move(data); } diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index a70e0f60a9..eddc47f642 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -3957,14 +3957,14 @@ FEValues::initialize (const UpdateFlags update_flags) // then get objects into which the FE and the Mapping can store // intermediate data used across calls to reinit. we can do this in parallel - Threads::Task::InternalDataBase *> + Threads::Task::InternalDataBase> > fe_get_data = Threads::new_task (&FiniteElement::get_data, *this->fe, flags, *this->mapping, quadrature, this->finite_element_output); - Threads::Task::InternalDataBase *> + Threads::Task::InternalDataBase * > mapping_get_data; if (flags & update_mapping) mapping_get_data = Threads::new_task (&Mapping::get_data, @@ -3975,7 +3975,7 @@ FEValues::initialize (const UpdateFlags update_flags) this->update_flags = flags; // then collect answers from the two task above - this->fe_data.reset (fe_get_data.return_value()); + this->fe_data = std::move(fe_get_data.return_value()); if (flags & update_mapping) this->mapping_data.reset (mapping_get_data.return_value()); else @@ -4207,7 +4207,7 @@ FEFaceValues::initialize (const UpdateFlags update_flags) // then get objects into which the FE and the Mapping can store // intermediate data used across calls to reinit. this can be done in parallel - Threads::Task::InternalDataBase *> + Threads::Task::InternalDataBase> > fe_get_data = Threads::new_task (&FiniteElement::get_face_data, *this->fe, flags, @@ -4225,7 +4225,7 @@ FEFaceValues::initialize (const UpdateFlags update_flags) this->update_flags = flags; // then collect answers from the two task above - this->fe_data.reset (fe_get_data.return_value()); + this->fe_data = std::move(fe_get_data.return_value()); if (flags & update_mapping) this->mapping_data.reset (mapping_get_data.return_value()); else @@ -4375,7 +4375,7 @@ FESubfaceValues::initialize (const UpdateFlags update_flags) // then get objects into which the FE and the Mapping can store // intermediate data used across calls to reinit. this can be done // in parallel - Threads::Task::InternalDataBase *> + Threads::Task::InternalDataBase> > fe_get_data = Threads::new_task (&FiniteElement::get_subface_data, *this->fe, flags, @@ -4393,7 +4393,7 @@ FESubfaceValues::initialize (const UpdateFlags update_flags) this->update_flags = flags; // then collect answers from the two task above - this->fe_data.reset (fe_get_data.return_value()); + this->fe_data = std::move(fe_get_data.return_value()); if (flags & update_mapping) this->mapping_data.reset (mapping_get_data.return_value()); else -- 2.39.5