Online Guide to MODFLOW-2005

LMG - Link-AMG Package

Hide Navigation Pane

LMG - Link-AMG Package

Previous topic Next topic No directory for this topic Expand/collapse all hidden text  

LMG - Link-AMG Package

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function  

Abbreviation in Name file

LMG

Purpose

The Link-AMG package is used to solve the finite difference equations in each step of a MODFLOW stress period.

Documentation

Mehl, S.W., and Hill, M.C., 2001, MODFLOW-2000, The U.S. Geological Survey Modular Ground-Water Model - User Guide to the Link-AMG (LMG) Package for Solving Matrix Equations Using an Algebraic Multigrid Solver: U.S. Geological Survey Open-File Report 01-177, 33 p.

Related Packages

Solvers

Supported in

MODFLOW-2000 (see below)

Other Notes

Unfortunately, due to licensing restrictions, the USGS is no longer able to publicly distribute the Algebraic Multi-Grid (AMG) solver, on which the Link-AMG (LMG) Package relies. USGS users can download a version of Modflow-2000 that includes AMG from a restricted web site (please contact Ned Banta or Arlen Harbaugh for the URL). Users outside the USGS can request the code directly from Dr. Klaus Stuben of Fraunhofer-Institute for Algorithms and Scientific Computing (SCAI), Sankt Augustin, Germany, at amg1r5@scai.fraunhofer.de.

Input Instructions

The LMG Package reads its input data from the file indicated in the Name file as described by Harbaugh and others (2000, p. 7, 43) using File Type LMG. Input for the LMG Package is defined using two numbered items. Each item consists of several parameters that are specified in one record and are read free format.

Data Set 1

STOR1 STOR2 STOR3 ICG

STOR1 is a variable controlling the amount of storage allocated in the Z array for the array A and the amount of storage allocated in the IX array for the array JA. For most problems, a value of 3.0 should be adequate (table 2).

Table 2. Arrays used in AMG1R5, their dimensions, the user-defined variables that control the storage allocated for the arrays, values recommended by Ruge and others (1990), and the global storage arrays in MODFLOW-2000 in which the AMG1R5 arrays are stored. [NODES, number of nodes in the grid; NNA, number of non-zero elements in the coefficient matrix.]

Array name

Dimension

User-Defined Variable and Recommended Value

Global Storage Array

A

STOR1*NNA + 5*NODES

STOR1=3.0

Z

JA

STOR1*NNA + 5*NODES

STOR1=3.0

IX

IA

STOR2*NODES

STOR2=2.2

IX

U

STOR2*NODES

STOR2=2.2

Z

FRHS1

STOR2*NODES

STOR2=2.2

Z

IG

STOR3*NODES

STOR3=5.4

IX

1 The array FHRS in the LMG package corresponds to the array F in the AMG1R5.

 

STOR2 is a variable controlling the amount of storage allocated in the Z array for the arrays U and FRHS, and the amount of storage allocated in the IX array for the array IA. For most problems, a value of 2.2 should be adequate (table 2).

Table 2. Arrays used in AMG1R5, their dimensions, the user-defined variables that control the storage allocated for the arrays, values recommended by Ruge and others (1990), and the global storage arrays in MODFLOW-2000 in which the AMG1R5 arrays are stored. [NODES, number of nodes in the grid; NNA, number of non-zero elements in the coefficient matrix.]

Array name

Dimension

User-Defined Variable and Recommended Value

Global Storage Array

A

STOR1*NNA + 5*NODES

STOR1=3.0

Z

JA

STOR1*NNA + 5*NODES

STOR1=3.0

IX

IA

STOR2*NODES

STOR2=2.2

IX

U

STOR2*NODES

STOR2=2.2

Z

FRHS1

STOR2*NODES

STOR2=2.2

Z

IG

STOR3*NODES

STOR3=5.4

IX

1 The array FHRS in the LMG package corresponds to the array F in the AMG1R5.

 

STOR3 is a variable controlling the amount of storage allocated in the IX array for the array IG. For most problems, a value of 5.4 should be adequate (table 2).

Table 2. Arrays used in AMG1R5, their dimensions, the user-defined variables that control the storage allocated for the arrays, values recommended by Ruge and others (1990), and the global storage arrays in MODFLOW-2000 in which the AMG1R5 arrays are stored. [NODES, number of nodes in the grid; NNA, number of non-zero elements in the coefficient matrix.]

