Skip to content

Commit

Permalink
Example simple: white space
Browse files Browse the repository at this point in the history
  • Loading branch information
cburstedde committed Oct 5, 2023
1 parent 0b7b751 commit de58569
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions doc/examples.dox
Original file line number Diff line number Diff line change
Expand Up @@ -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 <configuration> <level>`
Expand Down
8 changes: 4 additions & 4 deletions example/simple/simple2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
11 changes: 6 additions & 5 deletions example/simple/simple3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 ();
Expand Down

0 comments on commit de58569

Please sign in to comment.