Skip to content

Commit

Permalink
Better debug output when working with bad circular boundaries
Browse files Browse the repository at this point in the history
and trying to get their shape corrected
refs idaholab#23972
  • Loading branch information
GiudGiud authored and oanaoana committed Oct 19, 2023
1 parent 92dd52a commit cc8aa24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,12 @@ CircularBoundaryCorrectionGenerator::circularCenterCalculator(const std::vector<

for (const auto & pt : pts_list)
if (!MooseUtils::absoluteFuzzyEqual((pt - circ_origin).norm(), radius, tol))
paramError("input_mesh_circular_boundaries", "the boundary provided is not circular.");
paramError("input_mesh_circular_boundaries",
"the boundary provided is not circular. The generator found point " +
Moose::stringify(circ_origin) +
" to be the likely circle origin to the boundary, with a radius of " +
std::to_string(radius) + ". However, boundary node " + Moose::stringify(pt) +
" is at a radius of " + std::to_string((pt - circ_origin).norm()));
return circ_origin;
}

Expand Down
1 change: 1 addition & 0 deletions framework/src/utils/MooseMeshUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ makeOrderedNodeList(std::vector<std::pair<dof_id_type, dof_id_type>> & node_assm
// a flag to indicate if the ordered_node_list has been reversed
bool isFlipped = false;
// Start from the first element, try to find a chain of nodes
mooseAssert(node_assm.size(), "Node list must not be empty");
ordered_node_list.push_back(node_assm.front().first);
ordered_node_list.push_back(node_assm.front().second);
ordered_elem_id_list.push_back(elem_id_list.front());
Expand Down

0 comments on commit cc8aa24

Please sign in to comment.