Conversation
|
A note on performance: for a Voronoi grid with 200 000 cells (with 4 to 9 edges per face), 90% of the time is spent in the deduplication. That seems excessive; secondly, deduplication might even have better memory access patterns... Another issue is maintaining the order of the elements, such that node or face data can be mapped to the pyvista grid directly. Since we know the number of elements in advance, we might pre-allocate everything and then scatter the elements immediately instead of the current concatenation approach. |
|
Turns out VTK has I think the best solution is to pre-allocate everything, store the proper indices and write to the pre-allocated buffer directly in the order of the data (e.g. n_layer, n_face; or n_layer, n_node). |
No description provided.