Ipopt 3.12.10

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MittelmannBndryCntrlNeum.hpp
Go to the documentation of this file.
1 // Copyright (C) 2005, 2006 International Business Machines and others.
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // $Id: MittelmannBndryCntrlNeum.hpp 2005 2011-06-06 12:55:16Z stefan $
6 //
7 // Authors: Andreas Waechter IBM 2005-10-18
8 // based on MyNLP.hpp
9
10 #ifndef __MITTELMANNBNDRYCNTRLNEUM_HPP__
11 #define __MITTELMANNBNDRYCNTRLNEUM_HPP__
12
13 #include "IpTNLP.hpp"
14 #include "RegisteredTNLP.hpp"
15
16 #ifdef HAVE_CONFIG_H
17 #include "config.h"
18 #else
19 #include "configall_system.h"
20 #endif
21
22 #ifdef HAVE_CMATH
23 # include <cmath>
24 #else
25 # ifdef HAVE_MATH_H
26 # include <math.h>
27 # else
28 # error "don't have header file for math"
29 # endif
30 #endif
31
32 #ifdef HAVE_CSTDIO
33 # include <cstdio>
34 #else
35 # ifdef HAVE_STDIO_H
36 # include <stdio.h>
37 # else
38 # error "don't have header file for stdio"
39 # endif
40 #endif
41
42 using namespace Ipopt;
43
49 class MittelmannBndryCntrlNeumBase : public RegisteredTNLP
50 {
51 public:
54 MittelmannBndryCntrlNeumBase();
55
57 virtual ~MittelmannBndryCntrlNeumBase();
58
62 virtual bool get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,
63 Index& nnz_h_lag, IndexStyleEnum& index_style);
64
66 virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
67 Index m, Number* g_l, Number* g_u);
68
70 virtual bool get_starting_point(Index n, bool init_x, Number* x,
71 bool init_z, Number* z_L, Number* z_U,
72 Index m, bool init_lambda,
73 Number* lambda);
74
76 virtual bool eval_f(Index n, const Number* x, bool new_x, Number& obj_value);
77
79 virtual bool eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f);
80
82 virtual bool eval_g(Index n, const Number* x, bool new_x, Index m, Number* g);
83
88 virtual bool eval_jac_g(Index n, const Number* x, bool new_x,
89 Index m, Index nele_jac, Index* iRow, Index *jCol,
90 Number* values);
91
96 virtual bool eval_h(Index n, const Number* x, bool new_x,
97 Number obj_factor, Index m, const Number* lambda,
98 bool new_lambda, Index nele_hess, Index* iRow,
99 Index* jCol, Number* values);
100
102
104 virtual bool get_scaling_parameters(Number& obj_scaling,
105 bool& use_x_scaling, Index n,
106 Number* x_scaling,
107 bool& use_g_scaling, Index m,
108 Number* g_scaling);
109
114 virtual void finalize_solution(SolverReturn status,
115 Index n, const Number* x, const Number* z_L, const Number* z_U,
116 Index m, const Number* g, const Number* lambda,
117 Number obj_value,
118 const IpoptData* ip_data,
119 IpoptCalculatedQuantities* ip_cq);
121
122 protected:
126 void SetBaseParameters(Index N, Number alpha, Number lb_y,
127 Number ub_y, Number lb_u, Number ub_u,
128 Number u_init);
129
133 virtual Number y_d_cont(Number x1, Number x2) const =0;
135 virtual Number d_cont(Number x1, Number x2, Number y) const =0;
137 virtual Number d_cont_dy(Number x1, Number x2, Number y) const =0;
139 virtual Number d_cont_dydy(Number x1, Number x2, Number y) const =0;
142 virtual bool d_cont_dydy_alwayszero() const =0;
144 virtual Number b_cont(Number x1, Number x2, Number y, Number u) const =0;
146 virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const =0;
148 virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const =0;
150 virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const =0;
153 virtual bool b_cont_dydy_alwayszero() const =0;
155
156 private:
168 MittelmannBndryCntrlNeumBase(const MittelmannBndryCntrlNeumBase&);
169 MittelmannBndryCntrlNeumBase& operator=(const MittelmannBndryCntrlNeumBase&);
171
175 Index N_;
177 Number h_;
179 Number hh_;
181 Number lb_y_;
183 Number ub_y_;
185 Number lb_u_;
187 Number ub_u_;
189 Number u_init_;
192 Number alpha_;
194 Number* y_d_;
196
201 inline Index y_index(Index i, Index j) const
202 {
203 return j + (N_+2)*i;
204 }
207 inline Index u0j_index(Index j) const
208 {
209 return (N_+2)*(N_+2) + j-1;
210 }
213 inline Index u1j_index(Index j) const
214 {
215 return (N_+2)*(N_+2) + N_ + j-1;
216 }
219 inline Index ui0_index(Index j) const
220 {
221 return (N_+2)*(N_+2) + 2*N_ + j-1;
222 }
225 inline Index ui1_index(Index j) const
226 {
227 return (N_+2)*(N_+2) + 3*N_ + j-1;
228 }
230 inline Number x1_grid(Index i) const
231 {
232 return h_*(Number)i;
233 }
235 inline Number x2_grid(Index j) const
236 {
237 return h_*(Number)j;
238 }
240 };
241
243 class MittelmannBndryCntrlNeum1 : public MittelmannBndryCntrlNeumBase
244 {
245 public:
246 MittelmannBndryCntrlNeum1()
247 {}
248
249 virtual ~MittelmannBndryCntrlNeum1()
250 {}
251
252 virtual bool InitializeProblem(Index N)
253 {
254 if (N<1) {
255 printf("N has to be at least 1.");
256 return false;
257 }
258 Number alpha = 0.01;
259 Number lb_y = -1e20;
260 Number ub_y = 2.071;
261 Number lb_u = 3.7;
262 Number ub_u = 4.5;
263 Number u_init = (ub_u+lb_u)/2.;
264
265 SetBaseParameters(N, alpha, lb_y, ub_y, lb_u, ub_u, u_init);
266 return true;
267 }
268 protected:
270 virtual Number y_d_cont(Number x1, Number x2) const
271 {
272 return 2. - 2.*(x1*(x1-1.) + x2*(x2-1.));
273 }
275 virtual Number d_cont(Number x1, Number x2, Number y) const
276 {
277 return 0.;
278 }
280 virtual Number d_cont_dy(Number x1, Number x2, Number y) const
281 {
282 return 0.;
283 }
285 virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
286 {
287 return 0.;
288 }
291 virtual bool d_cont_dydy_alwayszero() const
292 {
293 return true;
294 }
296 virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
297 {
298 return u - y*y;
299 }
301 virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
302 {
303 return - 2.*y;
304 }
306 virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
307 {
308 return 1.;
309 }
311 virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
312 {
313 return -2.;
314 }
317 virtual bool b_cont_dydy_alwayszero() const
318 {
319 return false;
320 }
321 private:
324 MittelmannBndryCntrlNeum1(const MittelmannBndryCntrlNeum1&);
325 MittelmannBndryCntrlNeum1& operator=(const MittelmannBndryCntrlNeum1&);
327 };
328
330 class MittelmannBndryCntrlNeum2 : public MittelmannBndryCntrlNeumBase
331 {
332 public:
333 MittelmannBndryCntrlNeum2()
334 {}
335
336 virtual ~MittelmannBndryCntrlNeum2()
337 {}
338
339 virtual bool InitializeProblem(Index N)
340 {
341 if (N<1) {
342 printf("N has to be at least 1.");
343 return false;
344 }
345 Number alpha = 0.;
346 Number lb_y = -1e20;
347 Number ub_y = 2.835;
348 Number lb_u = 6.;
349 Number ub_u = 9.;
350 Number u_init = (ub_u+lb_u)/2.;
351
352 SetBaseParameters(N, alpha, lb_y, ub_y, lb_u, ub_u, u_init);
353 return true;
354 }
355 protected:
357 virtual Number y_d_cont(Number x1, Number x2) const
358 {
359 return 2. - 2.*(x1*(x1-1.) + x2*(x2-1.));
360 }
362 virtual Number d_cont(Number x1, Number x2, Number y) const
363 {
364 return 0.;
365 }
367 virtual Number d_cont_dy(Number x1, Number x2, Number y) const
368 {
369 return 0.;
370 }
372 virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
373 {
374 return 0.;
375 }
378 virtual bool d_cont_dydy_alwayszero() const
379 {
380 return true;
381 }
383 virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
384 {
385 return u - y*y;
386 }
388 virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
389 {
390 return - 2.*y;
391 }
393 virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
394 {
395 return 1.;
396 }
398 virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
399 {
400 return -2.;
401 }
404 virtual bool b_cont_dydy_alwayszero() const
405 {
406 return false;
407 }
408 private:
411 MittelmannBndryCntrlNeum2(const MittelmannBndryCntrlNeum2&);
412 MittelmannBndryCntrlNeum2& operator=(const MittelmannBndryCntrlNeum2&);
414 };
415
417 class MittelmannBndryCntrlNeum3 : public MittelmannBndryCntrlNeumBase
418 {
419 public:
420 MittelmannBndryCntrlNeum3()
421 {}
422
423 virtual ~MittelmannBndryCntrlNeum3()
424 {}
425
426 virtual bool InitializeProblem(Index N)
427 {
428 if (N<1) {
429 printf("N has to be at least 1.");
430 return false;
431 }
432 Number alpha = 0.01;
433 Number lb_y = -1e20;
434 Number ub_y = 2.7;
435 Number lb_u = 1.8;
436 Number ub_u = 2.5;
437 Number u_init = (ub_u+lb_u)/2.;
438
439 SetBaseParameters(N, alpha, lb_y, ub_y, lb_u, ub_u, u_init);
440 return true;
441 }
442 protected:
444 virtual Number y_d_cont(Number x1, Number x2) const
445 {
446 return 2. - 2.*(x1*(x1-1.) + x2*(x2-1.));
447 }
449 virtual Number d_cont(Number x1, Number x2, Number y) const
450 {
451 return y*y*y-y;
452 }
454 virtual Number d_cont_dy(Number x1, Number x2, Number y) const
455 {
456 return 3.*y*y-1.;
457 }
459 virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
460 {
461 return 6.*y;
462 }
465 virtual bool d_cont_dydy_alwayszero() const
466 {
467 return false;
468 }
470 virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
471 {
472 return u;
473 }
475 virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
476 {
477 return 0.;
478 }
480 virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
481 {
482 return 1.;
483 }
485 virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
486 {
487 return 0.;
488 }
491 virtual bool b_cont_dydy_alwayszero() const
492 {
493 return true;
494 }
495 private:
498 MittelmannBndryCntrlNeum3(const MittelmannBndryCntrlNeum3&);
499 MittelmannBndryCntrlNeum3& operator=(const MittelmannBndryCntrlNeum3&);
501 };
502
504 class MittelmannBndryCntrlNeum4 : public MittelmannBndryCntrlNeumBase
505 {
506 public:
507 MittelmannBndryCntrlNeum4()
508 {}
509
510 virtual ~MittelmannBndryCntrlNeum4()
511 {}
512
513 virtual bool InitializeProblem(Index N)
514 {
515 if (N<1) {
516 printf("N has to be at least 1.");
517 return false;
518 }
519 Number alpha = 0.;
520 Number lb_y = -1e20;
521 Number ub_y = 2.7;
522 Number lb_u = 1.8;
523 Number ub_u = 2.5;
524 Number u_init = (ub_u+lb_u)/2.;
525
526 SetBaseParameters(N, alpha, lb_y, ub_y, lb_u, ub_u, u_init);
527 return true;
528 }
529 protected:
531 virtual Number y_d_cont(Number x1, Number x2) const
532 {
533 return 2. - 2.*(x1*(x1-1.) + x2*(x2-1.));
534 }
536 virtual Number d_cont(Number x1, Number x2, Number y) const
537 {
538 return y*y*y-y;
539 }
541 virtual Number d_cont_dy(Number x1, Number x2, Number y) const
542 {
543 return 3.*y*y-1.;
544 }
546 virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
547 {
548 return 6.*y;
549 }
552 virtual bool d_cont_dydy_alwayszero() const
553 {
554 return false;
555 }
557 virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
558 {
559 return u;
560 }
562 virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
563 {
564 return 0.;
565 }
567 virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
568 {
569 return 1.;
570 }
572 virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
573 {
574 return 0.;
575 }
578 virtual bool b_cont_dydy_alwayszero() const
579 {
580 return true;
581 }
582 private:
585 MittelmannBndryCntrlNeum4(const MittelmannBndryCntrlNeum4&);
586 MittelmannBndryCntrlNeum4& operator=(const MittelmannBndryCntrlNeum4&);
588 };
589
590 #endif
x
Number * x
Input: Starting point Output: Optimal solution.
Definition: IpStdCInterface.h:238
MittelmannBndryCntrlNeum3::b_cont_dy
virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:475
MittelmannBndryCntrlNeumBase::x1_grid
Number x1_grid(Index i) const
Compute the grid coordinate for given index in x1 direction.
Definition: MittelmannBndryCntrlNeum.hpp:230
MittelmannBndryCntrlNeumBase::u1j_index
Index u1j_index(Index j) const
Translation of mesh point indices to NLP variable indices for u(x_ij) on {1} x (0,1) boudnary.
Definition: MittelmannBndryCntrlNeum.hpp:213
Ipopt::IpoptCalculatedQuantities
Class for all IPOPT specific calculated quantities.
Definition: IpIpoptCalculatedQuantities.hpp:81
MittelmannBndryCntrlNeumBase::h_
Number h_
Step size.
Definition: MittelmannBndryCntrlNeum.hpp:177
index_style
Number Number Index Number Number Index Index Index index_style
indexing style for iRow &amp; jCol, 0 for C style, 1 for Fortran style
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeumBase::ub_u_
Number ub_u_
overall upper bound on u
Definition: MittelmannBndryCntrlNeum.hpp:187
MittelmannBndryCntrlNeum4::b_cont_dydy
virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:572
MittelmannBndryCntrlNeum4::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannBndryCntrlNeum.hpp:531
m
Number Number Index m
Number of constraints.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeum1::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannBndryCntrlNeum.hpp:270
MittelmannBndryCntrlNeum2::~MittelmannBndryCntrlNeum2
virtual ~MittelmannBndryCntrlNeum2()
Definition: MittelmannBndryCntrlNeum.hpp:336
MittelmannBndryCntrlNeum4::b_cont_du
virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:567
MittelmannBndryCntrlNeum3::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannBndryCntrlNeum.hpp:426
MittelmannBndryCntrlNeum1::~MittelmannBndryCntrlNeum1
virtual ~MittelmannBndryCntrlNeum1()
Definition: MittelmannBndryCntrlNeum.hpp:249
g
Number Number * g
Values of constraint at final point (output only - ignored if set to NULL)
Definition: IpStdCInterface.h:238
MittelmannBndryCntrlNeumBase::y_index
Index y_index(Index i, Index j) const
Translation of mesh point indices to NLP variable indices for y(x_ij)
Definition: MittelmannBndryCntrlNeum.hpp:201
eval_h
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.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeumBase::u0j_index
Index u0j_index(Index j) const
Translation of mesh point indices to NLP variable indices for u(x_ij) on {0} x (0,1) boudnary.
Definition: MittelmannBndryCntrlNeum.hpp:207
MittelmannBndryCntrlNeum3::b_cont_du
virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:480
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:17
MittelmannBndryCntrlNeum1::MittelmannBndryCntrlNeum1
MittelmannBndryCntrlNeum1()
Definition: MittelmannBndryCntrlNeum.hpp:246
MittelmannBndryCntrlNeum2::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:378
MittelmannBndryCntrlNeum2::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannBndryCntrlNeum.hpp:357
MittelmannBndryCntrlNeum1::d_cont
virtual Number d_cont(Number x1, Number x2, Number y) const
Forcing function for the elliptic equation.
Definition: MittelmannBndryCntrlNeum.hpp:275
eval_grad_f
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.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeumBase::ui0_index
Index ui0_index(Index j) const
Translation of mesh point indices to NLP variable indices for u(x_ij) on (0,1) x {0} boudnary...
Definition: MittelmannBndryCntrlNeum.hpp:219
MittelmannBndryCntrlNeumBase::lb_y_
Number lb_y_
overall lower bound on y
Definition: MittelmannBndryCntrlNeum.hpp:181
MittelmannBndryCntrlNeum3::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:454
MittelmannBndryCntrlNeumBase::y_d_
Number * y_d_
Array for the target profile for y.
Definition: MittelmannBndryCntrlNeum.hpp:194
MittelmannBndryCntrlNeumBase::hh_
Number hh_
h_ squaredd
Definition: MittelmannBndryCntrlNeum.hpp:179
MittelmannBndryCntrlNeumBase::ub_y_
Number ub_y_
overall upper bound on y
Definition: MittelmannBndryCntrlNeum.hpp:183
MittelmannBndryCntrlNeum3::MittelmannBndryCntrlNeum3
MittelmannBndryCntrlNeum3()
Definition: MittelmannBndryCntrlNeum.hpp:420
MittelmannBndryCntrlNeum3::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:465
MittelmannBndryCntrlNeum3::b_cont_dydy_alwayszero
virtual bool b_cont_dydy_alwayszero() const
returns true if second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:491
MittelmannBndryCntrlNeum2::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:367
MittelmannBndryCntrlNeum3::y_d_cont
virtual Number y_d_cont(Number x1, Number x2) const
Target profile function for y.
Definition: MittelmannBndryCntrlNeum.hpp:444
MittelmannBndryCntrlNeum1::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannBndryCntrlNeum.hpp:252
MittelmannBndryCntrlNeum1::b_cont_dy
virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:301
MittelmannBndryCntrlNeum2::d_cont
virtual Number d_cont(Number x1, Number x2, Number y) const
Forcing function for the elliptic equation.
Definition: MittelmannBndryCntrlNeum.hpp:362
MittelmannBndryCntrlNeum2::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannBndryCntrlNeum.hpp:339
MittelmannBndryCntrlNeum1::b_cont_dydy
virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:311
eval_jac_g
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.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeumBase::x2_grid
Number x2_grid(Index j) const
Compute the grid coordinate for given index in x2 direction.
Definition: MittelmannBndryCntrlNeum.hpp:235
Ipopt::SolverReturn
SolverReturn
enum for the return from the optimize algorithm (obviously we need to add more)
Definition: IpAlgTypes.hpp:22
MittelmannBndryCntrlNeum4::InitializeProblem
virtual bool InitializeProblem(Index N)
Initialize internal parameters, where N is a parameter determining the problme size.
Definition: MittelmannBndryCntrlNeum.hpp:513
MittelmannBndryCntrlNeum1::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannBndryCntrlNeum.hpp:285
RegisteredTNLP.hpp
nele_jac
Number Number Index Number Number Index nele_jac
Number of non-zero elements in constraint Jacobian.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeum1::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:291
MittelmannBndryCntrlNeum2::b_cont_du
virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:393
MittelmannBndryCntrlNeum4::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:541
MittelmannBndryCntrlNeum3
Class implementating Example 7.
Definition: MittelmannBndryCntrlNeum.hpp:417
MittelmannBndryCntrlNeum2::b_cont
virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
Function in Neuman boundary condition.
Definition: MittelmannBndryCntrlNeum.hpp:383
MittelmannBndryCntrlNeum1
Class implementating Example 5.
Definition: MittelmannBndryCntrlNeum.hpp:243
MittelmannBndryCntrlNeum4::d_cont
virtual Number d_cont(Number x1, Number x2, Number y) const
Forcing function for the elliptic equation.
Definition: MittelmannBndryCntrlNeum.hpp:536
MittelmannBndryCntrlNeum4::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannBndryCntrlNeum.hpp:546
MittelmannBndryCntrlNeum3::~MittelmannBndryCntrlNeum3
virtual ~MittelmannBndryCntrlNeum3()
Definition: MittelmannBndryCntrlNeum.hpp:423
MittelmannBndryCntrlNeum1::b_cont_du
virtual Number b_cont_du(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:306
MittelmannBndryCntrlNeum3::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannBndryCntrlNeum.hpp:459
MittelmannBndryCntrlNeum1::d_cont_dy
virtual Number d_cont_dy(Number x1, Number x2, Number y) const
First partial derivative of forcing function w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:280
MittelmannBndryCntrlNeum4::b_cont
virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
Function in Neuman boundary condition.
Definition: MittelmannBndryCntrlNeum.hpp:557
Ipopt::IpoptData
Class to organize all the data required by the algorithm.
Definition: IpIpoptData.hpp:83
eval_g
Number Number Index Number Number Index Index Index Eval_F_CB Eval_G_CB eval_g
Callback function for evaluating constraint functions.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeumBase::u_init_
Number u_init_
Initial value for the constrols u.
Definition: MittelmannBndryCntrlNeum.hpp:189
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:19
MittelmannBndryCntrlNeum2::b_cont_dydy
virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:398
MittelmannBndryCntrlNeum4::~MittelmannBndryCntrlNeum4
virtual ~MittelmannBndryCntrlNeum4()
Definition: MittelmannBndryCntrlNeum.hpp:510
MittelmannBndryCntrlNeum3::b_cont
virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
Function in Neuman boundary condition.
Definition: MittelmannBndryCntrlNeum.hpp:470
x_scaling
Number Number * x_scaling
Definition: IpStdCInterface.h:210
MittelmannBndryCntrlNeum4::b_cont_dydy_alwayszero
virtual bool b_cont_dydy_alwayszero() const
returns true if second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:578
IpTNLP.hpp
nele_hess
Number Number Index Number Number Index Index nele_hess
Number of non-zero elements in Hessian of Lagrangian.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeum4
Class implementating Example 8.
Definition: MittelmannBndryCntrlNeum.hpp:504
MittelmannBndryCntrlNeum2::MittelmannBndryCntrlNeum2
MittelmannBndryCntrlNeum2()
Definition: MittelmannBndryCntrlNeum.hpp:333
MittelmannBndryCntrlNeumBase::ui1_index
Index ui1_index(Index j) const
Translation of mesh point indices to NLP variable indices for u(x_ij) on (0,1) x {1} boudnary...
Definition: MittelmannBndryCntrlNeum.hpp:225
RegisteredTNLP
Class implemented the NLP discretization of.
Definition: RegisteredTNLP.hpp:20
MittelmannBndryCntrlNeum2
Class implementating Example 6.
Definition: MittelmannBndryCntrlNeum.hpp:330
MittelmannBndryCntrlNeum2::b_cont_dy
virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:388
MittelmannBndryCntrlNeumBase
Base class for boundary control problems with Neumann boundary conditions, as formulated by Hans Mitt...
Definition: MittelmannBndryCntrlNeum.hpp:49
MittelmannBndryCntrlNeumBase::lb_u_
Number lb_u_
overall lower bound on u
Definition: MittelmannBndryCntrlNeum.hpp:185
MittelmannBndryCntrlNeum2::d_cont_dydy
virtual Number d_cont_dydy(Number x1, Number x2, Number y) const
Second partial derivative of forcing function w.r.t y,y.
Definition: MittelmannBndryCntrlNeum.hpp:372
g_scaling
Number Number Number * g_scaling
Definition: IpStdCInterface.h:210
MittelmannBndryCntrlNeum1::b_cont_dydy_alwayszero
virtual bool b_cont_dydy_alwayszero() const
returns true if second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:317
MittelmannBndryCntrlNeum2::b_cont_dydy_alwayszero
virtual bool b_cont_dydy_alwayszero() const
returns true if second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:404
Ipopt::TNLP::IndexStyleEnum
IndexStyleEnum
overload this method to return the number of variables and constraints, and the number of non-zeros i...
Definition: IpTNLP.hpp:80
MittelmannBndryCntrlNeumBase::N_
Index N_
Number of mesh points in one dimension (excluding boundary)
Definition: MittelmannBndryCntrlNeum.hpp:175
MittelmannBndryCntrlNeum4::b_cont_dy
virtual Number b_cont_dy(Number x1, Number x2, Number y, Number u) const
First partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:562
MittelmannBndryCntrlNeum3::d_cont
virtual Number d_cont(Number x1, Number x2, Number y) const
Forcing function for the elliptic equation.
Definition: MittelmannBndryCntrlNeum.hpp:449
MittelmannBndryCntrlNeum3::b_cont_dydy
virtual Number b_cont_dydy(Number x1, Number x2, Number y, Number u) const
Second partial derivative of b_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:485
obj_scaling
Number obj_scaling
Definition: IpStdCInterface.h:210
eval_f
Number Number Index Number Number Index Index Index Eval_F_CB eval_f
Callback function for evaluating objective function.
Definition: IpStdCInterface.h:137
MittelmannBndryCntrlNeum4::MittelmannBndryCntrlNeum4
MittelmannBndryCntrlNeum4()
Definition: MittelmannBndryCntrlNeum.hpp:507
MittelmannBndryCntrlNeum4::d_cont_dydy_alwayszero
virtual bool d_cont_dydy_alwayszero() const
returns true if second partial derivative of d_cont w.r.t.
Definition: MittelmannBndryCntrlNeum.hpp:552
MittelmannBndryCntrlNeum1::b_cont
virtual Number b_cont(Number x1, Number x2, Number y, Number u) const
Function in Neuman boundary condition.
Definition: MittelmannBndryCntrlNeum.hpp:296
MittelmannBndryCntrlNeumBase::alpha_
Number alpha_
Weighting parameter for the control target deviation functional in the objective. ...
Definition: MittelmannBndryCntrlNeum.hpp:192