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(optimizer_validate), pass(this),
public,
deferred :: validate
41 procedure, pass(this) :: init_base => optimizer_init_base
54 class(optimizer_t),
intent(inout) :: this
55 type(json_file),
intent(inout) :: parameters
56 class(problem_t),
intent(in) :: problem
57 class(design_t),
intent(in) :: design
58 type(simulation_t),
optional,
intent(in) :: simulation
62 subroutine optimizer_run(this, problem, design, simulation)
64 class(optimizer_t),
intent(inout) :: this
65 class(problem_t),
intent(inout) :: problem
66 class(design_t),
intent(inout) :: design
67 type(simulation_t),
optional,
intent(inout) :: simulation
68 end subroutine optimizer_run
71 subroutine optimizer_free(this)
73 class(optimizer_t),
intent(inout) :: this
74 end subroutine optimizer_free
77 subroutine optimizer_validate(this, problem, design)
79 class(optimizer_t),
intent(inout) :: this
80 class(problem_t),
intent(in) :: problem
81 class(design_t),
intent(in) :: design
82 end subroutine optimizer_validate
95 module subroutine optimizer_factory(object, parameters,
problem,
design, &
97 class(optimizer_t),
allocatable,
intent(inout) :: object
98 type(json_file),
intent(inout) :: parameters
99 class(problem_t),
intent(inout) :: problem
100 class(design_t),
intent(in) :: design
101 type(simulation_t),
optional,
intent(in) :: simulation
102 end subroutine optimizer_factory
103 end interface optimizer_factory
105 public :: optimizer_t, optimizer_factory
113 subroutine optimizer_init_base(this, max_iterations, tolerance)
114 class(optimizer_t),
intent(inout) :: this
115 integer,
intent(in) :: max_iterations
116 real(kind=rp),
intent(in) :: tolerance
118 this%max_iterations = max_iterations
119 this%tolerance = tolerance
121 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.