Quick start • Documentation • Contributing • Citation
P4estTypes.jl provides a Julia type-based interface to the distributed (via MPI) forest-of-octrees library p4est by leveraging P4est.jl (which provides low-level Julia bindings to the p4est API).
using P4estTypes, MPI;
MPI.Init();
forest = pxest(brick(3, 2))
refine = (_, treeid, quadrant) -> treeid == 1 && coordinates(quadrant) == (0, 0)
refine!(forest; refine, recursive = true, maxlevel = 5)
balance!(forest)
partition!(forest)
P4estTypes.savevtk("forest_2d", forest)
The 3-by-2 rectilinear forest-of-quadtrees generated by running the above code on 5 MPI ranks is visualized below (using a paraview script to generate a PNG file from the VTK files).
Similarly, the following code generates a 3-by-2-by-4 rectilinear forest-of-octrees.
using P4estTypes, MPI;
MPI.Init();
forest = pxest(brick(3, 2, 4))
refine = (_, treeid, octant) -> treeid == 1 && coordinates(octant) == (0, 0, 0)
refine!(forest; refine, recursive = true, maxlevel = 5)
balance!(forest)
partition!(forest)
Please see the documentation for more detailed instructions on using the package.
Contributions are encouraged. In particular only a small part of p4est is currently exposed. If there are additional functions you would like to use, please open an issue or pull request.
Additional examples and documentation improvements are also welcome.
If you use P4estTypes.jl in your work, please consider citing the following papers on p4est:
@ARTICLE{BursteddeWilcoxGhattas11,
author = {Carsten Burstedde and Lucas C. Wilcox and Omar Ghattas},
title = {{\texttt{p4est}}: Scalable Algorithms for Parallel Adaptive Mesh
Refinement on Forests of Octrees},
journal = {SIAM Journal on Scientific Computing},
volume = {33},
number = {3},
pages = {1103-1133},
year = {2011},
doi = {10.1137/100791634}
}
@ARTICLE{IsaacBursteddeWilcoxEtAl15,
author = {Tobin Isaac and Carsten Burstedde and Lucas C. Wilcox and Omar Ghattas},
title = {Recursive algorithms for distributed forests of octrees},
journal = {SIAM Journal on Scientific Computing},
volume = {37},
number = {5},
pages = {C497-C531},
year = {2015},
doi = {10.1137/140970963}
}