Skip to content

Commit 0f2272c

Browse files
committed
verify: fail if the upward adjacency limit is exceeded
1 parent e04ea58 commit 0f2272c

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

apf/apfVerify.cc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ static void verifyUp(Mesh* m, UpwardCounts& guc,
8484
m->getUp(e, up);
8585
int upwardCount = up.n;
8686

87+
/* this is here for some spiderwebby simmetrix meshes */
88+
if (upwardCount >= 200) {
89+
std::stringstream ss;
90+
ss << "warning: entity of type " << m->getType(e)
91+
<< " at " << getLinearCentroid(m, e) << " has "
92+
<< upwardCount << " upward adjacencies\n";
93+
// use a stringstream to prevent output from different procs mixing
94+
std::string s = ss.str();
95+
lion_eprint(1,"%s",s.c_str());
96+
PCU_ALWAYS_ASSERT(upwardCount < MDS_SET_MAX);
97+
}
98+
8799
/* check for duplicates in the upward list */
88100
for (int i = 0; i < upwardCount; ++i)
89101
for (int j = i + 1; j < upwardCount; ++j)
@@ -169,16 +181,7 @@ static void verifyUp(Mesh* m, UpwardCounts& guc,
169181
if (!adjacentToUpwardGhost && abort_on_error)
170182
fail(s.c_str());
171183
}
172-
/* this is here for some spiderwebby simmetrix meshes */
173-
if (upwardCount >= 200) {
174-
std::stringstream ss;
175-
ss << "warning: entity of type " << m->getType(e)
176-
<< " at " << getLinearCentroid(m, e) << " has "
177-
<< upwardCount << " upward adjacencies\n";
178-
// use a stringstream to prevent output from different procs mixing
179-
std::string s = ss.str();
180-
lion_eprint(1,"%s",s.c_str());
181-
}
184+
182185
}
183186

184187
static void verifyResidence(Mesh* m, MeshEntity* e)

0 commit comments

Comments
 (0)