From 0648c9ffaa4157fb7d62003417011a25c1bc1316 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 15 Aug 2023 05:20:03 -0600 Subject: [PATCH] Clear some forgotten fields in Triangulation::clear(). --- source/grid/tria.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index dee32a5eb3..4b0c65fa41 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -16083,6 +16083,15 @@ void Triangulation::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>(); + vertex_to_manifold_id_map_1d = + std::make_unique>(); + } + number_cache = internal::TriangulationImplementation::NumberCache(); } -- 2.39.5