Adaptive mesh refinement (AMR) is a common technique for dealing with the problem of widely varying spatial scales in the numerical solution of PDEs. What general-purpose libraries exist for AMR on structured grids? Ideally I'd like something in the spirit of PETSc, where the library handles just the adaptive meshes and I provide the physics and discretization (finite difference/volume/element).

The ideal library would be

  • Modular: doesn't dictate how I write my code or too much of my data structures
  • General: doesn't care what kind of discretization I'm using
  • Efficient: doesn't incur too much overhead
  • Parallel and highly scalable

Libraries that fit only a subset of these criteria would still be of interest.

Addendum: I am aware of Donna Calhoun's extensive list of AMR packages, but I don't know which of them (if any) fit the criteria above. So I'm mainly interested in hearing from people who have actual experience with one or (better yet) more packages, as to how they measure up in those terms.

  • 2
    $\begingroup$ +1, I'm curious as to what AMR software is out there also, and would prefer it to satisfy the criteria you mentioned above. $\endgroup$ Commented Jan 18, 2012 at 14:18
  • $\begingroup$ Just thought I would mention that the newest version of Chombo has just been released, and (it's claimed) that is should be easier to integrate into larger package (Release notes). It's not a major revision, so chances are some stuff still doesn't satisfy all your criteria. $\endgroup$ Commented Mar 10, 2012 at 19:54

4 Answers 4


One library to consider is BoxLib. Its key features (from the website) are:

  • Support for block-structured AMR with optional subcycling in time
  • Support for cell-centered, face-centered and node-centered data
  • Support for hyperbolic, parabolic and elliptic solves on hierarchical grid structure
  • C++ and Fortran90 versions
  • Supports hybrid programming model with MPI and OpenMP
  • Basis of mature applications in combustion, astrophysics, cosmology, and porous media
  • Demonstrated scaling to over 200,000 processors
  • Freely available to interested user
  • There is also a Python wrapper (written by me) to the Fortran version included (although it is fairly young).


    You should also look at libMesh. It's targeted at finite element methods, but other than that, I think it checks most of your boxes. Unlike BoxLib, it's a fully unstructured, mixed element type library, which is to stay that it supports tets, pyramids, prisms, and hexahedra in the same mesh. It also has one of the largest sets of integration rules for high-order polynomial basis functions around. It's set up to let you call PETSc (and some other libraries as well) directly, so you have the same solver scalability that PETSc does.

    There's certainly a libMesh way of doing things, but there's a PETSc way of doing things, too. So hopefully that won't scare you off.


    I would try SAMRAI I know at least one code that uses it with success — IBAMR, an Immersed Boundary Method code for Fluid-Structure Interaction with AMR.

    • $\begingroup$ Thanks Johntra (and welcome to scicomp)! Do you happen to know the salient differences between SAMRAI and BoxLib? Also, you can use links inline by putting link text in [ ] and the destination in () $\endgroup$ Commented Feb 26, 2012 at 13:44
    • $\begingroup$ Unfortunately I don't - as I matter of facts, I've just heard about it (BoxLib) for the first time.That's exactly the reason why I decided to join - to learn smt new by discussing informally with you guys- thanks. $\endgroup$ Commented Feb 27, 2012 at 21:26
    • $\begingroup$ I would second SAMRAI, it is a very useful general purpose framework for AMR. I also really like the hybrid C++/Fortran design the author's favour. Computational kernels can be written in Fortran, as they should be, and the C++ classes provide all the abstraction needed to hide the inner MPI and memory management. $\endgroup$
      – talonmies
      Commented Mar 2, 2012 at 11:59
    • $\begingroup$ @AronAhmadia: BoxLib cannot handle piecewise linear interpolation with changing Dirichlet boundaries in cell centred geometric Multigrid. Thought would add it as an interesting point. $\endgroup$ Commented Jun 18, 2016 at 23:20

    You didnt specify structured or unstructured.

    Take a look at Paramesh, Pyramid, p4est, Dendro, Samrai and Chombo.

    Btw Pyramid doesnt do coarsening.

    • 1
      $\begingroup$ Good catch; I've edited the question. Could you comment on how well these libraries fit my criteria? $\endgroup$ Commented Jan 18, 2012 at 16:35

    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.