-
Notifications
You must be signed in to change notification settings - Fork 97
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
Grid refinement #838
Grid refinement #838
Conversation
This module will contain new abstractions and tools to implement mesh refinement strategies in Gridap.
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #838 +/- ##
==========================================
+ Coverage 88.33% 88.42% +0.09%
==========================================
Files 164 172 +8
Lines 19178 19994 +816
==========================================
+ Hits 16940 17679 +739
- Misses 2238 2315 +77
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @JordiManyer ! Thanks for your work! The first concern I have got in regards to this PR has to do with the naming convention chosen. If am not wrong, we plan to also leverage all this machinery no only for GMG preconditioning, but also to transfer information among a mesh and its adapted version whenever we are in an AMR (adaptive mesh refinement and coarsening) context. Agreed? In such a case the prefix what do you think? @JordiManyer @santiagobadia ? |
I think that the current implementation is for a coarse to fine transfer (and vice versa). Anyway, we can call it Adapted even though in this case it is Adapted by Refinement only. And if we just eliminate Refinement? (not sure it makes sense, I haven't checked the code) |
Agreed.
We cannot do that, e.g., |
As a note: I've solved most of the issues we had remaining, noticeably the orientation of the adapted meshes. However this has aggravated the only issue we have left, i.e the Let me explain: Since we now properly return the orientability state of the adapted mesh, in some cases we obtain non-oriented meshes from oriented ones. Noticeably, if we start from a mesh of QUADs and refine only some of the cells, we might obtain a mixed mesh (QUADs and TRIs). Right now, I cannot guarantee that the new mesh is oriented, so I return a non-oriented mesh. In order to close this PR once and for all, I see two way outs: |
Hi @JordiManyer ... thanks a lot for your work. I would pursue to find a reasonable strategy for:
On the other hand, we have had a very long conversation above, with a lot of different branches, reasonings, etc. Do you think it may make sense to gather all the pending tasks in a central point (say a new issue with tasks + pointers). Otherwise, it might be easy to forget all the issues that might be pending? |
Hi @amartinhuertas I agree this is getting very cluttered. Also, it is holding up things in other repos, which cannot be merged until this is dealt with. I have given it some though, and I think I've come up with the best solution: In practice, we are only supporting the change of grid for BodyFittedTriangulations. Not only our current So here is my way forward: I've limited |
Ok. Let us merge the current PR (with the fixes required to have tests passing, and properly |
Please let me know when you believe the PR is ready to merge. |
@amartinhuertas When the tests are done running, I believe this can be merged. |
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.
Ok. Let us accept this PR.
Then, let us create a brand new one that gathers in the PR description as bullet points all the devs and discussions we have had that are still to be resolved.
First steps to implement grid adaptivity tools for Gridap:
RefinementRule
s andAdaptivityGlue
s, which encode the mapping between old and new cells in an adapted model.Two new types
AdaptedDiscreteModel
andAdaptedDiscreteTriangulation
, which represent aDiscreteModel
andTriangulation
that have been produced from a coarse model using some generic refinement method. They mostly wrap Gridap's equivalent types with some added features necessary to keep track of the adaptive hierarchy.Tools to be able to transfer
CellDatum
s back and forth between parent and child grids. These include changes tochange_domain
and a new type ofMeasure
which allows the integrationTriangulation
to be different from theTriangulation
of the resultingDomainContribution
.CompositeQuadrature
s, which allow to integrate over aTriangulation
usingRefinementRule
s in some or all cells (without needing a fullAdaptedModel
to be constructed.