From: Wolfgang Bangerth Date: Thu, 20 Feb 2025 19:00:20 +0000 (-0700) Subject: Err on the safe side. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18153%2Fhead;p=dealii.git Err on the safe side. --- diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 8e2738e5cd..cb23ea896f 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -13728,6 +13728,11 @@ template DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim)) void Triangulation::load(const std::string &file_basename) { + // It's probably prudent to first get rid of any all content of the + // triangulation, rather than hope that the deserialization below + // overwrites everything: + clear(); + // Load triangulation information. { std::ifstream ifs_tria(file_basename + "_triangulation.data");