Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
problem.f90
Go to the documentation of this file.
1
34
41module problem
42 use num_types, only: rp, dp
43 use design, only: design_t
47 use vector, only: vector_t
48 use matrix, only: matrix_t
49 use device, only: host_to_device, device_to_host
50 use json_module, only: json_file
51 use json_utils, only: json_extract_item, json_get, json_get_or_default
52 use simulation_m, only: simulation_t
53 use logger, only: neko_log
54 use math, only: copy
55 use vector_math, only: vector_add2, vector_cfill
56 use time_step_controller, only: time_step_controller_t
59 use simulation, only: simulation_init, simulation_step, simulation_finalize
60 use mpi_f08, only: mpi_wtime
61 use profiler, only: profiler_start_region, profiler_end_region
62
63 implicit none
64 private
65
67 type, public :: problem_t
68 private
69
71 integer :: n_design = 0
73 integer :: n_objectives = 0
75 integer :: n_constraints = 0
76
78 class(objective_wrapper_t), allocatable, dimension(:) :: objective_list
80 class(constraint_wrapper_t), allocatable, dimension(:) :: constraint_list
81
82 contains
83
84 ! ----------------------------------------------------------------------- !
85 ! Interfaces
86
88 procedure, pass(this), public :: init => problem_init
90 procedure, pass(this), public :: free => problem_free
91
95 procedure, pass(this), public :: compute => problem_compute
96
100 procedure, pass(this), public :: compute_sensitivity => &
101 problem_compute_sensitivity
104 procedure, pass(this), public :: run_forward_unsteady => &
105 problem_run_forward_unsteady
108 procedure, pass(this), public :: run_backward_unsteady => &
109 problem_run_backward_unsteady
110 ! ----------------------------------------------------------------------- !
111 ! Base class methods
112
114 procedure, pass(this), public :: read_objectives => problem_read_objectives
116 procedure, pass(this), public :: read_constraints => &
117 problem_read_constraints
118
119 ! ----------------------------------------------------------------------- !
120 ! Actual methods
121
123 procedure, pass(this), public :: write => problem_write
124
126 procedure, pass(this), public :: add_objective => problem_add_objective
128 procedure, pass(this), public :: add_constraint => problem_add_constraint
129
130 ! ----------------------------------------------------------------------- !
131 ! Internal Updater methods
132
134 procedure, pass(this) :: update_objectives => &
135 problem_update_objectives
137 procedure, pass(this) :: update_constraints => &
138 problem_update_constraints
140 procedure, pass(this) :: update_objective_sensitivities => &
141 problem_update_objective_sensitivities
143 procedure, pass(this) :: update_constraint_sensitivities => &
144 problem_update_constraint_sensitivities
145
147 procedure, pass(this) :: reset_objectives => &
148 problem_reset_objectives
150 procedure, pass(this) :: reset_constraints => &
151 problem_reset_constraints
153 procedure, pass(this) :: reset_objective_sensitivities => &
154 problem_reset_objective_sensitivities
156 procedure, pass(this) :: reset_constraint_sensitivities => &
157 problem_reset_constraint_sensitivities
158
160 procedure, pass(this) :: accumulate_objectives => &
161 problem_accumulate_objectives
163 procedure, pass(this) :: accumulate_constraints => &
164 problem_accumulate_constraints
166 procedure, pass(this) :: accumulate_objective_sensitivities => &
167 problem_accumulate_objective_sensitivities
169 procedure, pass(this) :: accumulate_constraint_sensitivities => &
170 problem_accumulate_constraint_sensitivities
171
172 ! ----------------------------------------------------------------------- !
173 ! Public Getters
174
176 procedure, pass(this), public :: get_objective_value => &
177 problem_get_objective_value
179 procedure, pass(this), public :: get_all_objective_values => &
180 problem_get_all_objective_values
182 procedure, pass(this), public :: get_constraint_values => &
183 problem_get_constraint_values
185 procedure, pass(this), public :: get_objective_sensitivities => &
186 problem_get_objective_sensitivities
188 procedure, pass(this), public :: get_constraint_sensitivities => &
189 problem_get_constraint_sensitivities
190
192 procedure, pass(this) :: get_n_objectives => problem_get_num_objectives
194 procedure, pass(this) :: get_n_constraints => problem_get_num_constraints
195
197 procedure, pass(this) :: get_log_header => problem_get_log_header
198
199 end type problem_t
200
201contains
202
203 ! ========================================================================== !
204 ! Base class methods
205
207 subroutine problem_init(this, parameters, design, simulation)
208 class(problem_t), intent(inout) :: this
209 type(json_file), intent(inout) :: parameters
210 class(design_t), intent(in) :: design
211 type(simulation_t), optional, intent(inout) :: simulation
212
213 call this%free()
214
215 this%n_design = design%size()
216
217 ! Read the objectives and constraints
218 call this%read_objectives(parameters, design, simulation)
219 call this%read_constraints(parameters, design, simulation)
220
221 end subroutine problem_init
222
224 subroutine problem_free(this)
225 class(problem_t), intent(inout) :: this
226 integer :: i
227
228 this%n_design = 0
229 this%n_objectives = 0
230 this%n_constraints = 0
231
232 ! Free the objective list
233 if (allocated(this%objective_list)) then
234 do i = 1, size(this%objective_list)
235 call this%objective_list(i)%free()
236 end do
237 deallocate(this%objective_list)
238 end if
239
240 ! Free the constraint list
241 if (allocated(this%constraint_list)) then
242 do i = 1, size(this%constraint_list)
243 call this%constraint_list(i)%free()
244 end do
245 deallocate(this%constraint_list)
246 end if
247 end subroutine problem_free
248
250 subroutine problem_write(this, idx)
251 class(problem_t), intent(inout) :: this
252 integer, intent(in) :: idx
253
254 end subroutine problem_write
255
256 ! ========================================================================== !
257 ! Handling constraints and objectives
258
260 subroutine problem_read_objectives(this, parameters, design, simulation)
261 class(problem_t), intent(inout) :: this
262 type(json_file), intent(inout) :: parameters
263 class(design_t), intent(in) :: design
264 type(simulation_t), optional, intent(inout) :: simulation
265 class(objective_t), allocatable :: objective
266
267 ! A single objective term as its own json_file.
268 character(len=:), allocatable :: path, type
269 type(json_file) :: objective_json
270 integer :: n_objectives, i
271 logical :: dealias
272
273 call neko_log%section("Reading objectives")
274
275 ! Get the number of objectives.
276 path = "optimization.objectives"
277 if (parameters%valid_path(path)) then
278 call parameters%info(path, n_children = n_objectives)
279
280 ! Grab a single parameters entry and create a constraint from it.
281 do i = 1, n_objectives
282 call json_extract_item(parameters, path, i, objective_json)
283 call json_get(objective_json, "type", type)
284 call neko_log%message(type)
285
286 call objective_factory(objective, objective_json, design, simulation)
287 call this%add_objective(objective)
288 end do
289 end if
290
291 if (present(simulation)) then
292 if (allocated(objective)) deallocate(objective)
294 select type(alo => objective)
296 call json_get_or_default(parameters, &
297 "adjoint_fluid.dealias_sensitivity", dealias, .true.)
298 call alo%init_from_attributes(design, simulation, weight = 1.0_rp, &
299 name = "Augmented Lagrangian", mask_name = "", &
300 dealias = dealias)
301 end select
302 call this%add_objective(objective)
303 end if
304
305 call neko_log%end_section()
306
307 end subroutine problem_read_objectives
308
310 subroutine problem_read_constraints(this, parameters, design, simulation)
311 class(problem_t), intent(inout) :: this
312 type(json_file), intent(inout) :: parameters
313 class(design_t), intent(in) :: design
314 class(constraint_t), allocatable :: constraint
315 type(simulation_t), optional, intent(inout) :: simulation
316
317 ! A single constraint term as its own json_file.
318 character(len=:), allocatable :: path, type
319 type(json_file) :: constraint_json
320 integer :: n_constraints, i
321
322 call neko_log%section("Reading constraints")
323
324 ! Get the number of constraints.
325 path = "optimization.constraints"
326
327 if (parameters%valid_path(path)) then
328 call parameters%info(path, n_children = n_constraints)
329
330 ! Grab a single parameters entry and create a constraint from it.
331 do i = 1, n_constraints
332 call json_extract_item(parameters, path, i, constraint_json)
333 call json_get(constraint_json, "type", type)
334 call neko_log%message(type)
335
336 call constraint_factory(constraint, constraint_json, design, simulation)
337 call this%add_constraint(constraint)
338 end do
339 end if
340
341 call neko_log%end_section()
342
343 end subroutine problem_read_constraints
344
346 subroutine problem_add_objective(this, objective)
347 class(problem_t), intent(inout) :: this
348 class(objective_t), allocatable, intent(inout) :: objective
349 class(objective_wrapper_t), allocatable, dimension(:) :: temp_list
350 integer :: i, n
351
352 n = 0
353 if (allocated(this%objective_list)) then
354 n = size(this%objective_list)
355 call move_alloc(this%objective_list, temp_list)
356 allocate(this%objective_list(n + 1))
357 if (allocated(temp_list)) then
358 do i = 1, n
359 call move_alloc(temp_list(i)%objective, &
360 this%objective_list(i)%objective)
361 end do
362 end if
363 else
364 allocate(this%objective_list(1))
365 end if
366
367 call move_alloc(objective, this%objective_list(n + 1)%objective)
368 this%n_objectives = n + 1
369 end subroutine problem_add_objective
370
372 subroutine problem_add_constraint(this, constraint)
373 class(problem_t), intent(inout) :: this
374 class(constraint_t), allocatable, intent(inout) :: constraint
375 class(constraint_wrapper_t), allocatable, dimension(:) :: temp_list
376 integer :: i, n
377
378 n = 0
379 if (allocated(this%constraint_list)) then
380 n = size(this%constraint_list)
381 call move_alloc(this%constraint_list, temp_list)
382 allocate(this%constraint_list(n + 1))
383 if (allocated(temp_list)) then
384 do i = 1, n
385 call move_alloc(temp_list(i)%constraint, &
386 this%constraint_list(i)%constraint)
387 end do
388 end if
389 else
390 allocate(this%constraint_list(1))
391 end if
392
393 call move_alloc(constraint, this%constraint_list(n + 1)%constraint)
394 this%n_constraints = n + 1
395 end subroutine problem_add_constraint
396
397 ! ========================================================================== !
398 ! Problem part computation
399
401 subroutine problem_compute(this, design, simulation)
402 class(problem_t), intent(inout) :: this
403 class(design_t), intent(inout) :: design
404 class(simulation_t), optional, intent(inout) :: simulation
405
406 if (present(simulation)) then
407 call simulation%reset()
408 if (simulation%unsteady) then
409 ! Objective value accumulated
410 call this%run_forward_unsteady(simulation, design)
411 else
412 call simulation%run_forward()
413 ! Compute objective value on steady field
414 call this%update_objectives(design)
415 end if
416 else
417 call this%update_objectives(design)
418 end if
419
420 call this%update_constraints(design)
421
422 end subroutine problem_compute
423
425 subroutine problem_compute_sensitivity(this, design, simulation)
426 class(problem_t), intent(inout) :: this
427 class(design_t), intent(inout) :: design
428 class(simulation_t), optional, intent(inout) :: simulation
429
430 type(vector_t) :: objective_sensitivity
431
432 if (present(simulation)) then
433 if (simulation%unsteady) then
434 ! Objective sensitivity accumulated
435 call this%run_backward_unsteady(simulation, design)
436 else
437 call simulation%run_backward()
438 ! Compute sensitivity on steady field
439 call this%update_objective_sensitivities(design)
440 end if
441 else
442 call this%update_objective_sensitivities(design)
443 end if
444
445 call this%update_constraint_sensitivities(design)
446
447 call objective_sensitivity%init(this%n_design)
448 call this%get_objective_sensitivities(objective_sensitivity)
449
450 call design%map_backward(objective_sensitivity)
451
452 call objective_sensitivity%free()
453 end subroutine problem_compute_sensitivity
454
456 subroutine problem_run_forward_unsteady(this, simulation, design)
457 class(problem_t), intent(inout) :: this
458 class(simulation_t), intent(inout) :: simulation
459 class(design_t), intent(inout) :: design
460 type(time_step_controller_t) :: dt_controller
461 real(kind=dp) :: loop_start
462
463 call dt_controller%init(simulation%neko_case%params)
464
465 call simulation%reset()
466 call simulation_init(simulation%neko_case, dt_controller)
467
468 ! Reset the objective value to zero
469 call this%reset_objectives()
470
471 call profiler_start_region("Forward simulation")
472 loop_start = mpi_wtime()
473 simulation%n_timesteps = 0
474 do while (simulation%neko_case%time%t .lt. simulation%neko_case%time%end_time)
475 simulation%n_timesteps = simulation%n_timesteps + 1
476 ! step forward
477 call simulation_step(simulation%neko_case, dt_controller, loop_start)
478 ! accumulate objective value
479 call this%accumulate_objectives(design, simulation%adjoint_case%time%dt)
480 ! save a checkpoint
481 call simulation%checkpoint%save(simulation%neko_case)
482 end do
483 call profiler_end_region("Forward simulation")
484
485 call simulation_finalize(simulation%neko_case)
486
487 end subroutine problem_run_forward_unsteady
488
490 subroutine problem_run_backward_unsteady(this, simulation, design)
491 class(problem_t), intent(inout) :: this
492 class(simulation_t), intent(inout) :: simulation
493 class(design_t), intent(inout) :: design
494 type(time_step_controller_t) :: dt_controller
495 real(kind=dp) :: loop_start
496 real(kind=rp) :: cfl
497 real(kind=rp) :: total_time
498 integer :: i
499
500 call dt_controller%init(simulation%neko_case%params)
501
502 call simulation_adjoint_init(simulation%adjoint_case, dt_controller)
503
504 ! Reset the sensitivity value to zero
505 call this%reset_objective_sensitivities()
506
507 cfl = simulation%adjoint_case%fluid_adj%compute_cfl(simulation%adjoint_case%time%dt)
508 loop_start = mpi_wtime()
509
510 total_time = simulation%n_timesteps * simulation%adjoint_case%time%dt
511
512 call profiler_start_region("Adjoint simulation")
513
514 ! TODO. IC's need to be handled rather carefully, we should take a
515 ! checkpoint at i = 0. However, 99% of the time we use an initial condition
516 ! for the fluid of u=0, so this doesn't matter. Then we use u_adj = 0 on
517 ! the other end.
518 !
519 ! we have:
520 ! - n time steps to compute
521 ! - n+1 fields to consider
522 ! - n-1 non-zero contributions to u * u_adj
523 !
524 ! non-zero
525 ! |--------|
526 ! primal o--x--x--x--x--x
527 ! x--x--x--x--x--o adjoint
528 ! ^ ^
529 ! u=0 u_adj=0
530
531 do i = simulation%n_timesteps, 1, -1
532 ! restore primal field
533 call simulation%checkpoint%restore(simulation%neko_case, i)
534 ! accumulate objective sensitivity
535 call this%accumulate_objective_sensitivities(design, &
536 simulation%adjoint_case%time%dt)
537 ! step the adjoint backwards
538 call simulation_adjoint_step(simulation%adjoint_case, dt_controller, &
539 cfl, loop_start, total_time)
540 end do
541
542 call profiler_end_region("Forward simulation")
543
544 call simulation_adjoint_finalize(simulation%adjoint_case)
545
546 end subroutine problem_run_backward_unsteady
547
548 ! ========================================================================== !
549 ! Update the objectives and constraints
550
557 subroutine problem_update_objectives(this, design)
558 class(problem_t), intent(inout) :: this
559 class(design_t), intent(in) :: design
560 integer :: i
561
562 do i = 1, this%n_objectives
563 call this%objective_list(i)%objective%update_value(design)
564 end do
565 end subroutine problem_update_objectives
566
573 subroutine problem_update_constraints(this, design)
574 class(problem_t), intent(inout) :: this
575 class(design_t), intent(in) :: design
576 integer :: i
577
578 do i = 1, this%n_constraints
579 call this%constraint_list(i)%constraint%update_value(design)
580 end do
581 end subroutine problem_update_constraints
582
589 subroutine problem_update_objective_sensitivities(this, design)
590 class(problem_t), intent(inout) :: this
591 class(design_t), intent(in) :: design
592 integer :: i
593
594 do i = 1, this%n_objectives
595 call this%objective_list(i)%objective%update_sensitivity(design)
596 end do
597 end subroutine problem_update_objective_sensitivities
598
605 subroutine problem_update_constraint_sensitivities(this, design)
606 class(problem_t), intent(inout) :: this
607 class(design_t), intent(in) :: design
608 integer :: i
609
610 do i = 1, this%n_constraints
611 call this%constraint_list(i)%constraint%update_sensitivity(design)
612 end do
613 end subroutine problem_update_constraint_sensitivities
614
615 ! ========================================================================== !
616 ! Reset the objectives and constraints
617
622 subroutine problem_reset_objectives(this)
623 class(problem_t), intent(inout) :: this
624 integer :: i
625
626 do i = 1, this%n_objectives
627 call this%objective_list(i)%objective%reset_value()
628 end do
629 end subroutine problem_reset_objectives
630
635 subroutine problem_reset_constraints(this)
636 class(problem_t), intent(inout) :: this
637 integer :: i
638
639 do i = 1, this%n_constraints
640 call this%constraint_list(i)%constraint%reset_value()
641 end do
642 end subroutine problem_reset_constraints
643
648 subroutine problem_reset_objective_sensitivities(this)
649 class(problem_t), intent(inout) :: this
650 integer :: i
651
652 do i = 1, this%n_objectives
653 call this%objective_list(i)%objective%reset_sensitivity()
654 end do
655 end subroutine problem_reset_objective_sensitivities
656
661 subroutine problem_reset_constraint_sensitivities(this)
662 class(problem_t), intent(inout) :: this
663 integer :: i
664
665 do i = 1, this%n_constraints
666 call this%constraint_list(i)%constraint%reset_sensitivity()
667 end do
668 end subroutine problem_reset_constraint_sensitivities
669
670 ! ========================================================================== !
671 ! Accumulate the objectives and constraints
672
679 subroutine problem_accumulate_objectives(this, design, dt)
680 class(problem_t), intent(inout) :: this
681 class(design_t), intent(in) :: design
682 real(kind=rp), intent(in) :: dt
683 integer :: i
684
685 do i = 1, this%n_objectives
686 call this%objective_list(i)%objective%accumulate_value(design, dt)
687 end do
688 end subroutine problem_accumulate_objectives
689
696 subroutine problem_accumulate_constraints(this, design, dt)
697 class(problem_t), intent(inout) :: this
698 class(design_t), intent(in) :: design
699 real(kind=rp), intent(in) :: dt
700 integer :: i
701
702 do i = 1, this%n_constraints
703 call this%constraint_list(i)%constraint%accumulate_value(design, dt)
704 end do
705 end subroutine problem_accumulate_constraints
706
713 subroutine problem_accumulate_objective_sensitivities(this, design, dt)
714 class(problem_t), intent(inout) :: this
715 class(design_t), intent(in) :: design
716 real(kind=rp), intent(in) :: dt
717 integer :: i
718
719 do i = 1, this%n_objectives
720 call this%objective_list(i)%objective%accumulate_sensitivity(design, dt)
721 end do
722 end subroutine problem_accumulate_objective_sensitivities
723
730 subroutine problem_accumulate_constraint_sensitivities(this, design, dt)
731 class(problem_t), intent(inout) :: this
732 class(design_t), intent(in) :: design
733 real(kind=rp), intent(in) :: dt
734 integer :: i
735
736 do i = 1, this%n_constraints
737 call this%constraint_list(i)%constraint%accumulate_sensitivity(design, dt)
738 end do
739 end subroutine problem_accumulate_constraint_sensitivities
740
741 ! ========================================================================== !
742 ! Problem part getters
743
750 subroutine problem_get_objective_value(this, objective_value)
751 class(problem_t), intent(in) :: this
752 real(kind=rp), intent(out) :: objective_value
753 integer :: i
754
755 objective_value = 0.0_rp
756 do i = 1, this%n_objectives
757 objective_value = objective_value + &
758 this%objective_list(i)%objective%get_weight() * &
759 this%objective_list(i)%objective%get_value()
760 end do
761
762 end subroutine problem_get_objective_value
763
770 subroutine problem_get_all_objective_values(this, all_objective_values)
771 class(problem_t), intent(in) :: this
772 type(vector_t), intent(inout) :: all_objective_values
773 integer :: i
774
775 do i = 1, this%n_objectives
776 all_objective_values%x(i) = this%objective_list(i)%objective%value
777 end do
778
779 call all_objective_values%copy_from(host_to_device, sync = .true.)
780
781 end subroutine problem_get_all_objective_values
782
789 subroutine problem_get_constraint_values(this, constraint_value)
790 class(problem_t), intent(in) :: this
791 type(vector_t), intent(inout) :: constraint_value
792 integer :: i
793
794 do i = 1, this%n_constraints
795 constraint_value%x(i) = this%constraint_list(i)%constraint%value
796 end do
797
798 call constraint_value%copy_from(host_to_device, sync = .true.)
799
800 end subroutine problem_get_constraint_values
801
808 subroutine problem_get_objective_sensitivities(this, sensitivity)
809 class(problem_t), intent(in) :: this
810 type(vector_t), intent(inout) :: sensitivity
811 integer :: i
812
813 call vector_cfill(sensitivity, 0.0_rp)
814 do i = 1, this%n_objectives
815 call vector_add2(sensitivity, &
816 this%objective_list(i)%objective%sensitivity)
817 end do
818
819 end subroutine problem_get_objective_sensitivities
820
827 subroutine problem_get_constraint_sensitivities(this, sensitivity)
828 class(problem_t), intent(inout) :: this
829 type(matrix_t), target, intent(inout) :: sensitivity
830 real(kind=rp), pointer :: row(:)
831 integer :: i
832
833 ! Copy all constraint sensitivities to host, sync on last one
834 do i = 1, this%n_constraints
835 call this%constraint_list(i)%constraint%sensitivity%copy_from( &
836 device_to_host, sync = i .eq. this%n_constraints)
837 end do
838
839 do i = 1, this%n_constraints
840 row(1:this%n_design) => sensitivity%x(i, :)
841
842 call copy(row, this%constraint_list(i)%constraint%sensitivity%x, &
843 this%n_design)
844 end do
845
846 call sensitivity%copy_from(host_to_device, sync = .true.)
847
848 end subroutine problem_get_constraint_sensitivities
849
850 ! ========================================================================== !
851 ! Simple getters
852
854 pure function problem_get_num_objectives(this) result(n)
855 class(problem_t), intent(in) :: this
856 integer :: n
857
858 n = this%n_objectives
859 end function problem_get_num_objectives
860
862 pure function problem_get_num_constraints(this) result(n)
863 class(problem_t), intent(in) :: this
864 integer :: n
865
866 n = this%n_constraints
867 end function problem_get_num_constraints
868
870 function problem_get_log_header(this) result(buff)
871 class(problem_t), intent(in) :: this
872 character(len=1024) :: buff
873 character(len=50) :: mini_buff
874 integer :: i
875
876 ! When it comes to multi-objective optimization
877 ! (handled in the way that we do) we want to know the value of each
878 ! objective individually, not just the combined effect.
879 !
880 ! my vision is:
881 !
882 ! | Total F | F_1 | F_2 | ... | F_n | C_1 | C_2 | ... | C_m |
883 !
884 ! And then if we also want things like this iteration or KKT they can be
885 ! appended to the beginning or end of this by the optimizer.
886 !
887 ! iter | Total F | F_1 | F_2 | ... | F_n | C_1 | C_2 | ... | C_m | KKT
888 buff = "Total objective function"
889 do i = 1, this%get_n_objectives()
890 mini_buff = ""
891 write(mini_buff, '(", ", A)') this%objective_list(i)%objective%name
892 buff = trim(buff) // trim(mini_buff)
893 end do
894
895 do i = 1, this%get_n_constraints()
896 mini_buff = ""
897 write(mini_buff, '(", ", A)') &
898 this%constraint_list(i)%constraint%name
899 buff = trim(buff) // trim(mini_buff)
900 end do
901
902 end function problem_get_log_header
903end module problem
Factory function Allocates and initializes an constraint function object.
Factory function Allocates and initializes an objective function object.
Definition objective.f90:83
Implements the augmented_lagrangian_objective_t type.
Implements the constraint_t type.
Implements the design_t.
Definition design.f90:36
Implements the objective_t type.
Definition objective.f90:36
Module for handling the optimization problem.
Definition problem.f90:41
subroutine problem_init(this, parameters, design, simulation)
The constructor for the base problem.
Definition problem.f90:208
Adjoint simulation driver.
subroutine, public simulation_adjoint_init(c, dt_controller)
Initialise a simulation_adjoint of a case.
subroutine, public simulation_adjoint_step(c, dt_controller, cfl, tstep_loop_start_time, final_time)
Compute a single time-step of an adjoint case.
subroutine, public simulation_adjoint_finalize(c)
Finalize a simulation of a case.
Implements the steady_problem_t type.
An objective function implementing our augmented lagrangian sensitivity contribution.
The abstract constraint type.
Wrapper for constraints for use in lists.
An abstract design type.
Definition design.f90:54
The abstract objective type.
Definition objective.f90:52
Wrapper for objectives for use in lists.
Definition objective.f90:68
The abstract problem type.
Definition problem.f90:67