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

internal boundaries in with_boundaries #683

Closed
gdmcbain opened this issue Aug 9, 2021 · 3 comments · Fixed by #680
Closed

internal boundaries in with_boundaries #683

gdmcbain opened this issue Aug 9, 2021 · 3 comments · Fixed by #680

Comments

@gdmcbain
Copy link
Contributor

gdmcbain commented Aug 9, 2021

Internal boundaries were queried in #336 and support added in #340. I wanted to check that these were preserved in serialization #158 #261 under #680, but it appeared whereas they were supported by the old Mesh.define_boundary, this has been deprecated in favour of the (functional rather than mutating) Mesh.with_boundaries which doesn't support them.

The problem is in

**{name: self.facets_satisfying(test, True)

which hardcodes boundaries_only=True.

Minimal example:

m = MeshLine([0, 1, 2]).with_boundaries({"mid0": lambda x: x[0] == 1.0})
m.define_boundary("mid1", lambda x: x[0] == 1.0, boundaries_only=False)

Then m.boundaries is

{'mid0': array([], dtype=int64), 'mid1': array([1])}

@kinnala
Copy link
Owner

kinnala commented Aug 9, 2021

I'm sorry that we are are back in square one regarding the interfaces. Because the new Mesh class was quite a big refactoring, I probably deleted the one test we had with centreline interface to cut some corners.

However, can we take a critical look at the use of these interfaces. I'd like to fully understand the use cases. Now that we have probes, I think the one-dimensional example is not meaningful anymore? How about higher dimensional examples? Is the main use case to integrate over interfaces? Is there something else?

I propose that we use a separate Mesh.interfaces field, in addition to Mesh.subdomains and Mesh.boundaries, to make it clear that it is sets of internal facets. This is mainly because Mesh.boundaries would naturally connect to BoundaryFacetBasis and then Mesh.interfaces would connect to InteriorFacetBasis.

@gdmcbain
Copy link
Contributor Author

gdmcbain commented Aug 9, 2021

I'd like to fully understand the use cases. Now that we have probes, I think the one-dimensional example is not meaningful anymore? How about higher dimensional examples? Is the main use case to integrate over interfaces? Is there something else?

One use case is a hypersurface source, like a point-source but (n – 1)-dimensional; e.g. the line-load on a Kirchhoff plate mentioned in the original issue. That shows up as a linear form so it's kind of an integral, yes.

That might be the main use, but I'm also wondering about multiphysics problems in which a subprogram might be solved on a subdomain for which an interface is really a boundary. There might be better ways to handle that though.

@kinnala
Copy link
Owner

kinnala commented Aug 9, 2021

I think InteriorFacetBasis can be used for creating mortar coupling between two parts of the mesh if you have an internal boundary.

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

Successfully merging a pull request may close this issue.

2 participants