diff --git a/doc/examples.dox b/doc/examples.dox index d32f4b956..da4f371bc 100644 --- a/doc/examples.dox +++ b/doc/examples.dox @@ -143,9 +143,9 @@ */ /** \example simple/simple2.c - * This application generates, refines, and adjusts an internally set - * geometry. The resulting VTK files visually present each stage of the - * mesh modification procedure. + * This application generates, refines, and adjusts a mesh set on the command line. + * The resulting VTK files visually present each stage of the mesh + * modification procedure. * * Usage: * > `p4est_simple ` diff --git a/example/simple/simple2.c b/example/simple/simple2.c index 9363f5b61..289da0fc7 100644 --- a/example/simple/simple2.c +++ b/example/simple/simple2.c @@ -273,7 +273,7 @@ main (int argc, char **argv) p4est_coarsen_t coarsen_fn; simple_config_t config; const simple_regression_t *r; - int nbrick_x=1, nbrick_y=1; + int nbrick_x = 1, nbrick_y = 1; /* initialize MPI and p4est internals */ mpiret = sc_MPI_Init (&argc, &argv); @@ -395,8 +395,8 @@ main (int argc, char **argv) /* create connectivity and forest structures */ geom = NULL; if (config == P4EST_CONFIG_BRICK) { - nbrick_x = argc > 3 ? atoi(argv[3]) : 3; - nbrick_y = argc > 4 ? atoi(argv[4]) : 2; + nbrick_x = argc > 3 ? atoi (argv[3]) : 3; + nbrick_y = argc > 4 ? atoi (argv[4]) : 2; connectivity = p4est_connectivity_new_brick (nbrick_x, nbrick_y, 0, 0); } else if (config == P4EST_CONFIG_THREE || config == P4EST_CONFIG_EVIL3) { @@ -486,7 +486,7 @@ main (int argc, char **argv) p4est_balance (p4est, P4EST_CONNECT_FULL, init_fn); P4EST_ASSERT (p4est_checksum (p4est) == crc); #endif - + /* print and verify forest checksum */ P4EST_GLOBAL_STATISTICSF ("Tree checksum 0x%08x\n", crc); if (mpi->mpirank == 0) { diff --git a/example/simple/simple3.c b/example/simple/simple3.c index 4f9528eb0..bdee6b25a 100644 --- a/example/simple/simple3.c +++ b/example/simple/simple3.c @@ -180,7 +180,7 @@ main (int argc, char **argv) p8est_coarsen_t coarsen_fn; simple_config_t config; const simple_regression_t *r; - int nbrick_x=1, nbrick_y=1, nbrick_z=1; + int nbrick_x = 1, nbrick_y = 1, nbrick_z = 1; /* initialize MPI and p4est internals */ mpiret = sc_MPI_Init (&argc, &argv); @@ -256,10 +256,11 @@ main (int argc, char **argv) /* create connectivity and forest structures */ geom = NULL; if (config == P8EST_CONFIG_BRICK) { - nbrick_x = argc > 3 ? atoi(argv[3]) : 3; - nbrick_y = argc > 4 ? atoi(argv[4]) : 2; - nbrick_z = argc > 5 ? atoi(argv[5]) : 1; - connectivity = p8est_connectivity_new_brick (nbrick_x, nbrick_y, nbrick_z, 0, 0, 0); + nbrick_x = argc > 3 ? atoi (argv[3]) : 3; + nbrick_y = argc > 4 ? atoi (argv[4]) : 2; + nbrick_z = argc > 5 ? atoi (argv[5]) : 1; + connectivity = + p8est_connectivity_new_brick (nbrick_x, nbrick_y, nbrick_z, 0, 0, 0); } else if (config == P8EST_CONFIG_PERIODIC) { connectivity = p8est_connectivity_new_periodic ();