Next: Subroutine CURRENT/STRESS
Up: Explanation of key
Previous: Subroutine ENERGY
Subroutine DEMBX is the conjugage gradient routine in both the finite element and finite difference programs. In both cases, DEMBX is essentially the same, with some details different between the two kinds of programs. In the finite element elastic programs, the only difference from the electric case is the number of components of the vector quantities like displacement. The quadratic energy functional minimized in the finite element programs has explicit linear and constant terms, which come from the periodic boundary conditions. The energy functional in the finite difference programs has only an explicit quadratic term, but the linear and constant terms are implicit in the periodic boundary conditions. A standard conjugate gradient routine is used, which makes use of the Hessian matrix (matrix of partial second derivatives of the energy function with respect to nodal values). The form of the conjugate gradient routine can be found in Section 10.6 of Ref. [5]. Variables in the programs have the same names as in Ref. [5].