petsc4py.PETSc.TAOLineSearch¶
- class petsc4py.PETSc.TAOLineSearch¶
Bases:
Object
TAO Line Search.
Enumerations
TAO Line Search Termination Reasons.
TAO Line Search Types.
Methods Summary
apply
(x, g, s)Performs a line-search in a given step direction.
create
([comm])Create a TAO linesearch.
destroy
()Destroy the linesearch object.
Return the prefix used for searching for options in the database.
getType
()Return the type of the linesearch.
Configure the linesearch from the options database.
setGradient
(gradient[, args, kargs])Set the gradient evaluation callback.
setObjective
(objective[, args, kargs])Set the objective function evaluation callback.
setObjectiveGradient
(objgrad[, args, kargs])Set the objective function and gradient evaluation callback.
setOptionsPrefix
(prefix)Set the prefix used for searching for options in the database.
setType
(ls_type)Set the type of the linesearch.
setUp
()Set up the internal data structures for using the linesearch.
useTAORoutine
(tao)Use the objective and gradient evaluation routines from the given Tao object.
view
([viewer])View the linesearch object.
Methods Documentation
- apply(x, g, s)¶
Performs a line-search in a given step direction.
Collective.
See also
petsc.TaoLineSearchApply
- create(comm=None)¶
Create a TAO linesearch.
Collective.
- Parameters:
comm – MPI communicator, defaults to
Sys.getDefaultComm
.- Return type:
See also
Sys.getDefaultComm
,petsc.TaoLineSearchCreate
- destroy()¶
Destroy the linesearch object.
Collective.
See also
petsc.TaoLineSearchDestroy
Source code at petsc4py/PETSc/TAO.pyx:1934
- Return type:
- getOptionsPrefix()¶
Return the prefix used for searching for options in the database.
Not collective.
See also
Working with PETSc options (TODO),
setOptionsPrefix
,petsc.TaoLineSearchGetOptionsPrefix
Source code at petsc4py/PETSc/TAO.pyx:2039
- Return type:
- getType()¶
Return the type of the linesearch.
Not collective.
See also
setType
,petsc.TaoLineSearchGetType
Source code at petsc4py/PETSc/TAO.pyx:1987
- Return type:
- setFromOptions()¶
Configure the linesearch from the options database.
Collective.
See also
Working with PETSc options (TODO),
petsc.TaoLineSearchSetFromOptions
Source code at petsc4py/PETSc/TAO.pyx:2001
- Return type:
- setGradient(gradient, args=None, kargs=None)¶
Set the gradient evaluation callback.
Logically collective.
- Parameters:
- Return type:
See also
setObjective
,setObjectiveGradient
,setHessian
,petsc.TaoLineSearchSetGradientRoutine
- setObjective(objective, args=None, kargs=None)¶
Set the objective function evaluation callback.
Logically collective.
- Parameters:
- Return type:
See also
setGradient
,setObjectiveGradient
,petsc.TaoLineSearchSetObjectiveRoutine
- setObjectiveGradient(objgrad, args=None, kargs=None)¶
Set the objective function and gradient evaluation callback.
Logically collective.
- Parameters:
- Return type:
See also
setObjective
,setGradient
,setHessian
,getObjectiveAndGradient
,petsc.TaoLineSearchSetObjectiveAndGradientRoutine
- setOptionsPrefix(prefix)¶
Set the prefix used for searching for options in the database.
Logically collective.
See also
Working with PETSc options (TODO),
petsc.TaoLineSearchSetOptionsPrefix
Source code at petsc4py/PETSc/TAO.pyx:2025
- Return type:
- setType(ls_type)¶
Set the type of the linesearch.
Logically collective.
See also
getType
,petsc.TaoLineSearchSetType
- setUp()¶
Set up the internal data structures for using the linesearch.
Collective.
See also
petsc.TaoLineSearchSetUp
Source code at petsc4py/PETSc/TAO.pyx:2013
- Return type:
- useTAORoutine(tao)¶
Use the objective and gradient evaluation routines from the given Tao object.
Logically collective.
See also
petsc.TaoLineSearchUseTaoRoutines