-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added parameters for watertight sideset and nodeset diagnostic check #29136
base: next
Are you sure you want to change the base?
Conversation
-Diagnostics can now take an additional vector parameter _watertight_boundaries -Users can use it to input a list of sidesets/nodesets -If supplied the diagnostic check functionality changes -It will instead check if an external side/node is assigned to one of the provided boundary ids -The error message for these instances is worded differently to reflect what the diagnostic check is looking for -The t in checkWaterTightSidesets is now lowercase because it was bothering me and to match checkWatertightNodesets closes idaholab#29077
Job Precheck, step Clang format on 3c505cd wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
Job Documentation, step Docs: sync website on 41d5897 wanted to post the following: View the site here This comment will be updated on new commits. |
findBoundaryOverlap(std::vector<boundary_id_type>, | ||
std::vector<boundary_id_type> boundary_ids) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findBoundaryOverlap(std::vector<boundary_id_type>, | |
std::vector<boundary_id_type> boundary_ids) const; | |
findBoundaryOverlap(const std::vector<boundary_id_type> & boundary_copy, | |
const std::vector<boundary_id_type> & boundary_ids) const; |
//// Routine to check is mesh is fully covered in nodesets | ||
void checkWatertightNodesets(const std::unique_ptr<MeshBase> & mesh) const; | ||
/// Helper function that finds the intersection of the _watertight_boundaries vector and the provided one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not use _waterright_boundaries, but rather a copy that is sorted.
so just write the description in a more general manner that does not mention _watertight_boundaries
@@ -49,6 +49,8 @@ MeshDiagnosticsGenerator::validParams() | |||
"check_for_watertight_nodesets", | |||
chk_option, | |||
"whether to check for external nodes that are not assigned to any nodeset"); | |||
params.addParam<std::vector<BoundaryID>>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params.addParam<std::vector<BoundaryID>>( | |
params.addParam<std::vector<BoundaryName>>( |
let s do names. ids, especially for boundaries, are really error-prone
@@ -49,6 +49,8 @@ MeshDiagnosticsGenerator::validParams() | |||
"check_for_watertight_nodesets", | |||
chk_option, | |||
"whether to check for external nodes that are not assigned to any nodeset"); | |||
params.addParam<std::vector<BoundaryID>>( | |||
"boundaries_to_check", {}, "IDs of boundaries to be checked for watertight checks"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"boundaries_to_check", {}, "IDs of boundaries to be checked for watertight checks"); | |
"boundaries_to_check", {}, "Names boundaries that should form a watertight envelope around the mesh. Defaults to all the boundaries combined."); |
// Make copy of _watertight_boundaries and sort it for later use | ||
std::vector<BoundaryID> boundary_copy = _watertight_boundaries; | ||
std::sort(boundary_copy.begin(), boundary_copy.end()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would not hurt to just store it sorted
// If external check if that side had a sideset | ||
// If external get the boundary ids associated with this side | ||
std::vector<boundary_id_type> boundary_ids; | ||
// boundary_info.boundary_ids(elem, i, boundary_ids); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// boundary_info.boundary_ids(elem, i, boundary_ids); |
@@ -330,6 +340,25 @@ MeshDiagnosticsGenerator::checkWaterTightSidesets(const std::unique_ptr<MeshBase | |||
num_faces_without_sideset++; | |||
} | |||
} | |||
else if (!_watertight_boundaries.empty() && intersections.empty()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you consolidate all of this code by doing:
if (...... OR (!_watertight_boundaries.empty() && intersections.empty()))
"of the specified nodesets"; | ||
_console << message << std::endl; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments here
MeshDiagnosticsGenerator::findBoundaryOverlap(std::vector<boundary_id_type> boundary_copy, | ||
std::vector<boundary_id_type> boundary_ids) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MeshDiagnosticsGenerator::findBoundaryOverlap(std::vector<boundary_id_type> boundary_copy, | |
std::vector<boundary_id_type> boundary_ids) const | |
MeshDiagnosticsGenerator::findBoundaryOverlap(const std::vector<boundary_id_type> & boundary_copy, | |
std::vector<boundary_id_type> & boundary_ids) const |
-Diagnostics can now take an additional vector parameter _watertight_boundaries
-Users can use it to input a list of sidesets/nodesets
-If supplied the diagnostic check functionality changes
-It will instead check if an external side/node is assigned to one of the provided boundary ids
-The error message for these instances is worded differently to reflect what the diagnostic check is looking for
-The t in checkWaterTightSidesets is now lowercase because it was bothering me and to match checkWatertightNodesets
closes #29077
Reason
To provide users with more mesh debugging tools
Design
Users can supply a list of boundary ids. If supplied this diagnostic check looks for sides/nodes that are external and that are not assigned to one of the prescribed boundaries.
Impact
This modifies the checkWatertightSideset and checkWatertightNodeset diagnostic tools. If no list of boundary ids is supplied however, then they behave the same as they did before.