Skip to content

Conversation

aritorto
Copy link
Member

@aritorto aritorto commented Jul 24, 2025

This PR avoids implicit derived-to-base conversion (use Entity instead of EntityRep) by overloading id with explicit types Entity, codim = 0 and 3, ensuring the correct ids are used for Entity<0> and Entity<3> in CpGrid with LGRs.

Alternative to #902, #905.
Cons: It ruins the efforts made in #892.

We expect the ids of Entity and EntityRep to only coincide in the level zero grid, for CpGrid with LGRs.
In serial execution, this works as intended.

Grid level / Method addLgrsUpdateLeafView() adapt() globalRefine(1)
Expected (serial execution)
level zero grid coincide coincide coincide
refined level grid differ differ differ
leaf grid differ differ differ

However, tests show that in parallel execution, they also differ in level zero grid.

Grid level / Method addLgrsUpdateLeafView() adapt() globalRefine(1)
Observed (parallel execution)
level zero grid differ differ differ
refined level grid differ differ differ
leaf grid differ differ differ

Bug-fix: synchronization of cell ids for the case when the grid has been refined via adapt() in both its distributed and global view, GlobalIdMapping.pointMapping_ was empty in this case.

@aritorto aritorto added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Jul 24, 2025
@aritorto aritorto marked this pull request as draft July 24, 2025 12:39
@aritorto aritorto force-pushed the idEntityOverload branch 3 times, most recently from 5028387 to 5f82bca Compare July 25, 2025 08:30
@aritorto
Copy link
Member Author

jenkins build this serial please

@aritorto aritorto changed the title Id entity overload id(Entity) vs id(EntityRep): avoid derived-to-base conversion Jul 25, 2025
@aritorto
Copy link
Member Author

aritorto commented Aug 1, 2025

jenkins build this serial please

1 similar comment
@aritorto
Copy link
Member Author

aritorto commented Aug 4, 2025

jenkins build this serial please

@aritorto aritorto marked this pull request as ready for review August 4, 2025 07:35
@aritorto
Copy link
Member Author

aritorto commented Aug 8, 2025

jenkins build this serial please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant