36 use neko,
only: neko_init, neko_finalize
42 use json_module,
only: json_file
43 use json_utils,
only: json_get
44 use utils,
only: neko_error
45 use json_utils_ext,
only: json_read_file
52 character(len=256) :: parameter_file
53 type(json_file) :: parameters, design_parameters
56 type(simulation_t) :: sim
58 class(design_t),
allocatable :: des
60 type(problem_t) :: prob
62 class(optimizer_t),
allocatable :: opt
73 argc = command_argument_count()
74 if (argc .lt. 1)
call neko_error(
'Missing parameter file')
75 call get_command_argument(1, parameter_file)
78 parameters = json_read_file(trim(parameter_file))
79 call json_get(parameters,
'optimization.design', design_parameters)
85 call sim%init(parameters)
91 call prob%init(parameters, des, sim)
99 call opt%run(prob, des, sim)
109 if (
allocated(des))
deallocate(des)
110 if (
allocated(opt))
deallocate(opt)
Factory function for the design object.
Factory function for the optimizer.
subroutine neko_top_register_types()
Add all known types to the Neko registries.
Defines the abstract type optimizer The optimizer type is defined to provide a generic interface to u...
Module for handling the optimization problem.
Implements the steady_problem_t type.
Abstract optimizer class.
The abstract problem type.