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

Subdomain meshes and local to global index mapping #1078

Open
moimmahauck opened this issue Feb 10, 2025 · 1 comment
Open

Subdomain meshes and local to global index mapping #1078

moimmahauck opened this issue Feb 10, 2025 · 1 comment

Comments

@moimmahauck
Copy link

Hi all,

I'm new to Julia and Gridap, and I think it suits my purpose well to implement a multiscale method for solving, say, elliptic PDEs. I have done such implementations in Matlab and Python before, but Julia seems like a better option to me. The idea of the multiscale methods I am interested in is that, given a coarse mesh of the domain (not necessarily resolving the coefficients), one computes problem-adapted basis functions (associated with the coarse mesh entities) by solving local (fine-scale) problems. These local problems are posed on a subdomain composed of elements in the coarse mesh, and the corresponding fine mesh can be obtained by refining the coarse mesh restricted to the subdomain. So I am wondering if it is possible with Gridap to easily create fine subdomain meshes for computing the problem-adapted basis functions and then map the local DoFs to the global DoFs (so a mapping from the fine local subdomain mesh to a fine global mesh).

I would appreciate any suggestions on how to conceptually do this and which utilities to use.

Thanks in advance!

@JordiManyer
Copy link
Member

@moimmahauck

  • You can easily get portions of the mesh by using DiscreteModelPortions. You can retrieve a map from sub-domain faces to parent faces from the d_to_dface_to_parent_dface property of the object. Note you get info for all face dimensions.

  • You can easily adapt each subdomain using the Adaptivity module. Probably some dispatching is in order, but it should be quite straighforward. Alternatively, you can refine the whole model and do portions on the refined global model.

  • A map between fine and coarse cells is given by the resulting AdaptivityGlue. There are even routines to map CellFields from the coarse mesh to the fine one and viceversa (automatically). I would have a look at the tests.

  • Mapping dofs (i.e finding a 1-to-1 correspondance) is not a general thing you can do. The tests provide interpolation and projection methods. If you want the map, you'll have to do it yourself.

Good luck.

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

No branches or pull requests

2 participants