Skip to content

Commit

Permalink
Make multiple boundary element erro report attributes of the two elem…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
hughcars committed Feb 12, 2025
1 parent 0fead03 commit ee0cfc0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions palace/utils/geodata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2627,9 +2627,9 @@ std::unordered_map<int, int> GetFaceToBdrElementMap(const mfem::Mesh &mesh,
{
int f, o, e1 = -1, e2 = -1;
mesh.GetBdrElementFace(be, &f, &o);
int attr = mesh.GetBdrAttribute(be);
if (!boundaries.periodic.empty())
{
int attr = mesh.GetBdrAttribute(be);
for (const auto &data : boundaries.periodic)
{
const auto &da = data.donor_attributes, &ra = data.receiver_attributes;
Expand All @@ -2644,7 +2644,9 @@ std::unordered_map<int, int> GetFaceToBdrElementMap(const mfem::Mesh &mesh,
}
}
MFEM_VERIFY((e1 >= 0 && e2 >= 0) || face_to_be.find(f) == face_to_be.end(),
"A non-periodic face (" << f << ") cannot have multiple boundary elements");
"A non-periodic face ("
<< f << ") cannot have multiple boundary elements! Attributes: " << attr
<< ' ' << mesh.GetBdrAttribute(face_to_be[f]));
face_to_be[f] = be;
}
return face_to_be;
Expand Down

0 comments on commit ee0cfc0

Please sign in to comment.