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
Transferring gradients between submeshes for Neumann boundary conditions #4258
Comments
There is no clear example of this as it is very problem specific. The process should go like
See https://github.com/mfem/mfem/blob/navier-urans/miniapps/navier/tests/test_normal_stress.cpp. This works fine in serial but needs some kind of communication scheme in parallel. This is currently work in progress to be a feature with gslib Hope this helps. |
Thanks @jandrej. I see it's trickier than I thought. The typical Neumann condition requires that the appropriate derivative is a constant along the boundary. We need to do something like this more generic method you've posted so that the derivative is the correct value at each point. |
Hi @jandrej , thanks for the clarification. You mentioned that the code works well in serial, but needs some work for it to work in parallel. Looking at the code, I see the code uses ParMesh and the |
If the mesh is actually distributed, the element numbers don't match on each MPI rank. That part of the algorithm is basically missing. gslib knows which element it found on what MPI rank but the gather/scatter requires a custom data package to be communicated. We're currently trying to get gslib to accommodate that. |
thank you for clarifying |
@colmenaresj @bclyons12 I have setup #4270 that implements the functionality you are looking for. Please test it out for use case. |
Hi @kmittal2 , I have some time now to give this a try. However, for us it is important that we can run on GPUs. Does GSLIB work on GPUs? Or of it has to run on CPU, will it add a big overhead? |
@colmenaresj FindPointsGSLIB for GPUs is currently under development, so running on CPUs is the only option. The overhead depends on your problem size. |
In the multidomain miniapp, there is a clear example for how to transfer the value of a solution from one submesh to another on a boundary in order to impose Dirichlet boundary conditions. You make a transfer map, then perform the transfer:
then
What if instead I want to know the gradient on the boundary from the first submesh and use that as a Neumann boundary condition in the second submesh? Is there any example of this?
The text was updated successfully, but these errors were encountered: