Skip to Main content Skip to Navigation

AGRIF: Adaptive Grid Refinement In Fortran

Laurent Debreu 1 Eric Blayo 1
1 IDOPT - System identification and optimization in physics and environment
Inria Grenoble - Rhône-Alpes, CNRS - Centre National de la Recherche Scientifique : UMR5527
Abstract : This report presents AGRIF a Fortran90 package for the integration of adaptive mesh refinement (AMR) features within a finite difference numerical model. The package mainly consists in two parts. It first provides model-indep- endent Fortran90 procedures containing the different parts of an AMR process: time integration algorithm of the grid hierarchy, clustering algorithm, refinement algorithm, interpolation procedures... In a second part, a Fortran90 model-dependent code is created via the analysis of an entry file written by the user. Both model-dependent and model-independent parts are then linked into a library. Since the work of Berger and Oliger , adaptive mesh refinement (AMR) for structured grids has become very popular. Its domains of application are numerous and its efficiency has been clearly demonstrated. However dealing with AMR is a difficult task, which often keeps people from investigating the power of the method. As a matter of fact, AMR is intrinsically a dynamic method which requires dynamic memory management and structured types.AMRCLAW is a Fortran77 AMR package for conservation laws that was developed upon the Berger's AMR algorithms and the CLAWPACK package of R. LeVeque, and which incorporates all the primary features of the method proposed by Berger. However, with the quite recent apparition of object oriented languages, programming AMR methods has become simpler, and several AMR packages have then been developped. Most of them are implemented in C++, which appeared before Fortran 90. We can cite for instance Overture a C++ package subtitled Object-Oriented Tools for Solving CFD and Combustion Problems in Complex Moving Geometry, and DAGH (Distributed Adaptive Grid Hierarchy ).Concerning similar tools in Fortran90, we can cite PARAMESH , a package actually doing cells refinement, and which differs quite a lot from the original idea of Berger. There exist also AMR packages which actually try to implement C++ features in Fortran 90.In this paper, we present a new idea for implementing AMR features in an existing numerical model written in Fortran (77 or 90). This package uses the full compatibility between Fortran77 and Fortran90, and thus eliminates all kind of interfaces.The paper is organized as follows. The main operations involved in an AMR process are briefly reminded in section 2. Then the basic ideas of the package are presented in section 3, and section 4 explains how to use the program which produces the model-dependent Fortran code. Finally, an example is treated in section 5.
Document type :
Complete list of metadata
Contributor : Rapport de Recherche Inria <>
Submitted on : Friday, May 19, 2006 - 6:32:28 PM
Last modification on : Wednesday, November 4, 2020 - 2:45:18 PM
Long-term archiving on: : Saturday, April 3, 2010 - 9:52:34 PM


  • HAL Id : inria-00069912, version 1



Laurent Debreu, Eric Blayo. AGRIF: Adaptive Grid Refinement In Fortran. [Research Report] RT-0262, INRIA. 2002, pp.16. ⟨inria-00069912⟩



Record views


Files downloads