Skip to content

Commit ff5abcf

Browse files
committed
Assert bcid set names are different
This solves problems found when using MOOSE in tandem with libmesh due to MOOSE’s implementation treating names as the “first-class” identifier Resolves: libMesh#3489
1 parent 6859fe0 commit ff5abcf

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/apps/meshbcid.C

+15-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void usage_error(const char * progname)
4444

4545
exit(1);
4646
}
47-
47+
std::map<std::string, int> bcids;
4848
int main(int argc, char ** argv)
4949
{
5050
LibMeshInit init(argc, argv);
@@ -90,7 +90,20 @@ int main(int argc, char ** argv)
9090

9191
BoundingBox normals(minpt, maxpt),
9292
points(minpt, maxpt);
93-
93+
std::string side_set_name;
94+
std::string node_set_name;
95+
if (cl.search("--sideSetName"))
96+
{
97+
side_set_name = cl.next("");
98+
assert(bcids.find(side_set_name) == bcids.end());
99+
bcids.insert(std::pair<std::string, int> (side_set_name, bcid));
100+
}
101+
else if (cl.search("--nodeSetName"))
102+
{
103+
node_set_name = cl.next("");
104+
assert(bcids.find(node_set_name) == bcids.end());
105+
bcids.insert(std::pair<std::string, int> (node_set_name, bcid));
106+
}
94107
if (cl.search("--minnormalx"))
95108
normals.min()(0) = cl.next(normals.min()(0));
96109
if (cl.search("--maxnormalx"))

0 commit comments

Comments
 (0)