diff --git a/example/IO/forest/netcdf/t8_write_forest_netcdf.cxx b/example/IO/forest/netcdf/t8_write_forest_netcdf.cxx index b96e060891..e56fa388a3 100644 --- a/example/IO/forest/netcdf/t8_write_forest_netcdf.cxx +++ b/example/IO/forest/netcdf/t8_write_forest_netcdf.cxx @@ -208,7 +208,7 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore forest = t8_example_netcdf_adapt (forest); } num_elements = t8_forest_get_local_num_elements (forest); - t8_productionf ("Number of process-local elements: %ld\n", num_elements); + t8_productionf ("Number of process-local elements: %ld\n", static_cast (num_elements)); /* If additional data should be written to the netCDF file, the two variables are created in the following section */ if (with_additional_data) { @@ -249,7 +249,7 @@ t8_example_compare_performance_netcdf_var_properties (sc_MPI_Comm comm, int fore } t8_global_productionf ("The uniformly refined forest (refinement level = %d) has %ld global elements.\n", - forest_refinement_level, t8_forest_get_global_num_elements (forest)); + forest_refinement_level, static_cast (t8_forest_get_global_num_elements (forest))); t8_global_productionf ( "The different netCDF variable storage patterns and mpi variable access patterns are getting tested/timed...\n"); @@ -368,7 +368,7 @@ t8_example_netcdf_write_forest (sc_MPI_Comm comm, int forest_refinement_level, i /* Print out the number of local elements of each process */ num_elements = t8_forest_get_local_num_elements (forest); - t8_debugf ("[t8] Rank %d has %ld elements\n", mpirank, num_elements); + t8_debugf ("[t8] Rank %d has %ld elements\n", mpirank, static_cast (num_elements)); /* *Example user-defined NetCDF variable* */ /* Currently, integer (32bit, 64bit) and double NetCDF variables are possible */ diff --git a/example/advect/t8_advection.cxx b/example/advect/t8_advection.cxx index e72603eb68..ecc0830fcb 100644 --- a/example/advect/t8_advection.cxx +++ b/example/advect/t8_advection.cxx @@ -1247,7 +1247,7 @@ t8_advect_solve (t8_cmesh_t cmesh, t8_flow_function_3d_fn u, t8_example_level_se for (problem->num_time_steps = 0; !done; problem->num_time_steps++, problem->t += problem->delta_t) { if (problem->num_time_steps % modulus == modulus - 1) { t8_global_essentialf ("[advect] Step %i %li elems\n", problem->num_time_steps + 1, - t8_forest_get_global_num_elements (problem->forest)); + static_cast (t8_forest_get_global_num_elements (problem->forest))); } /* Time loop */ diff --git a/example/cmesh/t8_cmesh_hypercube_pad.cxx b/example/cmesh/t8_cmesh_hypercube_pad.cxx index 8e9ca6021b..52ecefa6bc 100644 --- a/example/cmesh/t8_cmesh_hypercube_pad.cxx +++ b/example/cmesh/t8_cmesh_hypercube_pad.cxx @@ -53,7 +53,7 @@ main (int argc, char **argv) global_num_trees = t8_cmesh_get_num_trees (cmesh); t8_global_productionf (" [step1] Created coarse mesh.\n"); 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_global_productionf (" [step1] Global number of trees:\t%li\n", static_cast (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_vtk_write_file (forest, prefix, 1, 1, 1, 1, 0, 0, NULL); diff --git a/example/forest/t8_face_neighbor.cxx b/example/forest/t8_face_neighbor.cxx index e95fe3d497..8542ba9957 100644 --- a/example/forest/t8_face_neighbor.cxx +++ b/example/forest/t8_face_neighbor.cxx @@ -95,7 +95,7 @@ t8_ghost_neighbor_test (t8_eclass_t eclass, sc_MPI_Comm comm, int hybrid) if (ret != -1) { /* Anchor is only implemented in the common scheme. */ common_scheme->t8_element_anchor (neigh, anchor_node); - t8_debugf ("neighbor of %i across face %i (in tree %li): (%i,%i,%i,%i)\n", element_id, i, ret, + t8_debugf ("neighbor of %i across face %i (in tree %li): (%i,%i,%i,%i)\n", element_id, i, static_cast (ret), neigh_scheme->t8_element_level (neigh), anchor_node[0], anchor_node[1], t8_eclass_to_dimension[elem_eclass] > 2 ? anchor_node[2] : -1); } diff --git a/example/remove/t8_example_empty_trees.cxx b/example/remove/t8_example_empty_trees.cxx index af9523dc2f..42a93b8290 100644 --- a/example/remove/t8_example_empty_trees.cxx +++ b/example/remove/t8_example_empty_trees.cxx @@ -78,16 +78,17 @@ t8_strip_of_quads (t8_gloidx_t num_trees, t8_gloidx_t empty_tree, const char **v "\tlast_local_tree: %li\n" "\tlocal_num_trees: %i\n" "\tglobal_num_trees: %li\n", - forest->first_local_tree, forest->last_local_tree, t8_forest_get_num_local_trees (forest), - t8_forest_get_num_global_trees (forest)); + static_cast (forest->first_local_tree), static_cast (forest->last_local_tree), + t8_forest_get_num_local_trees (forest), static_cast (t8_forest_get_num_global_trees (forest))); t8_productionf ("The adapted forest with one empty tree:\n" "\tfirst_local_tree: %li\n" "\tlast_local_tree: %li\n" "\tlocal_num_trees: %i\n" "\tglobal_num_trees: %li\n", - forest_adapt->first_local_tree, forest_adapt->last_local_tree, - t8_forest_get_num_local_trees (forest_adapt), t8_forest_get_num_global_trees (forest_adapt)); + static_cast (forest_adapt->first_local_tree), static_cast (forest_adapt->last_local_tree), + t8_forest_get_num_local_trees (forest_adapt), + static_cast (t8_forest_get_num_global_trees (forest_adapt))); t8_forest_unref (&forest_adapt); t8_forest_unref (&forest); diff --git a/src/t8_geometry/t8_geometry_implementations/t8_geometry_analytic.hxx b/src/t8_geometry/t8_geometry_implementations/t8_geometry_analytic.hxx index 3ed3701ce5..195e0b4975 100644 --- a/src/t8_geometry/t8_geometry_implementations/t8_geometry_analytic.hxx +++ b/src/t8_geometry/t8_geometry_implementations/t8_geometry_analytic.hxx @@ -137,7 +137,7 @@ struct t8_geometry_analytic: public t8_geometry * \return True if the geometry is compatible with the tree. */ bool - t8_geom_check_tree_compatibility () const; + t8_geom_check_tree_compatibility () const override; /** Update a possible internal data buffer for per tree data. * This function is called before the first coordinates in a new tree are diff --git a/src/t8_vtk/t8_vtk_write_ASCII.cxx b/src/t8_vtk/t8_vtk_write_ASCII.cxx index f2b7f45a24..099d6a1fb5 100644 --- a/src/t8_vtk/t8_vtk_write_ASCII.cxx +++ b/src/t8_vtk/t8_vtk_write_ASCII.cxx @@ -1114,7 +1114,7 @@ t8_cmesh_vtk_write_file_ext (const t8_cmesh_t cmesh, const char *fileprefix, con /* TODO: We switched to 32 Bit because Paraview could not handle 64 well enough. */ T8_ASSERT (tree->treeid + cmesh->first_tree == (t8_gloidx_t) ((long) tree->treeid + cmesh->first_tree)); - fprintf (vtufile, " %ld", (long) tree->treeid + cmesh->first_tree); + fprintf (vtufile, " %ld", static_cast (tree->treeid + cmesh->first_tree)); if (!(sk % 8)) fprintf (vtufile, "\n "); } diff --git a/test/t8_cmesh/t8_gtest_cmesh_set_partition_offsets.cxx b/test/t8_cmesh/t8_gtest_cmesh_set_partition_offsets.cxx index 7c18a707ba..812840a971 100644 --- a/test/t8_cmesh/t8_gtest_cmesh_set_partition_offsets.cxx +++ b/test/t8_cmesh/t8_gtest_cmesh_set_partition_offsets.cxx @@ -110,7 +110,7 @@ class cmesh_set_partition_offsets_commit: public testing::TestWithParam (inum_trees)); /* Build a valid offset array. For this test it is only necessary that * the array corresponds to any valid partition. @@ -128,8 +128,8 @@ TEST_P (cmesh_set_partition_offsets_nocommit, test_set_offsets) TEST_P (cmesh_set_partition_offsets_commit, test_set_offsets) { - t8_debugf ("Testing t8_cmesh_set_partition_offset (with commit) with %li trees of class %s.\n", inum_trees, - t8_eclass_to_string[ieclass]); + t8_debugf ("Testing t8_cmesh_set_partition_offset (with commit) with %li trees of class %s.\n", + static_cast (inum_trees), t8_eclass_to_string[ieclass]); /* Build a valid offset array. For this test it is only necessary that * the array corresponds to any valid partition. diff --git a/test/t8_schemes/t8_gtest_boundary_extrude.cxx b/test/t8_schemes/t8_gtest_boundary_extrude.cxx index 7f64b3db32..b2efe9b21f 100644 --- a/test/t8_schemes/t8_gtest_boundary_extrude.cxx +++ b/test/t8_schemes/t8_gtest_boundary_extrude.cxx @@ -32,8 +32,8 @@ class class_test_boundary_extrude: public TestDFS { /* For elements that are on the face of the root element, check that creating the boundary element * and extruding it results in the original element */ - virtual void - check_element () + void + check_element () override { const int num_faces = ts->t8_element_num_faces (element); for (int iface = 0; iface < num_faces; iface++) { diff --git a/test/t8_schemes/t8_gtest_child_parent_face.cxx b/test/t8_schemes/t8_gtest_child_parent_face.cxx index c116ac2efa..b5424dd5e2 100644 --- a/test/t8_schemes/t8_gtest_child_parent_face.cxx +++ b/test/t8_schemes/t8_gtest_child_parent_face.cxx @@ -28,8 +28,8 @@ #include class class_child_parent_face: public TestDFS { - virtual void - check_element () + void + check_element () override { const int num_faces = ts->t8_element_num_faces (element); for (int iface = 0; iface < num_faces; iface++) { diff --git a/test/t8_schemes/t8_gtest_equal.cxx b/test/t8_schemes/t8_gtest_equal.cxx index 28e4e29ba4..9b0b188a93 100644 --- a/test/t8_schemes/t8_gtest_equal.cxx +++ b/test/t8_schemes/t8_gtest_equal.cxx @@ -28,8 +28,8 @@ #include "t8_gtest_dfs_base.hxx" class class_test_equal: public TestDFS { - virtual void - check_element () + void + check_element () override { const int num_children = ts->t8_element_num_children (element); for (int ichild1 = 0; ichild1 < num_children; ichild1++) { diff --git a/test/t8_schemes/t8_gtest_face_descendant.cxx b/test/t8_schemes/t8_gtest_face_descendant.cxx index 6d12e21b5b..38c01dee42 100644 --- a/test/t8_schemes/t8_gtest_face_descendant.cxx +++ b/test/t8_schemes/t8_gtest_face_descendant.cxx @@ -58,8 +58,8 @@ t8_test_manual_first_last_face_descendant (const t8_eclass_scheme_c *ts, const t } class class_descendant: public TestDFS { - virtual void - check_element () + void + check_element () override { /* Check the linear first and last descendants of an element along all faces. * For the test the descendants are computed manually by t8_test_manual_first_last_face_descendant and diff --git a/test/t8_schemes/t8_gtest_find_parent.cxx b/test/t8_schemes/t8_gtest_find_parent.cxx index ba8d10d045..5fae630077 100644 --- a/test/t8_schemes/t8_gtest_find_parent.cxx +++ b/test/t8_schemes/t8_gtest_find_parent.cxx @@ -28,8 +28,8 @@ #include class class_find_parent: public TestDFS { - virtual void - check_element () + void + check_element () override { const int num_children = ts->t8_element_num_children (element); for (int ichild = 0; ichild < num_children; ichild++) { diff --git a/test/t8_schemes/t8_gtest_nca.cxx b/test/t8_schemes/t8_gtest_nca.cxx index e78a07ece0..fc425f6301 100644 --- a/test/t8_schemes/t8_gtest_nca.cxx +++ b/test/t8_schemes/t8_gtest_nca.cxx @@ -189,19 +189,21 @@ t8_recursive_nca_check (t8_element_t *check_nca, t8_element_t *desc_a, t8_elemen * This makes debugging a lot easier, as one can reconstruct the descendants * via t8_element_set_linear_id and can directly test them instead of waiting * until the recursion reaches the faulty computation. */ - t8_debugf ("id of desc_a: %li, level: %i\n", ts->t8_element_get_linear_id (desc_a, level_a), level_a); - t8_debugf ("id of desc_b: %li, level: %i\n", ts->t8_element_get_linear_id (desc_b, level_b), level_b); + t8_debugf ("id of desc_a: %li, level: %i\n", static_cast (ts->t8_element_get_linear_id (desc_a, level_a)), + level_a); + t8_debugf ("id of desc_b: %li, level: %i\n", static_cast (ts->t8_element_get_linear_id (desc_b, level_b)), + level_b); for (int k = SC_MAX (level_a, level_b); k >= 0; k--) { - t8_debugf ("id of desc_a: %li, level: %i\n", ts->t8_element_get_linear_id (desc_a, k), k); - t8_debugf ("id of desc_b: %li, level: %i\n", ts->t8_element_get_linear_id (desc_b, k), k); + t8_debugf ("id of desc_a: %li, level: %i\n", static_cast (ts->t8_element_get_linear_id (desc_a, k)), k); + t8_debugf ("id of desc_b: %li, level: %i\n", static_cast (ts->t8_element_get_linear_id (desc_b, k)), k); } - t8_debugf ("id of the correct nca: %li, level: %i\n", ts->t8_element_get_linear_id (check_nca, level_c), - level_c); + t8_debugf ("id of the correct nca: %li, level: %i\n", + static_cast (ts->t8_element_get_linear_id (check_nca, level_c)), level_c); - t8_debugf ("id of the computed nca: %li, level: %i\n", ts->t8_element_get_linear_id (check, level_nca), - level_nca); + t8_debugf ("id of the computed nca: %li, level: %i\n", + static_cast (ts->t8_element_get_linear_id (check, level_nca)), level_nca); SC_ABORT ("Computed nca is not the correct nca!\n"); } diff --git a/test/t8_schemes/t8_gtest_pack_unpack.cxx b/test/t8_schemes/t8_gtest_pack_unpack.cxx index 4fed178fd6..8513cb8b68 100644 --- a/test/t8_schemes/t8_gtest_pack_unpack.cxx +++ b/test/t8_schemes/t8_gtest_pack_unpack.cxx @@ -30,10 +30,9 @@ * Here, each element is sent individually. */ class class_test_pack: public TestDFS { - virtual void - /* pack the element and its children, send to ourself, unpack and check if it is the same element */ - check_element () + void + check_element () override { size_t count = 1; int position = 0; diff --git a/tutorials/general/t8_step1_coarsemesh.cxx b/tutorials/general/t8_step1_coarsemesh.cxx index c21a7b26c9..e4cd562ba5 100644 --- a/tutorials/general/t8_step1_coarsemesh.cxx +++ b/tutorials/general/t8_step1_coarsemesh.cxx @@ -121,7 +121,7 @@ main (int argc, char **argv) global_num_trees = t8_cmesh_get_num_trees (cmesh); t8_global_productionf (" [step1] Created coarse mesh.\n"); 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_global_productionf (" [step1] Global number of trees:\t%li\n", static_cast (global_num_trees)); t8_step1_write_cmesh_vtk (cmesh, prefix); t8_global_productionf (" [step1] Wrote coarse mesh to vtu files: %s*\n", prefix); t8_step1_destroy_cmesh (cmesh); diff --git a/tutorials/general/t8_step2_uniform_forest.cxx b/tutorials/general/t8_step2_uniform_forest.cxx index 8f50c99f2f..80b5c6eec5 100644 --- a/tutorials/general/t8_step2_uniform_forest.cxx +++ b/tutorials/general/t8_step2_uniform_forest.cxx @@ -163,7 +163,7 @@ main (int argc, char **argv) t8_global_productionf (" [step2] Created uniform forest.\n"); t8_global_productionf (" [step2] Refinement level:\t\t\t%i\n", level); t8_global_productionf (" [step2] Local number of elements:\t\t%i\n", local_num_elements); - t8_global_productionf (" [step2] Global number of elements:\t%li\n", global_num_elements); + t8_global_productionf (" [step2] Global number of elements:\t%li\n", static_cast (global_num_elements)); /* Write forest to vtu files. */ t8_step2_write_forest_vtk (forest, prefix); diff --git a/tutorials/general/t8_step3_adapt_forest.cxx b/tutorials/general/t8_step3_adapt_forest.cxx index 58b11f3482..3fb53d0589 100644 --- a/tutorials/general/t8_step3_adapt_forest.cxx +++ b/tutorials/general/t8_step3_adapt_forest.cxx @@ -168,7 +168,7 @@ t8_step3_print_forest_information (t8_forest_t forest) /* Get the global number of elements. */ global_num_elements = t8_forest_get_global_num_elements (forest); t8_global_productionf (" [step3] Local number of elements:\t\t%i\n", local_num_elements); - t8_global_productionf (" [step3] Global number of elements:\t%li\n", global_num_elements); + t8_global_productionf (" [step3] Global number of elements:\t%li\n", static_cast (global_num_elements)); } int diff --git a/tutorials/general/t8_tutorial_search.cxx b/tutorials/general/t8_tutorial_search.cxx index adf6164192..6829b19bfc 100644 --- a/tutorials/general/t8_tutorial_search.cxx +++ b/tutorials/general/t8_tutorial_search.cxx @@ -295,7 +295,8 @@ t8_tutorial_search_for_particles (t8_forest_t forest, sc_array *particles) /* Print the number of elements and number of searched elements. */ global_num_elements = t8_forest_get_global_num_elements (forest); - t8_global_productionf (" [search] Searched forest with %li global elements.\n", global_num_elements); + t8_global_productionf (" [search] Searched forest with %li global elements.\n", + static_cast (global_num_elements)); t8_global_errorf (" [search] Looked at %i elements during search.\n", global_num_searched_elements); /*