Skip to content

Commit

Permalink
Merge pull request #283 from awslabs/hughcars/crack-bug-fix
Browse files Browse the repository at this point in the history
Crack elements only when requested
  • Loading branch information
hughcars authored Oct 4, 2024
2 parents 748660c + 3962d89 commit cf02e0d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions palace/utils/geodata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2461,9 +2461,6 @@ struct UnorderedPairHasher

int AddInterfaceBdrElements(std::unique_ptr<mfem::Mesh> &orig_mesh,
std::unordered_map<int, int> &face_to_be, const IoData &iodata)
// const std::vector<int> &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)
Expand All @@ -2485,7 +2482,7 @@ int AddInterfaceBdrElements(std::unique_ptr<mfem::Mesh> &orig_mesh,
std::unordered_map<int, std::vector<std::pair<int, std::unordered_set<int>>>>
crack_vert_duplicates;
std::unique_ptr<mfem::Table> 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,
Expand Down

0 comments on commit cf02e0d

Please sign in to comment.