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

Compute geometry of bg when sd is replaced #1217

Open
jhabriel opened this issue Aug 27, 2024 · 5 comments
Open

Compute geometry of bg when sd is replaced #1217

jhabriel opened this issue Aug 27, 2024 · 5 comments
Labels
question Something needs clarification.

Comments

@jhabriel
Copy link
Contributor

jhabriel commented Aug 27, 2024

Howdy!

I'm currently working on adaptive refinement and my first take on updating the mdg is to use the replace_subdomains_and_interfaces method. The method works as intended, but the boundary grid associated to the new_sd does not have its geometry computed.

This was a bit strange to me, since the geometry is almost immediately used to update the boundary conditions of a typical PorePy model. Is there a reason behind this design choice?

All the best!

@jhabriel jhabriel added the question Something needs clarification. label Aug 27, 2024
@IvarStefansson
Copy link
Contributor

Well, I guess it makes sense the boundary grids are not updated, given the method name. But I see no immediate reason why we couldn't rename it and include the boundary grid update. But the update might entail some additional mapping of stored values.

@keileg
Copy link
Contributor

keileg commented Aug 28, 2024

This is not by design. Most likely we forgot to update the functionality for grid replacement when the boundary grids were introduced. AFAIK, there are no tests where we first replace a grid and then actually use the grid for anything, so it makes sense this has been undetected until now.

@jhabriel
Copy link
Contributor Author

@IvarStefansson: I believe the old-to-new boundary data is actually mapped. It is just that the geometry of the new boundary grid is not computed.

@keileg: I see. Yes, it does make sense.

Would you be interested in some unit tests for mdg.replace_subdomain_and_interfaces())? Something like replacing the grid and then check for expected geometry / projection operators to be in place?

@keileg
Copy link
Contributor

keileg commented Aug 29, 2024

Would you be interested in some unit tests for mdg.replace_subdomain_and_interfaces())? Something like replacing the grid and then check for expected geometry / projection operators to be in place?

We would be very grateful.

Where to put these is not immediately clear: There already are some tests that use refinement, but their focus on the update of the mortar grid, hence the placement in that particular file. Anyhow, if you are willing to write some tests, we will take care of matters such as location.

@IvarStefansson
Copy link
Contributor

@IvarStefansson: I believe the old-to-new boundary data is actually mapped. It is just that the geometry of the new boundary grid is not computed.

I was actually thinking of mapping of stored variables, boundary conditions etc.

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

No branches or pull requests

3 participants