Skip to content

Commit

Permalink
Fix checking for unmatched node and improve error message. (#187)
Browse files Browse the repository at this point in the history
* Fix checking for unmatched node and improve error message.

* Make codecov purely informal

* Move to .github

---------

Co-authored-by: Martin R. Pfaller <[email protected]>
  • Loading branch information
ktbolt and mrp089 authored Feb 16, 2024
1 parent b2153cf commit 0590d9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# configuration for code coverage testing with codecov
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
7 changes: 5 additions & 2 deletions Code/Source/svFSI/nn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,19 +575,22 @@ void gnnb(const ComMod& com_mod, const faceType& lFa, const int e, const int g,
for (int a = 0; a < eNoNb; a++) {
int Ac = lFa.IEN(a,e);
int b = 0;
bool found_node = false;

for (int ib = 0; ib < eNoN; ib++) {
b = ib;
if (setIt[ib]) {
int Bc = msh.IEN(ib,Ec);
if (Bc == Ac) {
found_node = true;
break;
}
}
}

if (b > eNoN) {
throw std::runtime_error("could not find matching face nodes");
if (!found_node) {
throw std::runtime_error("[svFSIplus::gnnb] The '" + lFa.name + "' face node " + std::to_string(Ac) +
" could not be matched to a node in the '" + msh.name + "' volume mesh.");
}

ptr(a) = b;
Expand Down

0 comments on commit 0590d9a

Please sign in to comment.