Skip to content

Commit

Permalink
Leave some comments in the tutorial programs
Browse files Browse the repository at this point in the history
  • Loading branch information
cburstedde committed Feb 20, 2024
1 parent bbf939d commit 463cb28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions example/tutorials/t0_new.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/* please add the usual GPL license header */

/* what about renaming?
t0_init
t1_new
t1_file
t2_refine
*/

#include <p4est.h> /* Include the p4est library header for parallel adaptive mesh refinement. */

int main (int argc, char ** argv) {
Expand Down
11 changes: 9 additions & 2 deletions example/tutorials/t1_conn_tree.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#include <p4est.h>
#include <p4est_extended.h>
#include <p4est_vtk.h>

/* 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);
Expand All @@ -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" */
Expand Down

0 comments on commit 463cb28

Please sign in to comment.