Skip to content

Commit 6ca753d

Browse files
authored
Merge pull request #3577 from roystgnr/stitching_debugging
Stitching debugging
2 parents 22174ac + 72ccc4c commit 6ca753d

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/mesh/mesh_base.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ std::string MeshBase::get_info(const unsigned int verbosity /* = 0 */, const boo
11591159
if (verbosity > 1)
11601160
{
11611161
this->comm().min(info.bbox.min());
1162-
this->comm().min(info.bbox.max());
1162+
this->comm().max(info.bbox.max());
11631163
}
11641164
}
11651165

src/mesh/poly2tri_triangulator.C

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,12 @@ void Poly2TriTriangulator::triangulate_current_points()
292292
std::vector<p2t::Point> outer_boundary_points;
293293
std::vector<std::vector<p2t::Point>> inner_hole_points(n_holes);
294294

295+
dof_id_type nn = _mesh.max_node_id();
296+
libmesh_error_msg_if
297+
(!nn, "Poly2TriTriangulator cannot triangulate an empty mesh!");
298+
295299
// Unless we're using an explicit segments list, we assume node ids
296300
// are contiguous here.
297-
dof_id_type nn = _mesh.max_node_id();
298301
if (this->segments.empty())
299302
libmesh_error_msg_if
300303
(_mesh.n_nodes() != nn,

src/mesh/unstructured_mesh.C

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,11 @@ void UnstructuredMesh::stitching_helper (const MeshBase * other_mesh,
17731773
bool enforce_all_nodes_match_on_boundaries,
17741774
bool skip_find_neighbors)
17751775
{
1776+
#ifdef DEBUG
1777+
// We rely on neighbor links here
1778+
MeshTools::libmesh_assert_valid_neighbors(*this);
1779+
#endif
1780+
17761781
// FIXME: make distributed mesh support efficient.
17771782
// Yes, we currently suck.
17781783
MeshSerializer serialize(*this);
@@ -1935,9 +1940,13 @@ void UnstructuredMesh::stitching_helper (const MeshBase * other_mesh,
19351940
{
19361941
libMesh::out << "In UnstructuredMesh::stitch_meshes:\n"
19371942
<< "This mesh has " << this_boundary_node_ids.size()
1938-
<< " nodes on boundary " << this_mesh_boundary_id << ".\n"
1943+
<< " nodes on boundary `"
1944+
<< this->get_boundary_info().get_sideset_name(this_mesh_boundary_id)
1945+
<< "' (" << this_mesh_boundary_id << ").\n"
19391946
<< "Other mesh has " << other_boundary_node_ids.size()
1940-
<< " nodes on boundary " << other_mesh_boundary_id << ".\n";
1947+
<< " nodes on boundary `"
1948+
<< this->get_boundary_info().get_sideset_name(other_mesh_boundary_id)
1949+
<< "' (" << other_mesh_boundary_id << ").\n";
19411950

19421951
if (h_min_updated)
19431952
{

0 commit comments

Comments
 (0)