t8code icon indicating copy to clipboard operation
t8code copied to clipboard

Copy cmesh vertex connectivity when cmesh is copied

Open holke opened this issue 5 months ago • 3 comments

Feature request

Is your feature request related to a problem? Please describe. Currently, when a cmesh is copied, its vertex connectivity is not copied with it, so the new cmesh looses the vertex conn information.

Describe the solution or feature you'd like Add a copy mechanism to the cmesh vertex connectivity classes. Ideally, we only build a new instance of the meta class "t8_cmesh_vertex_connectivity" that uses the same instances of "t8_cmesh_vertex_conn_tree_to_vertex". In order for this to properly work we might need to switch to shared pointers for the t8_cmesh_vertex_conn_tree_to_vertex members.

Add the copy to the t8_cmesh_copy function.

Add a check of the vertex connectivity to the t8_cmesh_is_equal function.

Describe alternatives you've considered N/A

Estimated priority

"Priority: medium" Should be solved within half a year

Additional context See #1758

holke avatar Jul 25 '25 12:07 holke

@sandro-elsweijer as info for you.

holke avatar Jul 25 '25 12:07 holke

Should we put a failure mechanism in place for now that prevents copying cmeshes with vertex connectivity?

holke avatar Jul 25 '25 12:07 holke

@holke I do not think it os necessary to prevent copying these cmeshes, since all the information needed to build a new vertex conn are saved as attributes and the copied cmesh should be able to re-compute this

sandro-elsweijer avatar Jul 25 '25 12:07 sandro-elsweijer