8 use json_module,
only: json_file
12 use num_types,
only: rp
13 use csv_file,
only: csv_file_t
22 integer,
public :: max_iterations
24 real(kind=rp),
public :: tolerance
26 type(csv_file_t),
public :: logger
33 procedure(optimizer_run), pass(this),
public,
deferred :: run
35 procedure(optimizer_free), pass(this),
public,
deferred :: free
38 procedure, pass(this) :: init_base => optimizer_init_base
49 max_iterations, tolerance, simulation)
51 class(optimizer_t),
intent(inout) :: this
52 type(json_file),
intent(inout) :: parameters
53 class(problem_t),
intent(in) :: problem
54 class(design_t),
intent(in) :: design
55 integer,
intent(in) :: max_iterations
56 real(kind=rp),
intent(in) :: tolerance
57 type(simulation_t),
optional,
intent(in) :: simulation
61 subroutine optimizer_run(this, problem, design, simulation)
63 class(optimizer_t),
intent(inout) :: this
64 class(problem_t),
intent(inout) :: problem
65 class(design_t),
intent(inout) :: design
66 type(simulation_t),
optional,
intent(inout) :: simulation
67 end subroutine optimizer_run
70 subroutine optimizer_free(this)
72 class(optimizer_t),
intent(inout) :: this
73 end subroutine optimizer_free
86 module subroutine optimizer_factory(object, parameters,
problem,
design, &
88 class(optimizer_t),
allocatable,
intent(inout) :: object
89 type(json_file),
intent(inout) :: parameters
90 class(problem_t),
intent(in) :: problem
91 class(design_t),
intent(in) :: design
92 class(simulation_t),
optional,
intent(in) :: simulation
93 end subroutine optimizer_factory
94 end interface optimizer_factory
96 public :: optimizer_t, optimizer_factory
104 subroutine optimizer_init_base(this, max_iterations, tolerance)
105 class(optimizer_t),
intent(inout) :: this
106 integer,
intent(in) :: max_iterations
107 real(kind=rp),
intent(in) :: tolerance
109 this%max_iterations = max_iterations
110 this%tolerance = tolerance
112 end subroutine optimizer_init_base
Factory function for the optimizer.
Interface for optimizer initialization.
Module for handling the optimization problem.
Implements the steady_problem_t type.
Abstract optimizer class.
The abstract problem type.