]> https://gitweb.dealii.org/ - dealii.git/commitdiff
MappingDataOnTheFly: make FE_Nothing unique_ptr 16050/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 27 Sep 2023 09:32:17 +0000 (11:32 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 27 Sep 2023 09:32:17 +0000 (11:32 +0200)
include/deal.II/matrix_free/mapping_data_on_the_fly.h

index 91e8ff71f2114ce19ecf80fa29bd4cd171a922d0..d0d78caf99455b364a8f0e5ef2dbe249345bec9d 100644 (file)
@@ -147,7 +147,7 @@ namespace internal
        * Dummy finite element object necessary for initializing the FEValues
        * object.
        */
-      FE_Nothing<dim> fe_dummy;
+      std::unique_ptr<FE_Nothing<dim>> fe_dummy;
 
       /**
        * An underlying FEValues object that performs the (scalar) evaluation.
@@ -174,9 +174,10 @@ namespace internal
       const Mapping<dim>  &mapping,
       const Quadrature<1> &quadrature,
       const UpdateFlags    update_flags)
-      : fe_values(std::make_unique<dealii::FEValues<dim>>(
+      : fe_dummy(std::make_unique<FE_Nothing<dim>>())
+      , fe_values(std::make_unique<dealii::FEValues<dim>>(
           mapping,
-          fe_dummy,
+          *fe_dummy,
           Quadrature<dim>(quadrature),
           MappingInfoStorage<dim, dim, Number>::compute_update_flags(
             update_flags)))

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.