Are there libraries for conducting parallel AMR on an unstructured grid ? For a finite volume code, polyhedral cells with arbitrarily shaped faces are as easy to handle as hexahedra, and infact maybe better for AMR because one doesn't have to do anything special for the refined grid. Due to the lack of libraries, I am trying to do this from scratch by splitting polyhedral cells into pyramids with apex at the centre of the polyhedron. For this purpose, each face is first split into quads to form bases of the pyramids. If the polyhedron happens to be a hexahedron, I merge some of the pyramids (three to be precise) back to get the well known 1 to 8 split for hexahedron.

I am not yet into coding the coarsening stage but I guess that I will need a tree data structure like the oct-tree used for hexs. Do I even need this because, I can arbitrarily merge neighboring cells sharing a face as long as the resulting cell remains convex? What I mean is if a hex has been split into 8 subcells, I don't have to recover the original cell if I decide to do coarsening later on. I haven't consulted any literature, nor did I check thoroughly for existing libraries, which could save me a lot of time.

  • $\begingroup$ Have you looked at libmesh? I've never used it but it appears to do what you want. $\endgroup$ Dec 4, 2015 at 21:39
  • $\begingroup$ Yes, but I prefer a small library that handles only the AMR part, e.g. p4est though it uses hexes. If it is possible to use libMesh for AMR, while still using my finite volume code, i will try it. Thank you. $\endgroup$
    – danny
    Dec 4, 2015 at 22:13
  • $\begingroup$ AFAIK libraries like libmesh keep a copy of the entire mesh on all cores so you wont be able to use large meshes with complicated geometries. p4est is better as every core only keeps a copy of the coarse mesh but again if your initial mesh is large (like an aircraft) then it wont work/scale. You might just be better off with a static mesh. $\endgroup$
    – stali
    Dec 5, 2015 at 2:22
  • $\begingroup$ That is bad then. I think p4est keeps a copy of only the 'root mesh' on all processors, but unfortunately it only supports hexes. $\endgroup$
    – danny
    Dec 5, 2015 at 2:46
  • 2
    $\begingroup$ There is a development branch of p4est that uses triangles and tetrahedra instead of quadrilaterals and hexahedra. You could ask the authors whether it's available to you. $\endgroup$ Dec 7, 2015 at 1:17

1 Answer 1


I ended up with a simple AMR implementation that does the job for polyhedral cells

a) No coarsening. The original coarse grid is always loaded first on which refinement is applied. This gets rid of octtree and such that are needed to keep history of AMR. Also, since the internal data structures for the solver are static (vectors/arrays), it is not possible to refine one cell only efficiently, so re-doing the AMR from scratch is inevitable anyway

b) Polyhedral cells are refined into tetrahedrons/pyramids while hexahedrons are split into hexes as I mentioned before.

This gives me a nice AMR simulation but it is only "local" (each processor does its own refinement). It would be nice to have a parallel AMR library for arbitrary polyhedrons.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.