Skip to content
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

Make mesh stitcher issue warnings or errors #3580

Open
YaqiWang opened this issue Jun 12, 2023 · 4 comments
Open

Make mesh stitcher issue warnings or errors #3580

YaqiWang opened this issue Jun 12, 2023 · 4 comments
Assignees

Comments

@YaqiWang
Copy link
Contributor

@roystgnr brought this up during a meeting; when the stitcher tries to stitch two meshes, even though the two side sets to be stitched are not connected, the stitcher will return without any error. For flexibility, we might do not want the two side sets exactly overlap geometrically, but such a case should be considered as a warning or an error. We could also have cases that nodes on one side geometrically within the side set on the other side but do not have any nodes to be merged with. It could be a good idea to issue a warning at the end to tell users that a list of such nodes.

@roystgnr roystgnr self-assigned this Jun 12, 2023
@roystgnr
Copy link
Member

Wondering if @jwpeterson has thoughts; I think he wrote most of the mesh stitching code.

The case that surprised me recently was when I stitched zero nodes without that throwing an error, but I could easily imagine a new user trying to e.g. stitch an NxN grid to an MxM grid and then being surprised if, for the N!=M case, that results in a slit mesh rather than an error message.

@dknez
Copy link
Member

dknez commented Jun 12, 2023

We do have errors for this, e.g. see enforce_all_nodes_match_on_boundaries.

It's important to be able to turn that off, though, since in some cases we want to allow the nodes to be "non-conforming" and to instead add constraints to connect the meshes.

@roystgnr
Copy link
Member

enforce_all_nodes_match_on_boundaries

The catch we have is that it's way too common for users to want to stitch a fraction of a boundary - two hexagons, with the same boundary id on the entire boundary of each, but only 1/6th of the one is going to get stitched to 1/6 of the other.

It's important to be able to turn that off, though, since in some cases we want to allow the nodes to be "non-conforming" and to instead add constraints to connect the meshes.

That's the kind of thing I was hoping/fearing to hear! So you might want to get a N->M slit topologically, then, but connect the two solutions in the weak sense only? I guess stitching 0 nodes is even a limiting case of that? So any new error checking along these lines would also need to be optional, and off by default for backwards compatibilty.

@dknez
Copy link
Member

dknez commented Jun 12, 2023

That's the kind of thing I was hoping/fearing to hear! So you might want to get a N->M slit topologically, then, but connect the two solutions in the weak sense only?

Yes, we allow this, though we typically use "multi-node constraints" to connect any misaligned nodes. This uses constraint-based connections (similar to what we do for "hanging node constraints" in libMesh) rather than "weak enforcement".

I guess stitching 0 nodes is even a limiting case of that? So any new error checking along these lines would also need to be optional, and off by default for backwards compatibilty.

Yes, stitching 0 nodes is certainly a relevant case for us. We use the following approach:

  • stitch any "aligned" nodes (so that we can skip multi-node constraints on those)
  • constrain any "misaligned" nodes to "catch" the remaining nodes
    It could happen that there are zero "aligned" nodes, and hence all the nodes are connected via constraints. You could say "why call stitch meshes" in that case? The reason is that we don't know a priori if there are any aligned nodes or not, and hence we call stitch meshes and apply the approach above with the expectation that there may be 0 or more than 0 aligned nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants