-
Notifications
You must be signed in to change notification settings - Fork 93
1325 translate physical names from gmsh meshes to porepy tags #1392
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
base: develop
Are you sure you want to change the base?
1325 translate physical names from gmsh meshes to porepy tags #1392
Conversation
…prove tagging functionality
…prove tagging in tests
Removed typing, minor improvements of the implementation
Will likely lead to downstream errors in mypy
Thanks for the effort, @pschultzendorff @zhangyh0713. I will have a go at improving the tests now. |
No need to try to generate a 3d mesh for 2d domains
Not really working, but upload it in the hope we can do better later
I tried a different take on adding physical groups to mesh entities compared to the one outlined in the tests (the suggestion there was to alter the generated mesh, I tried to work with gmsh prior to grid construction. However, I could not make things work, and have some vague ideas about how. Most important is that I realized it is not clear to me what we want to achieve: a) Control the physical names of grid entities in the existing PorePy framework (this is potentially dangerous, since mesh construction depends on hard coded physical names etc.), b) Define new grid entities and physical groups, and use these to define facies and similar. To be continued. |
@pschultzendorff I think the two of us need to discuss the scope of this project before making the final push. |
Proposed changes
Writing this on my phone, apologies for anything I miss and any name errors.
This PR introduces functionality to translate physical names from ‘’.msh’’ files to tags in the sense of ‘’pp.Grid.tags’’. This allows, e.g., to easily recreate the geometry of SPE11 by loading the grid and assigning permeability and porosity based on tags.
Porepy offers functionality to import from ‘.msh’ files via ‘’pp.fracs.fracture_importer. dfm_from_gmsh’’. At some point in the process, ‘’pp.fracs.msh_2_grid.create_nd_grids’’ is called to create nd subdomain grids.
We introduce a helper function ‘’tag_grids’’ which takes the information available to ‘’create_nd_grids’’ and the created subdomain grid and updates ‘‘grid.tags’’ accordingly. The function is called by every ‘’create_nd_grids’’ at the very end.
So far done:
ToDo:
Hope this gives a good overview, let us know if you need more info
Types of changes
Checklist
pytest
was run with the--run-skipped
flag.