Skip to content
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ target_sources( T8 PRIVATE
t8_cmesh/t8_cmesh_internal/t8_cmesh_partition.cxx
t8_cmesh/t8_cmesh_internal/t8_cmesh_stash.c
t8_cmesh/t8_cmesh_internal/t8_cmesh_trees.cxx
t8_cmesh/t8_cmesh_internal/t8_cmesh_tree_reindex.cxx
t8_cmesh/t8_cmesh_vertex_connectivity/t8_cmesh_vertex_conn_tree_to_vertex.cxx
t8_cmesh/t8_cmesh_vertex_connectivity/t8_cmesh_vertex_conn_vertex_to_tree.cxx
t8_cmesh/t8_cmesh_vertex_connectivity/t8_cmesh_vertex_connectivity.cxx
Expand Down
7 changes: 7 additions & 0 deletions src/t8_cmesh/t8_cmesh_internal/t8_cmesh_commit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <t8_cmesh/t8_cmesh_geometry.hxx>
#include <t8_geometry/t8_geometry_handler.hxx>
#include <t8_cmesh/t8_cmesh_vertex_connectivity/t8_cmesh_vertex_connectivity.hxx>
#include <t8_cmesh/t8_cmesh_internal/t8_cmesh_tree_reindex.hxx>

/**
* A struct to hold the information about a ghost facejoin.
Expand Down Expand Up @@ -148,6 +149,12 @@ t8_cmesh_commit_replicated_new (t8_cmesh_t cmesh)
t8_stash_class_struct_t *entry;
t8_locidx_t num_trees = class_entries->elem_count, ltree;

if (cmesh->reindex_trees) {
std::map<t8_gloidx_t, t8_gloidx_t> reindexing_map = t8_cmesh_reindex_tree (cmesh);

t8_cmesh_tree_perform_reindex_inplace (stash, reindexing_map);
}

t8_cmesh_trees_init (&cmesh->trees, 1, num_trees, 0);
t8_cmesh_trees_start_part (cmesh->trees, 0, 0, num_trees, 0, 0, 1);
/* set tree classes */
Expand Down
Loading
Loading