TaoTermCreateHessianMatricesDefault#
Default routine for creating Hessian matrices that can be used by many TaoTerm implementations
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoTermCreateHessianMatricesDefault(TaoTerm term, Mat *H, Mat *Hpre)
Collective
Input Parameter#
term - a
TaoTerm
Output Parameters#
H - (optional) a matrix that can store the Hessian computed in
TaoTermComputeHessian()Hpre - (optional) a matrix from which a preconditioner can be computed in
TaoTermComputeHessian()
Developer Note#
The behavior of this routine is determined by TaoTermSetCreateHessianMode().
If Hpre_is_H, then the same matrix will be returned for H and Hpre,
otherwise they will be separate matrices, with the matrix types H_mattype and Hpre_mattype.
If either type is MATMFFD, then it will create a shell matrix with TaoTermCreateHessianMFFD().
See Also#
TaoTerm: composable objective function terms,
TaoTerm,
TaoTermComputeHessian(),
TaoTermCreateHessianMatrices(),
TaoTermGetCreateHessianMode(),
TaoTermSetCreateHessianMode()
Level#
developer
Location#
Examples#
src/tao/unconstrained/tutorials/rosenbrock1_taoterm.c
Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages