PETScTAOSolver¶
-
class
dolfin.cpp.la.
PETScTAOSolver
(*args)¶ Bases:
dolfin.cpp.la.PETScObject
This class implements methods for solving nonlinear optimisation problems via PETSc TAO solver. It supports unconstrained as well as bound-constrained minimisation problem
Overloaded versions
PETScTAOSolver(comm)
Create TAO solver
PETScTAOSolver(tao_type=”default”, ksp_type=”default”, pc_type=”default”)
Create TAO solver for a particular method
-
static
default_parameters
()¶ Default parameter values
-
init
()¶ Overloaded versions
init(optimisation_problem, x, lb, ub)
Initialise the TAO solver for a bound-constrained minimisation problem, in case the user wants to access the TAO object directly
init(optimisation_problem, x)
Initialise the TAO solver for an unconstrained minimisation problem, in case the user wants to access the TAO object directly
-
static
methods
()¶ Return a list of available solver methods
-
parameters
¶
-
solve
()¶ Overloaded versions
solve(optimisation_problem, x, lb, ub)
Solve a nonlinear bound-constrained optimisation problem
- Arguments
- optimisation_problem (
OptimisationProblem
) The nonlinear optimisation problem.
- x (
GenericVector
) The solution vector (initial guess).
- lb (
GenericVector
) The lower bound.
- ub (
GenericVector
) The upper bound.
- optimisation_problem (
- Returns
- (int, bool)
Pair of number of iterations, and whether iteration converged
solve(optimisation_problem, x)
Solve a nonlinear unconstrained minimisation problem
- Arguments
- optimisation_problem (
OptimisationProblem
) The nonlinear optimisation problem.
- x (
GenericVector
) The solution vector (initial guess).
- optimisation_problem (
- Returns
- (int, bool)
Pair of number of iterations, and whether iteration converged
solve(optimisation_problem, x, lb, ub)
Solve a nonlinear bound-constrained minimisation problem
- Arguments
- optimisation_problem (
OptimisationProblem
) The nonlinear optimisation problem.
- x (
PETScVector
) The solution vector (initial guess).
- lb (
PETScVector
) The lower bound.
- ub (
PETScVector
) The upper bound.
- optimisation_problem (
- Returns
- (int, bool)
Pair of number of iterations, and whether iteration converged
-
tao
()¶ Return petsc4py representation of PETSc TAO solver
-
thisown
¶ The membership flag