Modi®ed multigrid for 3D elliptic equations with cross-derivatives John C. Adams a , Piotr Smolarkiewicz b, * a Scienti®c Computing Division, National Center for Atmospheric Research, P.O. Box 3000, Boulder, CO 80307-3000, USA b Mesoscale and Microscale Meteorology Division, National Center for Atmospheric Research, P.O. Box 3000, Boulder, CO 80307-3000, USA Abstract A portable Fortran code that solves the general nonseparable three-dimensional linear elliptic partial dierential equation PDE) with cross-derivative terms on a rect- angular region is described. Boundary conditions can be any combination of periodic, speci®ed, or mixed derivative. A multigrid scheme, modi®ed to handle complexities introduced by cross-derivative terms and nonnormal derivative components in bound- ary conditions, is utilized. Successful application is illustrated with an analytically prescribed abstract example and simulation of an idealized geophysical ¯uid ¯ow. Ó 2001 Elsevier Science Inc. All rights reserved. Keywords: Multigrid software; 3D elliptic equations with cross-derivatives 1. Introduction We describe a portable Fortran code, mud 3cr, which discretizes and ap- proximates the solution to the general three-dimensional linear nonseparable elliptic partial dierential equation PDE) with cross-derivative terms. The code is an addition to the suite of two- and three-dimensional multigrid solvers in the ``user-friendly'' software package MUDPACK, whose earlier versions were described in [1±3]. The entire package, consisting of 124 ®les containing www.elsevier.com/locate/amc Applied Mathematics and Computation 121 2001) 301±312 * Corresponding author. E-mail addresses: johnad@ucar.edu J.C. Adams), smolar@ucar.edu P. Smolarkiewicz). 0096-3003/01/$ - see front matter Ó 2001 Elsevier Science Inc. All rights reserved. PII:S0096-300300)00004-7