p4est  1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p8est_step3.c File Reference

This 3D example program uses p4est to solve a simple advection problem. More...

#include <p4est_to_p8est.h>
#include "p4est_step3.c"

Detailed Description

This 3D example program uses p4est to solve a simple advection problem.

It is numerically very simple, and intended to demonstrate several methods of interacting with the p4est data after it has been refined and partitioned. It demonstrates the construction of ghost layers (see p8est_ghost.h) and communication of ghost-layer data, and it demonstrates iteracting with the quadrants and quadrant boundaries through the p8est_iterate routine (see p8est_iterate.h).

the header file p4est_to_p8est.h defines preprocessor macros that map 2D p4est routines and objects to their 3D p8est counterparts. By including this file and then including the source for the 2D example p4est_step3, we convert the 2D example to a 3D example.

It is entirely possible to write a 3D-only program without relying on this mechanism. In this case use the p8est* header files, functions, and data structures.