From 3962d89c7d2b810cbf6a2cfae1f0f9b3f91ac5e3 Mon Sep 17 00:00:00 2001 From: Hugh Carson Date: Fri, 4 Oct 2024 18:42:26 +0000 Subject: [PATCH] Fix bug where boundaries would also be cracked if any are added --- palace/utils/geodata.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/palace/utils/geodata.cpp b/palace/utils/geodata.cpp index 206102aee..b3073de45 100644 --- a/palace/utils/geodata.cpp +++ b/palace/utils/geodata.cpp @@ -2461,9 +2461,6 @@ struct UnorderedPairHasher int AddInterfaceBdrElements(std::unique_ptr &orig_mesh, std::unordered_map &face_to_be, const IoData &iodata) -// const std::vector &crack_bdr_attr_list, -// bool refine_crack_elem, double crack_displ_factor, -// bool add_bdr_elem) { // Return if nothing to do. Otherwise, count vertices and boundary elements to add. if (iodata.boundaries.attributes.empty() && !iodata.model.add_bdr_elements) @@ -2485,7 +2482,7 @@ int AddInterfaceBdrElements(std::unique_ptr &orig_mesh, std::unordered_map>>> crack_vert_duplicates; std::unique_ptr vert_to_elem; - if (!iodata.boundaries.attributes.empty()) + if (!iodata.boundaries.attributes.empty() && iodata.model.crack_bdr_elements) { auto crack_bdr_marker = mesh::AttrToMarker( orig_mesh->bdr_attributes.Size() ? orig_mesh->bdr_attributes.Max() : 0,