From 463cb28ff8d7ee6fd0e5b5202ff6a4723c896c35 Mon Sep 17 00:00:00 2001 From: Carsten Burstedde Date: Tue, 20 Feb 2024 10:49:38 +0100 Subject: [PATCH] Leave some comments in the tutorial programs --- example/tutorials/t0_new.c | 9 +++++++++ example/tutorials/t1_conn_tree.c | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/example/tutorials/t0_new.c b/example/tutorials/t0_new.c index 9e5bdd67a..3b7cb23e9 100644 --- a/example/tutorials/t0_new.c +++ b/example/tutorials/t0_new.c @@ -1,3 +1,12 @@ +/* please add the usual GPL license header */ + +/* what about renaming? + t0_init + t1_new + t1_file + t2_refine + */ + #include /* Include the p4est library header for parallel adaptive mesh refinement. */ int main (int argc, char ** argv) { diff --git a/example/tutorials/t1_conn_tree.c b/example/tutorials/t1_conn_tree.c index 285226a00..431b7743a 100644 --- a/example/tutorials/t1_conn_tree.c +++ b/example/tutorials/t1_conn_tree.c @@ -1,7 +1,12 @@ -#include +#include #include +/* also please run p4estindent on all main programs */ + int main (int argc, char **argv) { + /* document me */ + const int minlevel = 3; + /* Declare the MPI communicator and initialize the MPI environment */ sc_MPI_Comm mpicomm = sc_MPI_COMM_WORLD; int mpiret = sc_MPI_Init(&argc, &argv); @@ -19,7 +24,9 @@ int main (int argc, char **argv) { /* Create a new p4est structure (forest of quadtrees) with the created connectivity */ p4est_t *p4est; - p4est = p4est_new(mpicomm, conn, 0, NULL, NULL); + /* please comment on minlevel, fill_uniform always 1, min_quadrants always 0 + (to make the mesh independend from the number of processes */ + p4est = p4est_new_ext (mpicomm, conn, 0, minlevel, 1, 0, NULL, NULL); /* Write the forest structure to a VTK file for visualization purposes */ /* The filename will be prefixed with "p4est_a_unitsquare" */