]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clear some forgotten fields in Triangulation::clear().
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 15 Aug 2023 11:20:03 +0000 (05:20 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 17 Aug 2023 11:54:08 +0000 (05:54 -0600)
source/grid/tria.cc

index dee32a5eb347b77621b2b7fe0b9eb3be8d0f779b..4b0c65fa4139922a54740837901ba3e244b1d2e8 100644 (file)
@@ -16083,6 +16083,15 @@ void Triangulation<dim, spacedim>::clear_despite_subscriptions()
 
   manifolds.clear();
 
+  // In 1d, also reset vertex-to-(boundary|manifold) maps to empty maps
+  if (dim == 1)
+    {
+      vertex_to_boundary_id_map_1d =
+        std::make_unique<std::map<unsigned int, types::boundary_id>>();
+      vertex_to_manifold_id_map_1d =
+        std::make_unique<std::map<unsigned int, types::manifold_id>>();
+    }
+
   number_cache = internal::TriangulationImplementation::NumberCache<dim>();
 }
 

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.