Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses #212 by splitting sidesets spanning multiple blocks into separate surfaces in the mesh topology understood by XDG (the libMesh sideset data is unmodified). New data structures are introduces to support a one-to-many mapping of sidesets to discovered interface sets. The previous merge method mainly validates the model and most of the work handling merging of sidesets into the model is now done in
create_surfaces_from_sidesets_and_interfaces.As this is a more complex workflow I've tried to provide clear comments throughout. There are a couple of local functors and locally defined type aliases that were introduced at the suggestion of Codex -- there's nothing wrong with it but it's not my typical style and I may rework some of that.
Key changes:
Refactoring and Clarification of Sideset/Interface Handling:
merge_sidesets_into_interfacesmethod with a newmap_sidesets_to_discovered_interfacesmethod, which validates and maps explicit sidesets to discovered interface sets, recording associations and ensuring all sideset faces are properly represented.Surface Creation and Metadata Management:
create_surfaces_from_sidesets_and_interfacesto:New Data Structures in
LibMeshManager:sideset_interface_map_: is the coarse association map.It answers: “Which discovered interface pair or pairs does this sideset belong to?”
It stores only the interface-pair keys, so it is useful for validating coverage and for knowing whether a sideset is one-to-one or one-to-many with discovered interfaces.
sideset_interface_face_map_: is the detailed grouping map.It answers: “Which specific faces from this sideset belong to each discovered interface pair?”
This is what lets surface creation split a single sideset into multiple surfaces when the sideset spans multiple discovered interface sets.
sideset_surface_map_: is the final output association.It answers: “After surfaces are created, which surface IDs came from this sideset?”
This is mainly used in parse_metadata() so the sideset’s boundary-condition metadata can be copied onto every resulting surface.
Code Cleanup:
intersects_set,contains_set) that are no longer needed.Header File Update:
<map>inmesh_manager.hto support new data structures.