-
Notifications
You must be signed in to change notification settings - Fork 91
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
Mixed-dimensional grids for case 3, flow benchmark 3d #1096
Conversation
Thanks @jhabriel. We will have a look. |
I will add some testing of the new functionality. |
@IvarStefansson: I added some testing and renamed the folder as we discussed. Could you please have a look at the changes that I introduced? I have no further comments to the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one substantial comment
src/porepy/applications/md_grids/gmsh_file_library/benchmark_3d_case_3/mesh140k.geo
Outdated
Show resolved
Hide resolved
@keileg: I think you forgot to add the Another point to consider is that we might want to retrieve only the fracture network. For these cases, creating the Finally, this might be a rare case, but: How do we know that there is a 1-to-1 match between the fracture network and the mdg? Both, in terms of coordinates and indexing. |
Thanks!
I don't see the use case that would justify the . The data file is available and can be loaded with 1-2 lines of code. Am I missing something.
With a grid imported from a pre-generated .geo file, we cannot. |
Presumably needed for GH actions.
In my understanding, pytest fails for the following reason: Before running GH actions, PorePy is installed as a standard package (not in editable mode as we usually do) and placed in a directory Note that this, AFAIK, is the only test that uses pre-generated data files, thus this is a problem we have not encountered previously. Hence, the solution we end up with may set precedence for other cases, though I doubt there will be many of them. Options:
I don't like any of these options, but no 4 is the only one that will not crash or set strict constraints on future development. @jhabriel @IvarStefansson @OmarDuran:
|
I'm not so sure this has to do with porepy being installed in editable mode or not. I believe the problem is that Actions cannot find the A potential fix here could be to make the P.D.: If you check the |
As you know, this is not exactly my home turf. But could it be that this can be fixed in setup.py? See this: https://stackoverflow.com/questions/11848030/how-include-static-files-to-setuptools-python-package |
If you look at the path where python expects the data file to be, it is at a location which Since the source file has been moved, presumably due to the installation process, but the data file has not, this is bound to fail. We should not try to give the correct relative path, that would be bad practice for so many reasons. The |
Oh, I understand the problem now. In that case, I would go for option 4, unless there exists a more elegant alternative. |
It seems my suggestion might work. See this test run on this branch, which is based off of the branch of this PR. Note that I tried and failed at doing something a bit more targeted (specific folders only). My attempts are documented in the branch's git history. I am sure we can find a way to make that work given a bit more stubbornness and technical expertise. |
Thanks, @IvarStefansson, this looks promising. I will go ahead with your suggestion, but as you suggest, also read up a bit more before finalizing. |
@IvarStefansson I took your suggestion, which seems like an accepted solution on the internet, but narrowed the scope down to only files living within the directory of gmsh_files. We can of course expand later, but for now, caution seems preferrable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the latest changes, everything should be fine now.
Proposed changes
This PR introduces the possibility to create
mdg
s for the geometry corresponding to case 3 of the 3d flow benchmark. Four level of refinements are available (levels 0 and 1 are the ones used by UiB in the benchmark). A weak in-situ test is incorporated in the function.Please, feel free to modify and extend the functionality as you see fit.
Types of changes
What types of changes does this PR introduce to PorePy?
Put an
x
in the boxes that apply.Checklist
Put an
x
in the boxes that apply or explain briefly why the box is not relevant.pytest
was run with the--run-skipped
flag.