Skip to content

Commit

Permalink
Example simple: print quadrant byte size
Browse files Browse the repository at this point in the history
  • Loading branch information
cburstedde committed Nov 10, 2023
1 parent 8e92e22 commit f66a472
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions example/simple/simple2.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ main (int argc, char **argv)
else {
connectivity = p4est_connectivity_new_unitsquare ();
}

/* create forest data structure */
P4EST_GLOBAL_PRODUCTIONF ("Size of one quadrant: %d bytes\n",
(int) sizeof (p4est_quadrant_t));
p4est = p4est_new_ext (mpi->mpicomm, connectivity, 15, 0, 0,
sizeof (user_data_t), init_fn, geom);
p4est_vtk_write_file (p4est, geom, "simple2_new");
Expand Down
4 changes: 4 additions & 0 deletions example/simple/simple3.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ main (int argc, char **argv)
else {
connectivity = p8est_connectivity_new_unitcube ();
}

/* create forest data structure */
P4EST_GLOBAL_PRODUCTIONF ("Size of one quadrant: %d bytes\n",
(int) sizeof (p8est_quadrant_t));
p8est = p8est_new_ext (mpi->mpicomm, connectivity, 1, 0, 0,
sizeof (user_data_t), init_fn, NULL);

Expand Down

0 comments on commit f66a472

Please sign in to comment.