Problem with parallelization when using hyper_cube_slit

53 views
Skip to first unread message

Roberto Porcù

unread,
Feb 20, 2018, 7:27:37 PM2/20/18
to deal.II User Group
Dear all,

I'm solving a linear elasticity problem on a cracked domain created by means
of the  GridGenerator::hyper_cube_slit  function.
When I solve it in serial everything works fine.
When I solve it in parallel I get a problem on a node which is on one
of the slit boundaries as it is possible to see from the attached pictures.
I don't understand why that is happening because I wrote other parallel codes in deal.II
and everything was always working fine. I've checked my code many times, also comparing It to the tutorials.
I am supposing there is something related to the slit.

Thanks in advance,
Roberto
cracked_domain.pdf
domain_subdivision.pdf

Roberto Porcù

unread,
Apr 11, 2018, 6:51:52 PM4/11/18
to deal.II User Group
Dear all,

  since I am still experiencing the same issue, I tried to solve a very simple and basic problem
on a domain created with the  GridGenerator::hyper_cube_slit  and then rotated of -90 degrees.

As you can see in the attached figures I am experiencing the same issue: when I run
the program in parallel there is something wrong  on the fracture of the domain. In particular there
is a problem at the intersection of the different subdomains on the fracture, as you can see
from the picture of the derivatives (I computed those derivatives with Paraview using the filter "Compute derivatives").

I attach the code of my simulation. It is a very simple code having the same structure of
tutorial step-40. I made it like this in order to make it more readable.

Looking forward to hearing from you.

Roberto
derivative.png
domain_decomposed.png
solution.png

Roberto Porcù

unread,
Apr 11, 2018, 6:54:05 PM4/11/18
to deal.II User Group
Dear all,

  in the reply to my first post I forgot the code.
I attach it to this reply.

Best

Roberto P.


On Tuesday, February 20, 2018 at 7:27:37 PM UTC-5, Roberto Porcù wrote:
cracked_domain.cc

Lucas Campos

unread,
Apr 13, 2018, 7:54:54 AM4/13/18
to deal.II User Group
Dear Roberto,

I think the problem is that you are using GridTools::transform (via GridTools::rotate), in a distributed triangulation. This should not be done, as noted here: https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceGridTools.html#a212e99cf0d923cebfa04f1d23fa60b04

If this is indeed the root of the issue, I see two options:

1. Rotate your problem, rather than your triangulation, 90 degrees. 
2. You can create a temporary local normal triangulation, rotate it, and finally copy into the distributed triangulation. That is, something in the lines of


Triangulation<2> tri_tmp;
GridGenerator::hyper_cube_slit(tri_tmp, -1, 1, false);
GridTools::rotate(-M_PI/2, tri_tmp);

triangultion.copy_triangulation(tri_tmp);
triangulation.refine_global (6);
Bests,
Lucas

Roberto Porcù

unread,
Apr 13, 2018, 1:42:01 PM4/13/18
to deal.II User Group
Dear Lucas,

  thanks very much for replying.
I tried to solve the same problem without rotating the domain. I rotated the problem.

Unfortunately the issue is still there.
I attach the new images.
I also attach the source code again because I realized that the previous one had a misplaced bracket
and was giving an error at compile time. I attached the wrong version of the file.

Thanks again.
Best,

Roberto
Screen Shot 2018-04-13 at 1.36.06 PM.png
Screen Shot 2018-04-13 at 1.36.38 PM.png
cracked_domain.cc

Timo Heister

unread,
Apr 16, 2018, 10:35:05 AM4/16/18
to dea...@googlegroups.com
Roberto,

you are setting boundary ids only for locally owned cells. I assume
this means your constraint matrix will be inconsistent because of
that.

Can you check what happens if you use the correct boundary indices on
all processors?


On Fri, Apr 13, 2018 at 1:42 PM, Roberto Porcù <robbb...@gmail.com> wrote:
> Dear Lucas,
>
> thanks very much for replying.
> I tried to solve the same problem without rotating the domain. I rotated the
> problem.
>
> Unfortunately the issue is still there.
> I attach the new images.
> I also attach the source code again because I realized that the previous one
> had a misplaced bracket
> and was giving an error at compile time. I attached the wrong version of the
> file.
>
> Thanks again.
> Best,
>
> Roberto
>
>
> On Friday, April 13, 2018 at 7:54:54 AM UTC-4, Lucas Campos wrote:
>>
>> Dear Roberto,
>>
>> I think the problem is that you are using GridTools::transform (via
>> GridTools::rotate), in a distributed triangulation. This should not be done,
>> as noted here:
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.dealii.org_8.5.0_doxygen_deal.II_namespaceGridTools.html-23a212e99cf0d923cebfa04f1d23fa60b04&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=pll_qCI8ZY-oMy-zFQG7zFp22DLzRo2a2Ceab7GJi0w&s=1eMxV5ztZtXMT485FFJZjkZ8LwrDi-oe5Ycd-W4Jisk&e=
> --
> The deal.II project is located at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=pll_qCI8ZY-oMy-zFQG7zFp22DLzRo2a2Ceab7GJi0w&s=Ns11WFvY9U3IcCB0ymEKp-tE6Iff3DP8lbDGxOnhCBM&e=
> For mailing list/forum options, see
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=pll_qCI8ZY-oMy-zFQG7zFp22DLzRo2a2Ceab7GJi0w&s=qVHJw_tDWv64VtypVSFBOXa6ybTVwKCWW2kPJBFfg7A&e=
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=pll_qCI8ZY-oMy-zFQG7zFp22DLzRo2a2Ceab7GJi0w&s=5RwG8zsOEnb0fnEnubbOjcSxVuVxHZHUvkkDs3H09Wo&e=.



--
Timo Heister
http://www.math.clemson.edu/~heister/

Roberto Porcù

unread,
Apr 17, 2018, 11:13:58 AM4/17/18
to deal.II User Group
Dear Timo.

  thank you very much. 
I removed the check on the cell when setting the boundary indicators
and now it is working correctly in parallel.
Thank you.

Best,
Roberto
Reply all
Reply to author
Forward
0 new messages