Skip to content

Commit

Permalink
Add debug check
Browse files Browse the repository at this point in the history
  • Loading branch information
garth-wells committed Jun 18, 2024
1 parent 0726c33 commit 355e8a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cpp/Contact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Contact::Contact(
{
assert(_mesh);

if (markers.size() != (std::size_t)surfaces.num_nodes())
throw std::runtime_error("maker and surfaces have different sizes.");

for (int i = 0; i < surfaces.num_nodes(); ++i)
{
if (surfaces.num_links(i) != 1)
throw std::runtime_error("Num surfces links !=0 : "
+ std::to_string(surfaces.num_links(i)));
}

// TODO: remove the below code, compute num_local directly from
// _cell_facet_pairs
for (std::size_t s = 0; s < markers.size(); ++s)
Expand Down

0 comments on commit 355e8a2

Please sign in to comment.