p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
The p4est parallel adaptive mesh refinement library
Author
Carsten Burstedde, Lucas C. Wilcox, Tobin Isaac et.al.

p4est is a software library for parallel adaptive mesh refinement (AMR). It represents the mesh as one or more conforming hexahedra that can be individually refined as adaptive octrees, yielding a distributed non-conforming mesh. Both 2D and 3D are supported. p4est is intended to be compiled and linked against by numerical simulation codes that require efficient in-core, static or dynamic load balancing and (re-)adaptation of the computational mesh.

The p4est provides data structures and routines for all of the following:

  • creating a coarse computational mesh;
  • adapting the mesh by refining, coarsening, and enforcing 2:1 conditions between neighbors;
  • partitioning a mesh between MPI processes;
  • visualizing a mesh;
  • communicating ghost layers and data between processes;
  • converting the octree format to other static mesh formats;
  • etc.

More guidance on the usage of p4est can be found in p4est-howto.pdf, which is distributed with the source under the doc/ directory.

We provide installation instructions under Installation. To build the p4est library from a tar distribution, use the standard procedure of the GNU autotools. The configure script takes the following options:

  • --enable-debug lowers the log level for increased verbosity and activates the P4EST_ASSERT macro for consistency checks.
  • --enable-mpi pulls in the mpi.h include file and activates the MPI compiler wrappers. If this option is not given, wrappers for MPI routines are used instead and the code is compiled in serial only.
  • --disable-mpiio may be used to avoid using MPI_File based calls.

A typical development configure line looks as follows (your mileage may vary wrt. compiler-dependent warning options):

relative/path/to/configure CFLAGS="-Wall -Wuninitialized -O0 -g" --enable-mpi --enable-debug

A typical production configure line looks as follows:

relative/path/to/configure CFLAGS="-Wall -Wno-unused-but-set-variable -O2" --enable-mpi

See also
http://www.p4est.org/
http://www.gnu.org/licenses/licenses.html