On 12/16/25 14:05, Nihar Bhardwaj Darbhamulla wrote:

I've tried two things with single constraint partitioning:

 1. Connect triangulation.signals.weight in the constructor of my class,
    before the GridGenerator is called. In this case, the partitioning
    balances the cells based on the weighting function, and only works when
    the weighting function does not depend on the material_id (makes sense, as
    we don't set material ids while generating the Grid).
 2. Accept the first partitioning as is (an even split across p processes),
    and connect triangulation.signals.weight after GridGenerator is called,
    and then call GridTools::partition_triangulation. While this assigns the
    subdomain_ids to cells correctly, based on the partitioners output, the
    active_cell_indices are not updated, which results in the dof handler
    showing unexpected behaviour.

Therefore, I believe the problem simplifies to how to repartition and update the active cells in the new partition in the case of parallel::shared::Triangulation.

Nihar -- I have tried to understand what it is you want to do, but have to admit that it is difficult to understand someone else's 600+ lines of code :-(

If I understand you right, then the problem is in 2. above. But I'm not clear what exactly the problem is. For parallel::shared::Triangulation, then mesh remains unchanged during partitioning, and consequently active_cell_indices should remain unchanged. The only thing partitioning does is to assign a subdomain_id to each cell. Based on the picture you show, this seems to be working as expected. (I assume that your domain is split into an upper and a lower half with regards to the physics, and that the left picture shows your multiconstraint partitioning in which every one of the four processes has a part of the two physics domains. If these assumptions are right, then the picture looks reasonable.)

So then the remaining question is "which results in the dof handler showing unexpected behaviour." Here, I'm out of my depth: Can you be more specific about what it is you expect, what it is you see, and how these differ?

Best
 WB

--
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/9c9ade72-6d7b-4bb9-9097-b27610906c65%40colostate.edu.

Reply via email to