Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions apf/apfVerify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <pcu_util.h>
#include <lionPrint.h>
#include "stdlib.h" // malloc
#include "mds/mds_config.h" //MDS_SET_MAX

namespace apf {

Expand Down Expand Up @@ -84,6 +85,18 @@ static void verifyUp(Mesh* m, UpwardCounts& guc,
m->getUp(e, up);
int upwardCount = up.n;

/* this is here for some spiderwebby simmetrix meshes */
if (upwardCount >= 200) {
std::stringstream ss;
ss << "warning: entity of type " << m->getType(e)
<< " at " << getLinearCentroid(m, e) << " has "
<< upwardCount << " upward adjacencies\n";
// use a stringstream to prevent output from different procs mixing
std::string s = ss.str();
lion_eprint(1,"%s",s.c_str());
PCU_ALWAYS_ASSERT(upwardCount < MDS_SET_MAX);
}

/* check for duplicates in the upward list */
for (int i = 0; i < upwardCount; ++i)
for (int j = i + 1; j < upwardCount; ++j)
Expand Down Expand Up @@ -169,16 +182,7 @@ static void verifyUp(Mesh* m, UpwardCounts& guc,
if (!adjacentToUpwardGhost && abort_on_error)
fail(s.c_str());
}
/* this is here for some spiderwebby simmetrix meshes */
if (upwardCount >= 200) {
std::stringstream ss;
ss << "warning: entity of type " << m->getType(e)
<< " at " << getLinearCentroid(m, e) << " has "
<< upwardCount << " upward adjacencies\n";
// use a stringstream to prevent output from different procs mixing
std::string s = ss.str();
lion_eprint(1,"%s",s.c_str());
}

}

static void verifyResidence(Mesh* m, MeshEntity* e)
Expand Down