PETScTAOSolver.h¶
Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
-
class
PETScTAOSolver¶ Parent class(es)
This class implements methods for solving nonlinear optimisation problems via PETSc TAO solver. It supports unconstrained as well as bound-constrained minimisation problem
-
PETScTAOSolver(const std::string tao_type = "default", const std::string ksp_type = "default", const std::string pc_type = "default")¶ Create TAO solver for a particular method
-
std::size_t
solve(OptimisationProblem &optimisation_problem, GenericVector &x, const GenericVector &lb, const GenericVector &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
- num_iterations (std::size_t)
- Number of iterations
-
std::size_t
solve(OptimisationProblem &optimisation_problem, GenericVector &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
- num_iterations (std::size_t)
- Number of iterations
-
static std::vector<std::pair<std::string, std::string>>
methods()¶ Return a list of available solver methods
-
static Parameters
default_parameters()¶ Default parameter values
-
Tao
tao() const¶ Return the TAO pointer
-
void
init(OptimisationProblem &optimisation_problem, PETScVector &x, const PETScVector &lb, const PETScVector &ub)¶ Initialise the TAO solver for a bound-constrained minimisation problem, in case the user wants to access the TAO object directly
-
void
init(OptimisationProblem &optimisation_problem, PETScVector &x)¶ Initialise the TAO solver for an unconstrained minimisation problem, in case the user wants to access the TAO object directly
-
std::size_t
solve(OptimisationProblem &optimisation_problem, PETScVector &x, const PETScVector &lb, const PETScVector &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
- num_iterations (std::size_t)
- Number of iterations
-