This function is also used when --regularized is passed (see relaxation_common.mako).