Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

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.

share|improve this question

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

1  
+1, I'm curious as to what AMR software is out there also, and would prefer it to satisfy the criteria you mentioned above. –  Geoff Oxberry Jan 18 '12 at 14:18
    
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. –  Jeremy Kozdon Mar 10 '12 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).

    share|improve this answer

    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.

    share|improve this answer

    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.

    share|improve this answer
        
    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 () –  Aron Ahmadia Feb 26 '12 at 13:44
        
    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. –  Johntra Volta Feb 27 '12 at 21:26
        
    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. –  talonmies Mar 2 '12 at 11:59

    You didnt specify structured or unstructured.

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

    Btw Pyramid doesnt do coarsening.

    share|improve this answer
    1  
    Good catch; I've edited the question. Could you comment on how well these libraries fit my criteria? –  David Ketcheson Jan 18 '12 at 16:35

    Your Answer

     
    discard

    By posting your answer, you agree to the privacy policy and terms of service.

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