trlib

trlib: A vector-free implementation of the GLTR method for iterative solution of the trust region problem. We describe trlib, a library that implements a variant of Gould’s Generalized Lanczos method (Gould et al. in SIAM J. Opt. 9(2), 504-525, 1999) for solving the trust region problem. Our implementation has several distinct features that set it apart from preexisting ones. We implement both conjugate gradient (CG) and Lanczos iterations for assembly of Krylov subspaces. A vector- and matrix-free reverse communication interface allows the use of most general data structures, such as those arising after discretization of function space problems. The hard case of the trust region problem frequently arises in sequential methods for nonlinear optimization. In this implementation, we made an effort to fully address the hard case in an exact way by considering all invariant Krylov subspaces. We investigate the numerical performance of trlib on the full subset of unconstrained problems of the CUTEst benchmark set. In addition to this, interfacing the PDE discretization toolkit FEniCS with trlib using the vector-free reverse communication interface is demonstrated for a family of PDE-constrained control trust region problems adapted from the OPTPDE collection.