Setting boundary IDs in a parallel distributed triangulation

61 views
Skip to first unread message

maurice rohracker

unread,
Aug 18, 2022, 3:58:56 AM8/18/22
to deal.II User Group
Dear all,

We are wondering about the following:
In step-42 the boundary IDs of all active cells of a parallel distributed triangulation are set manually. Since we faced some issues while only setting them on locally owned ones, we would like to know the reason, because most other operations are only done on locally owned cells.
Is this important for the inheritance and the redistribution of cells in case of spatial adaptivity as well as the interpolate boundary functions?

Thanks for your help.

Best, Maurice

Timo Heister

unread,
Aug 18, 2022, 9:48:09 PM8/18/22
to dea...@googlegroups.com
Maurice,

Reassigning boundary IDs (or manifold IDs, material IDs) is somewhat tricky in parallel as they need to stay consistent.

While you would expect the IDs to only matter for locally owned cells, this is not enough because each process needs to know the correct constraints for all "locally active" DoFs. This requires at least the ghost layer to have the correct boundary conditions. Example: a hanging node constraint near a process boundary and the coarse DoFs have boundary values.

There following cases are safe:
1. Create coarse mesh, assign IDs the same way for all cells, then do not change IDs. Any refinement/coarsening will keep IDs updated consistently.
2. Go over all ghost and local cells and reassign IDs after any mesh change (refine/coarsen). This can be a bit tricky to get right in all cases.

Best,
Timo


--
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 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 on the web visit https://groups.google.com/d/msgid/dealii/89923d3d-e81a-4e36-9fd5-640522508959n%40googlegroups.com.

maurice rohracker

unread,
Aug 23, 2022, 3:06:53 AM8/23/22
to deal.II User Group
Thanks, Timo for your response.

I want to clarify a few things:
- since our material IDs come from the .inp mesh file and the material IDs will not change due to some physics, they should always be inherited during coarsening and refinement and we do not need to take care of them. Is it also ensured that locally owned cells will always know their neighboring material IDs, or is there some ghost exchange needed using the `dealii::GridTools::exchange_cell_data_to_ghosts()` function?

- we are currently making use of the `triangulation_.signals.post_distributed_refinement.connect()` functionality which we attach a `set_boundary_ids` function looping over all active cells (do not check if a cell is locally owned) and call it right after the mesh is read in. Is this enough to ensure that the boundary IDs are set properly, or is it safer to use `triangulation_.signals.any_change.connect()`?

Best regards,
Maurice

Timo Heister

unread,
Aug 23, 2022, 5:18:14 PM8/23/22
to dea...@googlegroups.com
Material IDs should be correct without any extra work.

If your boundary IDs are directly derived from Material IDs, you can assign them once on the coarse mesh. Otherwise, attaching to the refinement signal sound like a great approach. (I would have just done the code after mesh refinement directly, but that doesn't matter).

Reply all
Reply to author
Forward
0 new messages