Grid deformation after load-balancing

58 views
Skip to first unread message

shahab.g...@gmail.com

unread,
Jul 28, 2021, 6:48:50 PM7/28/21
to deal.II User Group
Dear All,

I have noticed that some moving grids get deformed after load-balancing. I should mention that this only happens when I move the grid using GridTools::rotate or GridTools::shift, and only for curved geometries. For instance, it doesn't happen in a box, but I've observed this problem in cylinders. Furthermore, only the cells which are exchanged between the processors during load-balancing get deformed. I've attached an image of this problem. It shows a rotating cylinder. On the left, it shows the triangulation output before load-balancing. On the right, you can see the triangulation after load-balancing and how the exchanged cells are deformed (inside the red circle).

I would appreciate it if you give me any suggestions about the reason for this problem. Thank you in advance.

Best regards,
Shahab
image(1).png

Bruno Turcksin

unread,
Jul 29, 2021, 2:50:09 PM7/29/21
to deal.II User Group
Shahab,

Can you quantify the deformation? It would be useful if you could output the coordinates of the vertices of the deformed cells before and after load balancing. It is possible that's a rendering issue but it's hard to tell without having numbers.

Best,

Bruno

shahab.g...@gmail.com

unread,
Aug 2, 2021, 1:12:09 PM8/2/21
to deal.II User Group
Dear Bruno,

Thank you for your reply.
I am 100% sure that this is not a rendering issue, because in my solver the particles that are located on top of this boundary are influenced by the deformation of the cells.
How can I exactly quantify the deformation?

Best,
Shahab

Bruno Turcksin

unread,
Aug 2, 2021, 3:33:59 PM8/2/21
to deal.II User Group
Shahab.

You can loop over the cells, get the vertices (see https://dealii.org/current/doxygen/deal.II/classTriaAccessor.html#a3dd6518eb0cf5fccc5926470128415d9) and print the Point associated to each vertex. Then you can compare the vertices before and after load balancing.

Best,

Bruno

peterrum

unread,
Aug 4, 2021, 3:43:15 AM8/4/21
to deal.II User Group
Hi Shahab,

My best guess is that the attached manifold is not consistent to what you need after the grid transformations. You have to be aware that the attached manifold is used for generating new vertices (as it is needed during AMR/load-balancing in regions that is newly owned by a rank). Maybe you could attach a new `CylindricalManifold` via  `tria.set_manifold(0, CylindricalManifold<3>(/*TODO: appropriate arguments*/));` (with arguments consistent to the transformation). Hopefully, this fixes your problem!

PM

blais...@gmail.com

unread,
Aug 4, 2021, 8:57:01 AM8/4/21
to deal.II User Group
Peter this is what I suspected :).
Is that not a bit of an ill-defined behavior for the triangulations? Shouldnt the manifolds also translate themselves when the triangulation is translated?
Clearly, it is possible to reset the manifold every time the triangulation is moved, but this becomes a very manual process. I feel like it would be some sort of a hack.

peterrum

unread,
Aug 4, 2021, 9:53:27 AM8/4/21
to deal.II User Group
I must admit I don't know how to transform manifolds, let alone if it is possible! Maybe someone else has an idea?

Separate if this, could you try out what I have described and see if it resolves the problem. At least than, we have an idea what the cause is what is at least a better stage we had before!

Peter

Wolfgang Bangerth

unread,
Aug 4, 2021, 10:11:03 AM8/4/21
to dea...@googlegroups.com
On 8/4/21 6:57 AM, blais...@gmail.com wrote:
>
> Is that not a bit of an ill-defined behavior for the triangulations? Shouldnt
> the manifolds also translate themselves when the triangulation is translated?

This is a discussion we had at some point when we looked at the
GridTools::transform() function where that issue is even documented. You're
right that in principle, one would want to transform the manifold along with
the mesh, but nobody had an idea of how to do that in practice.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

blais...@gmail.com

unread,
Aug 4, 2021, 10:16:44 AM8/4/21
to deal.II User Group
Yeah I expected this...
I would not know how to do this either. It would require that every manifold has some sort of "center of mass" variable that would be used to define the centroid of the manifold, but that would be some pretty heavy stuff to refactor and I am not sure it would lead to a cleaner design.

You are right that this is already very well documented in the GridTools::transform() documentation :). I need to learn to read the documentation a bit more before asking :)

shahab.g...@gmail.com

unread,
Aug 4, 2021, 10:27:40 AM8/4/21
to deal.II User Group
Dear Wolfgang, Bruno and Peter,

Thank you for your helps. It was my fault for not reading the entire function's documentation before asking the question here.

Best
Shahab

Wolfgang Bangerth

unread,
Aug 4, 2021, 10:43:11 AM8/4/21
to dea...@googlegroups.com
On 8/4/21 8:16 AM, blais...@gmail.com wrote:
> I would not know how to do this either. It would require that every manifold
> has some sort of "center of mass" variable that would be used to define the
> centroid of the manifold, but that would be some pretty heavy stuff to
> refactor and I am not sure it would lead to a cleaner design.

And that only covers translations and maybe rotations, but not any other kind
of transformation :-)

Cheers
W>
Reply all
Reply to author
Forward
0 new messages