Array name

Dimension

User-Defined Variable and Recommended Value

Global Storage Array

A

STOR1*NNA + 5*NODES

STOR1=3.0

Z

JA

STOR1*NNA + 5*NODES

STOR1=3.0

IX

IA

STOR2*NODES

STOR2=2.2

IX

U

STOR2*NODES

STOR2=2.2

Z

FRHS1

STOR2*NODES

STOR2=2.2

Z

IG

STOR3*NODES

STOR3=5.4

IX

1 The array FHRS in the LMG package corresponds to the array F in the AMG1R5.

 

ICG is a variable controlling whether or not conjugate gradient iterations are used at the end of each multigrid cycle. A value of 1 indicates that conjugate gradient iterations will be performed, while a value of 0 indicates no conjugate gradient iterations will be performed. All other values are automatically reset to 0. For some problems, using conjugate gradient iterations can improve convergence, but it will increase the memory used by the solver.

Data Set 2

MXITER MXCYC BCLOSE DAMP IOUTAMG

MXITER is the maximum number of iterations – that is, calls to the AMG solver. For linear problems, MXITER can be set equal to 2. For nonlinear problems, MXITER generally needs to be larger, but rarely more than 50.

MXCYC is the maximum number of cycles allowed per call to the solver. This is similar to the variable ITER1 in PCG2 (Hill, 1990, p. 13). A value of 50 is suggested. For some nonlinear problems, however, faster convergence may be achieved by reducing MXCYC and increasing MXITER.

BCLOSE is the budget closure criterion for the scaled L2 norm of the matrix equations (eq. 3). A value similar to RCLOSE of PCG2 (Hill, 1990, p. 12-14) should be used. If the global budget error is too large, decrease BCLOSE by one order of magnitude to reduce the global budget error by about one order of magnitude. This approximation can be used to adjust BCLOSE until a satisfactory solution is attained. See the sections on Convergence Criterion and Tips for Achieving Convergence for more information.

DAMP is a damping/accelerating parameter identical to ACCL of the DE4 (Harbaugh, 1995, p. 12) solver. Generally, a value of 1.0 is sufficient for most problems. However, for nonlinear problems, values less than 1.0 may be necessary to achieve convergence (see problem 5, table 2, for example).

DAMP>0 This value of DAMP is applied for all iterations.
DAMP=-1 Cooley’s method for adaptive damping is implemented.
DAMP=-2 The relative reduced residual method for adaptive damping is implemented.
All other values of DAMP are automatically reset to 1.0 (no damping).

IOUTAMG is a flag that controls the information printed each time step from the solver to the MODFLOW-2000 LIST output file (Harbaugh and others, 2000). Diagnostic messages from the solver are sent to a temporary file called “lmg_err.tmp” except if IOUTAMG=3, when they are printed along with the other iteration information. The “lmg_err.tmp” file is deleted upon successful termination of the solver. If the solver should fail, the output in this file may help to identify solver problems. The possible values of IOUTAMG and the information printed to the LIST file are as follows.

IOUTAMG=0 No printing from the solver to the LIST file.
IOUTAMG=1 Print scaling for residuals and residuals before and after cycling.
IOUTAMG=2 Print scaling for residuals, residuals before and after cycling, the computer storage used, and the computation times if the CTIME subroutine has been adapted to the computer operating system (see Compatibility and Portability).
IOUTAMG=3 Print solver messages, scaling for residuals, residuals after each cycle the computer storage used, and the computation times if the CTIME subroutine has been adapted to the computer operating system (see Compatibility and Portability).

Data Set 3

DUP DLOW

Item 3 is read if DAMP = -2

DUP is the maximum value of DAMP that should be applied at any iteration. If the adaptive scheme calculates a value of DAMP that is greater than DUP, DAMP will be reset to DUP. A value of 1.0 is reasonable for most problems.

DLOW is the minimum value of DAMP that should be applied at any iteration. If the adaptive scheme determines that the value of DAMP should be decreased, it will calculate a new value of DAMP based on DLOW being the minimum (see eq. 7). A value of 0.2 is reasonable for most problems.