Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/time_forest_partition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ t8_time_forest_create_cmesh (const char *msh_file, int mesh_dim, const char *cme
/* partition the cmesh uniformly */
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, init_level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, init_level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_profiling (cmesh_partition, 1);
t8_cmesh_commit (cmesh_partition, comm);
return cmesh_partition;
Expand Down
2 changes: 1 addition & 1 deletion example/IO/cmesh/gmsh/t8_load_and_refine_square_w_hole.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ t8_load_refine_build_forest (t8_cmesh_t cmesh, sc_MPI_Comm comm, int level)
t8_cmesh_t cmesh_partition;

t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_partition_uniform (cmesh_partition, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_commit (cmesh_partition, comm);

Expand Down
2 changes: 1 addition & 1 deletion example/IO/cmesh/gmsh/t8_read_msh_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ t8_read_msh_partition (t8_cmesh_t cmesh, const char *prefix)

t8_cmesh_init (&p_mesh);
t8_cmesh_set_derive (p_mesh, cmesh);
t8_cmesh_set_partition_uniform (p_mesh, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (p_mesh, 0, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (p_mesh, sc_MPI_COMM_WORLD);
snprintf (vtk_prefix, BUFSIZ, "%s_partition", prefix);
t8_read_msh_file_vtk (p_mesh, vtk_prefix);
Expand Down
4 changes: 2 additions & 2 deletions example/IO/cmesh/t8_cmesh_load_save.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ t8_cmesh_load_distribute (const char *fileprefix, int num_files, int no_vtk)
}
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, 0, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_partition, sc_MPI_COMM_WORLD);
if (!no_vtk) {
t8_cmesh_vtk_write_file (cmesh_partition, "cmesh_dist_loaded_partition");
Expand All @@ -67,7 +67,7 @@ t8_cmesh_save_cmesh (const char *mshfile, int dim)
cmesh = t8_cmesh_from_msh_file (mshfile, 1, sc_MPI_COMM_WORLD, dim, 0, 0);
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, 0, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_partition, sc_MPI_COMM_WORLD);
cmesh = cmesh_partition;
}
Expand Down
2 changes: 1 addition & 1 deletion example/IO/cmesh/triangle/t8_read_triangle_file.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ t8_read_triangle_file_build_cmesh (const char *prefix, int do_dup, int do_partit
t8_cmesh_init (&cmesh_part);
t8_cmesh_ref (cmesh);
t8_cmesh_set_derive (cmesh_part, cmesh);
t8_cmesh_set_partition_uniform (cmesh_part, 1, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_part, 1, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_part, sc_MPI_COMM_WORLD);
snprintf (fileprefix, BUFSIZ, "%s_t8_triangle_partition", prefix);
if (!t8_cmesh_vtk_write_file (cmesh_part, fileprefix)) {
Expand Down
2 changes: 1 addition & 1 deletion example/IO/cmesh/vtk/t8_cmesh_read_from_vtk.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ t8_forest_construct_from_vtk (const char *prefix, sc_MPI_Comm comm, const int va
if (partition) {
t8_cmesh_init (&cmesh);
t8_cmesh_set_derive (cmesh, cmesh_in);
t8_cmesh_set_partition_uniform (cmesh, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh, 0, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh, comm);
snprintf (out_file, BUFSIZ - 16, "%s_cmesh_partition", out_prefix);
t8_cmesh_vtk_write_file (cmesh, out_file);
Expand Down
4 changes: 2 additions & 2 deletions example/IO/forest/netcdf/t8_write_forest_netcdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore
cmesh = t8_cmesh_new_hypercube_hybrid (comm, 1, 0);

/* Build a (partioined) uniform forest */
forest = t8_forest_new_uniform (cmesh, default_scheme, forest_refinement_level, 0, comm);
forest = t8_forest_new_uniform (cmesh, default_scheme, forest_refinement_level, 0, 0, comm);

/* If the adapt_forest flag is set, the forest will be adapted */
if (adapt_forest) {
Expand Down Expand Up @@ -352,7 +352,7 @@ t8_example_netcdf_write_forest (sc_MPI_Comm comm, int forest_refinement_level, i
t8_global_productionf ("New cmesh was created\n");

/* Build a (partioined) uniform forest */
forest = t8_forest_new_uniform (cmesh, default_scheme, level, 0, comm);
forest = t8_forest_new_uniform (cmesh, default_scheme, level, 0, 0, comm);

t8_global_productionf ("New forest was created\n");

Expand Down
4 changes: 2 additions & 2 deletions example/advect/t8_advection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ t8_advect_create_cmesh (sc_MPI_Comm comm, int cube_type, const char *mshfile, in
}
/* partition this cmesh according to the initial refinement level */
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_partition_uniform (cmesh_partition, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_commit (cmesh_partition, comm);
return cmesh_partition;
Expand Down Expand Up @@ -938,7 +938,7 @@ t8_advect_problem_init (t8_cmesh_t cmesh, t8_flow_function_3d_fn u, t8_example_l
/* Construct uniform forest with ghosts */
default_scheme = t8_scheme_new_default_cxx ();

problem->forest = t8_forest_new_uniform (cmesh, default_scheme, level, 1, comm);
problem->forest = t8_forest_new_uniform (cmesh, default_scheme, level, 1, 0, comm);

/* Initialize the element array with num_local_elements + num_ghosts entries. */

Expand Down
16 changes: 8 additions & 8 deletions example/cmesh/t8_cmesh_geometry_examples.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_quadrangulated_disk (radius, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -138,7 +138,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_triangulated_spherical_surface_octahedron (radius, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -158,7 +158,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_triangulated_spherical_surface_icosahedron (radius, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -178,7 +178,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_quadrangulated_spherical_surface (radius, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -203,7 +203,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_cubed_spherical_shell (inner_radius, shell_thickness, num_levels, num_layers, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -227,7 +227,7 @@ main (int argc, char **argv)
t8_cmesh_t cmesh
= t8_cmesh_new_prismed_spherical_shell_octahedron (inner_radius, shell_thickness, num_levels, num_layers, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -251,7 +251,7 @@ main (int argc, char **argv)
t8_cmesh_t cmesh
= t8_cmesh_new_prismed_spherical_shell_icosahedron (inner_radius, shell_thickness, num_levels, num_layers, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand All @@ -271,7 +271,7 @@ main (int argc, char **argv)

t8_cmesh_t cmesh = t8_cmesh_new_cubed_sphere (radius, comm);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, comm);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, comm);

t8_cmesh_vtk_write_file (cmesh, prefix_cmesh);
t8_global_productionf ("Wrote %s.\n", prefix_cmesh);
Expand Down
2 changes: 1 addition & 1 deletion example/cmesh/t8_cmesh_hypercube_pad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ main (int argc, char **argv)
t8_global_productionf (" [step1] Local number of trees:\t%i\n", local_num_trees);
t8_global_productionf (" [step1] Global number of trees:\t%li\n", global_num_trees);
t8_scheme_cxx *scheme = t8_scheme_new_default_cxx ();
t8_forest_t forest = t8_forest_new_uniform (cmesh, scheme, 0, 0, sc_MPI_COMM_WORLD);
t8_forest_t forest = t8_forest_new_uniform (cmesh, scheme, 0, 0, 0, sc_MPI_COMM_WORLD);
t8_forest_vtk_write_file (forest, prefix, 1, 1, 1, 1, 0, 0, NULL);
t8_forest_unref (&forest);

Expand Down
2 changes: 1 addition & 1 deletion example/cmesh/t8_cmesh_partition.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ t8_partition (int level, int partition_from)
/* We still need access to cmesh later */
t8_cmesh_ref (cmesh);
t8_cmesh_set_derive (cmesh_part, cmesh);
t8_cmesh_set_partition_uniform (cmesh_part, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_part, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_part, sc_MPI_COMM_WORLD);
if (mpisize > 1 && 1) {
t8_cmesh_init (&cmesh_part2);
Expand Down
4 changes: 2 additions & 2 deletions example/forest/t8_test_face_iterate.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ t8_test_fiterate_refine_and_partition (t8_cmesh_t cmesh, int level, sc_MPI_Comm
/* partition the initial cmesh according to a uniform forest */
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_partition, comm);
}
else {
Expand All @@ -126,7 +126,7 @@ t8_test_fiterate_refine_and_partition (t8_cmesh_t cmesh, int level, sc_MPI_Comm
if (!no_vtk) {
t8_cmesh_vtk_write_file (cmesh_partition, "test_fiterate_cmesh1");
}
forest = t8_forest_new_uniform (cmesh_partition, t8_scheme_new_default_cxx (), level, 0, comm);
forest = t8_forest_new_uniform (cmesh_partition, t8_scheme_new_default_cxx (), level, 0, 0, comm);

t8_test_fiterate (forest);
t8_forest_init (&forest_adapt);
Expand Down
6 changes: 3 additions & 3 deletions example/forest/t8_test_ghost.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ t8_adapt_every_third_element (t8_forest_t forest, t8_forest_t forest_from, t8_lo
int level;
T8_ASSERT (!is_family || num_elements == ts->t8_element_num_children (elements[0]));
level = ts->t8_element_level (elements[0]);
if (ts->t8_element_get_linear_id (elements[0], level) % 3 == 0) {
if (ts->t8_element_get_linear_id (elements[0], level, 0) % 3 == 0) {
return 1;
}
return 0;
Expand Down Expand Up @@ -125,7 +125,7 @@ t8_test_ghost_refine_and_partition (t8_cmesh_t cmesh, const int level, sc_MPI_Co
/* partition the initial cmesh according to a uniform forest */
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_partition, comm);
}
else {
Expand All @@ -135,7 +135,7 @@ t8_test_ghost_refine_and_partition (t8_cmesh_t cmesh, const int level, sc_MPI_Co
if (!no_vtk) {
t8_cmesh_vtk_write_file (cmesh_partition, "test_ghost_cmesh1");
}
forest = t8_forest_new_uniform (cmesh_partition, t8_scheme_new_default_cxx (), level, 1, comm);
forest = t8_forest_new_uniform (cmesh_partition, t8_scheme_new_default_cxx (), level, 1, 0, comm);

/* adapt (if desired), partition and create ghosts for the forest */
t8_forest_init (&forest_ghost);
Expand Down
2 changes: 1 addition & 1 deletion example/forest/t8_test_ghost_large_level_diff.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ t8_ghost_large_level_diff (const char *prefix, int dim, int level, int refine, i
}
t8_cmesh_init (&cmesh_partition);
t8_cmesh_set_derive (cmesh_partition, cmesh);
t8_cmesh_set_partition_uniform (cmesh_partition, level, t8_scheme_new_default_cxx ());
t8_cmesh_set_partition_uniform (cmesh_partition, level, 0, t8_scheme_new_default_cxx ());
t8_cmesh_commit (cmesh_partition, comm);
if (!no_vtk) {
t8_cmesh_vtk_write_file (cmesh_partition, "partitioned_cmesh");
Expand Down
2 changes: 1 addition & 1 deletion example/geometry/t8_example_geometries.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ t8_analytic_geom (int level, t8_example_geom_type geom_type)
* 2 and refine recursively only along the boundary. */
uniform_level = geom_type == T8_GEOM_CIRCLE ? SC_MIN (2, level) : level;
/* Create a uniform forest */
forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, sc_MPI_COMM_WORLD);
forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), uniform_level, 0, 0, sc_MPI_COMM_WORLD);
if (geom_type == T8_GEOM_CIRCLE) {
t8_forest_t forest_adapt;
/* Create a forest that is only refined at the tree boundaries.
Expand Down
2 changes: 1 addition & 1 deletion example/remove/t8_example_empty_trees.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ t8_strip_of_quads (t8_gloidx_t num_trees, t8_gloidx_t empty_tree, const char **v
t8_cmesh_t cmesh
= t8_cmesh_new_hypercube_pad (T8_ECLASS_QUAD, sc_MPI_COMM_WORLD, boundary_coords, num_trees, 1, 0, use_axis_alined);

t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), 0, 0, sc_MPI_COMM_WORLD);
t8_forest_t forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), 0, 0, 0, sc_MPI_COMM_WORLD);

t8_forest_write_vtk (forest, *vtuname);
t8_debugf ("Output to %s\n", *vtuname);
Expand Down
2 changes: 1 addition & 1 deletion example/remove/t8_example_gauss_blob.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ t8_construct_spheres (const int initial_level, const double radius_inner, const
* Its center is therefore the center of the corresponding surface. */
struct t8_adapt_data adapt_data = { remove_scope, radius_inner, radius_outer, { 0.5, 0.5, 0.5 } };

forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), initial_level, 0, sc_MPI_COMM_WORLD);
forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), initial_level, 0, 0, sc_MPI_COMM_WORLD);
forest = t8_forest_new_adapt (forest, t8_adapt_refine, 0, 0, &adapt_data);
if (remove_scope > 0) {
forest = t8_forest_new_adapt (forest, t8_adapt_remove, 0, 0, &adapt_data);
Expand Down
2 changes: 1 addition & 1 deletion example/remove/t8_example_spheres.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ t8_construct_spheres (const int initial_level, const double radius_inner, const
= { 1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5, 1.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.5, 0.5, 0.5, 0.0 };
struct t8_adapt_data adapt_data = { num_spheres, radius_inner, radius_outer, midpoints };

forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), initial_level, 0, sc_MPI_COMM_WORLD);
forest = t8_forest_new_uniform (cmesh, t8_scheme_new_default_cxx (), initial_level, 0, 0, sc_MPI_COMM_WORLD);
forest = t8_forest_new_adapt (forest, t8_adapt_callback_refine, 0, 0, &adapt_data);
forest = t8_forest_new_adapt (forest, t8_adapt_callback_remove, 0, 0, &adapt_data);

Expand Down
14 changes: 8 additions & 6 deletions src/t8_cmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,13 @@ t8_cmesh_set_partition_offsets (t8_cmesh_t cmesh, t8_shmem_array_t tree_offsets)
* to \ref t8_cmesh_commit.
* \param [in,out] cmesh The cmesh to be updated.
* \param [in] element_level The refinement_level.
* \param [in] multilevel Partition the cmesh for a multilevel forest.
* \param [in] ts The element scheme describing the refinement pattern.
* We take ownership. This can be prevented by
* referencing \b ts before calling this function.
*/
void
t8_cmesh_set_partition_uniform (t8_cmesh_t cmesh, int element_level, t8_scheme_cxx_t *ts);
t8_cmesh_set_partition_uniform (t8_cmesh_t cmesh, int element_level, const int multilevel, t8_scheme_cxx_t *ts);

/** Refine the cmesh to a given level.
* Thus split each tree into x^level subtrees
Expand Down Expand Up @@ -726,19 +727,20 @@ t8_cmesh_get_partition_table (t8_cmesh_t cmesh);
* \param [in] cmesh The cmesh to be considered.
* \param [in] level The uniform refinement level to be created.
* \param [in] ts The element scheme for which to compute the bounds.
* \param [in] multilevel Flag if the ancestors will be saved as well.
* \param [out] first_local_tree The first tree that contains elements belonging to the calling processor.
* \param [out] child_in_tree_begin The global index of the first element belonging to the calling processor. Not computed if NULL.
* \param [out] element_in_tree_begin The global index of the first element belonging to the calling processor. Not computed if NULL.
* \param [out] last_local_tree The last tree that contains elements belonging to the calling processor.
* \param [out] child_in_tree_end The global index of the first element that does not belonging to
* \param [out] element_in_tree_end The global index of the first element that does not belonging to
* the calling processor anymore. Not computed if NULL.
* \param [out] first_tree_shared If not NULL, 1 or 0 is stored here depending on whether \a first_local_tree is the
* same as \a last_local_tree on the next process.
* \a cmesh must be committed before calling this function. *
*/
void
t8_cmesh_uniform_bounds (t8_cmesh_t cmesh, int level, t8_scheme_cxx_t *ts, t8_gloidx_t *first_local_tree,
t8_gloidx_t *child_in_tree_begin, t8_gloidx_t *last_local_tree, t8_gloidx_t *child_in_tree_end,
int8_t *first_tree_shared);
t8_cmesh_uniform_bounds (t8_cmesh_t cmesh, int level, t8_scheme_cxx_t *ts, const int multilevel,
t8_gloidx_t *first_local_tree, t8_gloidx_t *element_in_tree_begin,
t8_gloidx_t *last_local_tree, t8_gloidx_t *element_in_tree_end, int8_t *first_tree_shared);

/** Increase the reference counter of a cmesh.
* \param [in,out] cmesh On input, this cmesh must exist with positive
Expand Down
4 changes: 3 additions & 1 deletion src/t8_cmesh/t8_cmesh.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ t8_cmesh_init (t8_cmesh_t *pcmesh)

/* sensible (hard error) defaults */
cmesh->set_partition_level = -1;
cmesh->set_partition_multilevel = 0;
cmesh->dimension = -1; /*< ok; force user to select dimension */
cmesh->mpirank = -1;
cmesh->mpisize = -1;
Expand Down Expand Up @@ -263,14 +264,15 @@ t8_cmesh_set_partition_offsets (t8_cmesh_t cmesh, t8_shmem_array_t tree_offsets)
}

void
t8_cmesh_set_partition_uniform (t8_cmesh_t cmesh, int element_level, t8_scheme_cxx_t *ts)
t8_cmesh_set_partition_uniform (t8_cmesh_t cmesh, const int element_level, const int multilevel, t8_scheme_cxx_t *ts)
{
T8_ASSERT (t8_cmesh_is_initialized (cmesh));
T8_ASSERT (element_level >= -1);
T8_ASSERT (ts != NULL);

cmesh->set_partition = 1;
cmesh->set_partition_level = element_level;
cmesh->set_partition_multilevel = multilevel;
cmesh->set_partition_scheme = ts;
if (element_level >= 0) {
/* We overwrite any previous partition settings */
Expand Down
1 change: 1 addition & 0 deletions src/t8_cmesh/t8_cmesh_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ t8_cmesh_copy (t8_cmesh_t cmesh, t8_cmesh_t cmesh_from, sc_MPI_Comm comm)
cmesh->num_trees = cmesh_from->num_trees;
cmesh->set_partition = cmesh_from->set_partition;
cmesh->set_partition_level = cmesh_from->set_partition_level;
cmesh->set_partition_multilevel = cmesh_from->set_partition_multilevel;
T8_ASSERT (t8_cmesh_comm_is_valid (cmesh, comm));

/* Copy the tree_offsets */
Expand Down
Loading