Distort_random seems to not work with distributed meshes in parallel

71 views
Skip to first unread message

Abbas Ballout

unread,
Feb 25, 2025, 8:41:29 AMFeb 25
to deal.II User Group
Hello, 

Taking step 40 and using the GridTools::distort_random function, the mesh seems to look "broken" after a couple of AMRs when running with more than 1 mpi process (see attached screenshot ran with mpi 4). Is this normal ? This doesn't look like this is an expected behaviour after looking at the docs.
The only change I made was to add the GridTools::distort_random function after the  grid generation. (step-40.cc file is attached bellow)  

Using shared::tria doesn't seem to suffer from the same issue but it breaks saying: 
    "A parallel::shared::Triangulation needs to be refined in the same way
    on all processors, but the participating processors don't agree on the
    number of active cells."
 
Best,
Abbas
step-40.cc
Screenshot from 2025-02-25 14-28-16.png

blais...@gmail.com

unread,
Mar 17, 2025, 8:17:35 AMMar 17
to deal.II User Group
That's a very good question Abbas, I am actually not sure.
If I understand correctly, you made a distributed parallel triangulation, then distorted it then you refined it is that it? Or did you distort it after refining it?

I'll look at the code you provided and try to identify what's going on :)

Abbas Ballout

unread,
Mar 19, 2025, 1:02:11 PMMar 19
to dea...@googlegroups.com

The mesh is generated then distorted.
The code after that enters a cycle, assemble, solve, refine -> enter cycle, assemble, solve, refine -> enter cycle ....
I just slapped a distort random right after mesh generation in step 40 and it's creating that artifact after a couple of runs with more than 1 MPI core.
Seemed like a bug to me, but I was hoping someone would replicate it just to be sure.


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/U3QfnIvWq0I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dealii/bfff9e21-e7e8-46f6-aeb1-a1cd4c4dcdc1n%40googlegroups.com.

Daniel Arndt

unread,
Mar 19, 2025, 5:18:48 PMMar 19
to dea...@googlegroups.com
Abbas,

IIRC it's not allowed to refine the mesh after it has been distorted
since the new vertex locations won't communicated correctly when the
mesh is redistributed.

Best,
Daniel
> 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.
> To view this discussion visit https://groups.google.com/d/msgid/dealii/CAHZ_B5diz7NKQzb2ajkRVF019m5mfGQfPfOQw8SJ_j2P%3D2tLRA%40mail.gmail.com.

Abbas Ballout

unread,
Mar 20, 2025, 4:13:39 AMMar 20
to deal.II User Group
Daniel, 

Thanks. I didn't actually need that anyway but I stumbled over it and thought that it seemed weird.
Thanks again 

Abbas
Reply all
Reply to author
Forward
0 new messages