PSCF v1.1
Pspg::AmIteratorGrid

The AmIteratorGrid iterator used by the pscf_pg programs uses an Anderson mixing algorithm in which residual equations and field updates are formulated using values defined on the nodes of a regular spatial grid. The algorithm can be used to either solve the SCFT equations for a rigid unit cell or to solve the SCFT equations and also optimize the unit cell parameters of a flexible unit cell so as to minimize the free energy density.

The format of the associated parameter block is identical to that used by AmIteratorBasis, as described below:

AmIterator{
epsilon real
maxItr* int (200 by default)
maxHist* int (50 by default0
verbose* int (0-2, 0 by default)
outputTime* bool (false by default)
errorType* string ("norm", "rms", "max", or "relNorm", "relNorm" by default)
isFlexible* bool (0 or 1, 0/false by default)
scaleStress* real (10.0 by default)
}

Here, as elsewhere, labels followed by an asterisk (*) represent optional parameters. The meaning of the various parameters are described below:

Label Description
epsilon Desired tolerance for convergence - iteration stops if the magnitude of the error drops below epsilon.
maxItr* Maximum number of iterations that will be attempted (200 by default)
maxHist* Maximum number of previous trial solultions that will be retained in memory for used by the AM algorithm (50 by default)
verbose* Integer level 0-2 for verbosity of log output during iteration. Optional, and 0 (concise) by default.
showTime* Set to 1 (true) to report wall clock time components in log file. Optional, and 0 (false) by default.
errorType* String identifer for the type of variable used to define scalar error . The only allowed values are "norm", "rms", "max", and "relNorm". Optional, set to "relNorm" by default.
isFlexible* Set isFlexible true to enable or false to disable iterative optimization of the unit cell parameters so as to minimize the free energy. Optional and set 1/true by default.
scaleStress* Constant factor by which stress components are multipled in the definition of the residual vector if isFlexible is true (10.0 by default).

The iterative loop exits if the number of iterations has reaches maxItr or if the magnitude of the scalar error drops below epsilon.

The Pspg::AmIteratorGrid uses a definition of the residual vector that analogous to that used by Pspg::AmIteratorBasis and Pspc::AmIterator, except that residal components associated with errors in the SCF equations are defined as components of the relevant difference in fields at particular grid points, rather than components of these differences in a Fourier-adapated Fourier series. One result of this difference is that the magnitude of erors obtained for corresponding states with the same errorType flag will generally be different (sometimes very different) for the AmIteratorGrid and AmIteratorBasis programs. See the documentation for the Pspc AmIterator algorithm for the definition fo the residual field and some other details.