Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using shared_ptr comparison for entity_maps keys #3278

Closed
jorgensd opened this issue Jun 21, 2024 · 0 comments
Closed

using shared_ptr comparison for entity_maps keys #3278

jorgensd opened this issue Jun 21, 2024 · 0 comments
Labels
bug Something isn't working high-priority

Comments

@jorgensd
Copy link
Member

jorgensd commented Jun 21, 2024

Summarize the issue

The current code relies on the key of the entity_map being a shared ptr.
This is not safe, as different shared_ptr instances to the same object will give an inequality, ref:
https://cplusplus.com/reference/memory/shared_ptr/operators/
Already been mentioned in: #3262 (comment)

Version

main branch

DOLFINx git commit

f6a86aa

Installation

No response

Additional information

I think we need to use strings to identify the different meshes, as I do not see any scalable way of comparing whole mesh objects (would have to compare all underlying topology and geometry structures, which is very expensive.

@jorgensd jorgensd added bug Something isn't working high-priority labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

2 participants