]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test fe/fe_enriched_color_07: do not use a function-level static
authorMatthias Maier <tamiko@43-1.org>
Sun, 2 Jul 2023 20:59:19 +0000 (15:59 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 2 Jul 2023 21:06:35 +0000 (16:06 -0500)
Let's ensure that the object is always re-initialized.

tests/fe/fe_enriched_color_07.cc

index 45ea69124e1b590d2e2cc11ff1c10674299494ef..e4cbd66b025e896303b65a550e9848dbaf0fc661 100644 (file)
@@ -1339,12 +1339,15 @@ LaplaceProblem<dim>::build_fe_space()
   pcout << "...building fe space" << std::endl;
 
   make_enrichment_functions();
-  static ColorEnriched::Helper<dim> fe_space(fe_base,
-                                             fe_enriched,
-                                             vec_predicates,
-                                             vec_enrichments);
+
+  static std::unique_ptr<ColorEnriched::Helper<dim>> fe_space;
+  fe_space = std::make_unique<ColorEnriched::Helper<dim>>(fe_base,
+                                                          fe_enriched,
+                                                          vec_predicates,
+                                                          vec_enrichments);
+
   fe_collection = std::make_shared<const hp::FECollection<dim>>(
-    fe_space.build_fe_collection(dof_handler));
+    fe_space->build_fe_collection(dof_handler));
   pcout << "size of fe collection: " << fe_collection->size() << std::endl;
 
   if (prm.debug_level == 9)

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.