Go to the documentation of this file.
11 #ifndef __MITTELMANNBNDRYCNTRLDIRI3D_HPP__
12 #define __MITTELMANNBNDRYCNTRLDIRI3D_HPP__
19 #include "configall_system.h"
28 # error "don't have header file for math"
38 # error "don't have header file for stdio"
42 using namespace Ipopt;
73 virtual bool get_starting_point(
Index n,
bool init_x,
Number*
x,
108 bool& use_x_scaling,
Index n,
110 bool& use_g_scaling,
Index m,
188 return k + (N_+2)*j + (N_+2)*(N_+2)*i;
194 return (k-1) + N_*(j-1) + N_*N_*(i-1);
216 return B_*B_/2. + C_*(t - B_);
219 return B_*B_/2. + C_*(-t - B_);
225 return PenA_*t2 + PenB_*t4 + PenC_*t6;
242 return 2.*PenA_*t + 4.*PenB_*t3 + 6.*PenC_*t5;
258 return 2.*PenA_ + 12.*PenB_*t2 + 30.*PenC_*t4;
286 printf(
"N has to be at least 1.");
297 SetBaseParameters(N, alpha, lb_y, ub_y, lb_u, ub_u, d_const, B, C);
304 return 3. + 5.*(x1*(x1-1.)*x2*(x2-1.));
Number lb_y_
overall lower bound on y
Number PenObj(Number t) const
value of penalty function term
Number * y_d_
Array for the target profile for y.
MittelmannBndryCntrlDiri3D()
Class to organize all the data required by the algorithm.
Class implemented the NLP discretization of.
Class for all IPOPT specific calculated quantities.
Number alpha_
Weighting parameter for the control target deviation functional in the objective.
Number ub_y_
overall upper bound on y
Index y_index(Index i, Index j, Index k) const
Translation of mesh point indices to NLP variable indices for y(x_ijk)
Number x3_grid(Index i) const
Compute the grid coordinate for given index in x3 direction.
double Number
Type of all numbers.
virtual ~MittelmannBndryCntrlDiri3D()
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB eval_g
Callback function for evaluating constraint functions.
Index pde_index(Index i, Index j, Index k) const
Translation of interior mesh point indices to the corresponding PDE constraint number.
Number * x
Input: Starting point Output: Optimal solution.
Number hhh_
h_ to the third power
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Number Number Index Number Number Index Index nele_hess
Number of non-zero elements in Hessian of Lagrangian.
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB Eval_Jac_G_CB eval_jac_g
Callback function for evaluating Jacobian of constraint functions.
virtual Number y_d_cont(Number x1, Number x2, Number x3) const
Target profile function for y.
Number Number Index Number Number Index nele_jac
Number of non-zero elements in constraint Jacobian.
int Index
Type of all indices of vectors, matrices etc.
Base class for boundary control problems with Dirichlet boundary conditions, as formulated by Hans Mi...
Number Number Index Number Number Index Index Index Eval_F_CB eval_f
Callback function for evaluating objective function.
Number lb_u_
overall lower bound on u
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB Eval_Jac_G_CB Eval_H_CB eval_h
Callback function for evaluating Hessian of Lagrangian function.
Index N_
Number of mesh points in one dimension (excluding boundary)
Number PenObj_1(Number t) const
first derivative of penalty function term
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB Eval_Grad_F_CB eval_grad_f
Callback function for evaluating gradient of objective function.
Number Number Number * g_scaling
Number PenObj_2(Number t) const
second derivative of penalty function term
Number Number * g
Values of constraint at final point (output only - ignored if set to NULL)
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
Number x2_grid(Index i) const
Compute the grid coordinate for given index in x2 direction.
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Number ub_u_
overall upper bound on u
Class implementating Example 1.
Number Number Index Number Number Index Index Index index_style
indexing style for iRow & jCol, 0 for C style, 1 for Fortran style
Number x1_grid(Index i) const
Compute the grid coordinate for given index in x1 direction.
Number Number * x_scaling
Number d_const_
Constant value of d appearing in elliptical equation.
Number Number Index m
Number of constraints.