TaoTermCreateSolutionVec#
Create a solution vector for a TaoTerm
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoTermCreateSolutionVec(TaoTerm term, Vec *solution)
Collective
Input Parameter#
term - a
TaoTerm
Output Parameter#
solution - a compatible solution vector for
term
Note#
Before a TaoTerm can create a solution vector, you must do one of the following:
Call
TaoTermSetSolutionSizes()to describe the size and parallel layout of a solution vector.Call
TaoTermSetSolutionLayout()to directly setPetscLayouts for the solution vector.Call
TaoTermSetSolutionTemplate()to set the solution vector spaces to match existingVec.If the
TaoTermis aTAOTERMSHELL, you can callTaoTermShellSetCreateSolutionVec()to use your own code for creating vectors.
You can also call TaoTermSetSolutionVecType() to set the type of vector created (e.g. VECCUDA).
See Also#
TaoTerm: composable objective function terms,
TaoTerm,
TaoTermShellSetCreateSolutionVec(),
TaoTermGetSolutionSizes(),
TaoTermSetSolutionSizes(),
TaoTermSetSolutionTemplate(),
TaoTermGetSolutionVecType(),
TaoTermSetSolutionVecType(),
TaoTermGetSolutionLayout(),
TaoTermSetSolutionLayout(),
TaoTermCreateHessianMatrices()
Level#
advanced
Location#
Examples#
src/tao/unconstrained/tutorials/elastic_net_regularization.c
Implementations#
TaoTermCreateSolutionVec_Test() in src/tao/term/impls/shell/tests/ex1.c
TaoTermCreateSolutionVec_Sum() in src/tao/term/impls/sum/taotermsum.c
Index of all TaoTerm routines
Table of Contents for all manual pages
Index of all manual pages