DOpE
|
#include <reducedalgorithm.h>
Public Member Functions | |
ReducedAlgorithm (PROBLEM *OP, ReducedProblemInterface< PROBLEM, VECTOR > *S, ParameterReader ¶m_reader, DOpEExceptionHandler< VECTOR > *Except=NULL, DOpEOutputHandler< VECTOR > *Output=NULL, int base_priority=0) | |
virtual | ~ReducedAlgorithm () |
virtual void | ReInit () |
virtual int | Solve (ControlVector< VECTOR > &q, double global_tol=-1.)=0 |
virtual void | SolveForward (ControlVector< VECTOR > &q) |
virtual void | CheckGrads (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.) |
virtual void | FirstDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq) |
virtual void | CheckHessian (double c, ControlVector< VECTOR > &q, ControlVector< VECTOR > &dq, unsigned int niter=1, double eps=1.) |
virtual void | SecondDifferenceQuotient (double exact, double eps, const ControlVector< VECTOR > &q, const ControlVector< VECTOR > &dq) |
DOpEExceptionHandler< VECTOR > * | GetExceptionHandler () |
DOpEOutputHandler< VECTOR > * | GetOutputHandler () |
Static Public Member Functions | |
static void | declare_params (ParameterReader ¶m_reader) |
Protected Member Functions | |
PROBLEM * | GetProblem () |
const PROBLEM * | GetProblem () const |
const ReducedProblemInterface < PROBLEM, VECTOR > * | GetReducedProblem () const |
ReducedProblemInterface < PROBLEM, VECTOR > * | GetReducedProblem () |
int | GetBasePriority () const |
This class is the base class for solvers for equality constrained optimization problems in reduced form, i.e., the dependent variable is assumed to be eliminated by solving the equation. I.e., we solve the problem min j(q)
<PROBLEM> | The problem container. See, e.g., OptProblemContainer |
<VECTOR> | The vector type of the solution. |
DOpE::ReducedAlgorithm< PROBLEM, VECTOR >::ReducedAlgorithm | ( | PROBLEM * | OP, |
ReducedProblemInterface< PROBLEM, VECTOR > * | S, | ||
ParameterReader & | param_reader, | ||
DOpEExceptionHandler< VECTOR > * | Except = NULL , |
||
DOpEOutputHandler< VECTOR > * | Output = NULL , |
||
int | base_priority = 0 |
||
) |
The constructor for the algorithm
OP | A pointer to the problem container |
S | The reduced problem. This object handles the equality constraint. For the interface see ReducedProblemInterface. |
param_reader | A parameter reader to access user given runtime parameters. |
Except | The DOpEExceptionHandler. This is used to handle the output by all exception. |
Output | The DOpEOutputHandler. This takes care of all output generated by the problem. |
base_priority | An offset for the priority of the output generated by the algorithm. |
|
virtual |
|
virtual |
This function calculates j'(q)dq, i.e., the directional derivative and difference quotients for comparison to allow checking of the implementation of all things related to the first derivative of the functional once it is confirmed that functional evaluations are correct.
c The direction will be initialized to the constant value c.
q | The point at which we calculate the derivative. |
dq | Storage or the direction. |
niter | Number of difference quotient evaluations, i.e., how many times eps is reduced. |
eps | The initial value for eps in the difference quotients. |
|
virtual |
This function calculates dq*H(q)dq , i.e., some diagonal entry of the hessian and corresponting difference quotients for comparison.
c The direction will be initialized to the constant value c.
q | The point at which we calculate the derivative. |
dq | Storage or the direction. |
niter | Number of difference quotient evaluations, i.e., how many times eps is reduced. |
eps | The initial value for eps in the difference quotients. |
|
static |
Used to declare run time parameters. This is needed to declare all parameters a startup without the need for an object to be already declared.
|
virtual |
Is called to calculate first difference quotients
exact The value of j'(q)
eps | The value for eps in the difference quotient . |
q | The point at which we try to approximate the derivative. |
dq | The direction. |
|
inlineprotected |
|
inline |
|
inline |
|
inlineprotected |
Grants access to the optimization problem container
|
inlineprotected |
Grants access to the optimization problem container
|
inlineprotected |
Grants access to the reduced optimization problem
|
inlineprotected |
Grants access to the reduced optimization problem
|
inlinevirtual |
Needs to be called once after changing the discretization, e.g., due to mesh changes, to reinitialize all dependent objects.
|
virtual |
Is called to calculate second difference quotients
exact The value of j'(q)
eps | The value for eps in the difference quotient . |
q | The point at which we try to approximate the derivative. |
dq | The direction. |
|
pure virtual |
Common interface for all algorithms solving a reduced problem.
q | The initial point. |
global_tol | An optional parameter specifying the required tolerance. The actual tolerance is the maximum of this and the one specified in the param file. Its default value is negative, so that it has no influence if not specified. |
Implemented in DOpE::Reduced_IpoptAlgorithm< PROBLEM, VECTOR >, DOpE::ReducedNewtonAlgorithmWithInverse< PROBLEM, VECTOR >, DOpE::ReducedTrustregion_NewtonAlgorithm< PROBLEM, VECTOR >, DOpE::ReducedNewtonAlgorithm< PROBLEM, VECTOR >, and DOpE::Reduced_SnoptAlgorithm< PROBLEM, VECTOR >.
|
virtual |
This just evaluates j(q). And can be used to solve PDEs that do not require any control.
q | The initial point. |