36 use neko,
only: neko_init, neko_finalize, neko_job_info
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
47 use user,
only: user_setup
54 character(len=256) :: parameter_file
55 type(json_file) :: parameters, design_parameters
60 type(simulation_t) :: sim
62 class(design_t),
allocatable :: des
64 type(problem_t) :: prob
66 class(optimizer_t),
allocatable :: opt
71 call date_and_time(time = time, date = date)
73 call neko_job_info(date, time)
79 argc = command_argument_count()
80 if (argc .lt. 1)
call neko_error(
'Missing parameter file')
81 call get_command_argument(1, parameter_file)
84 parameters = json_read_file(trim(parameter_file))
85 call json_get(parameters,
'optimization.design', design_parameters)
91 call nekotop_continuation%init(parameters)
94 call user_setup(sim%neko_case%user)
97 call sim%init(parameters)
103 call prob%init(parameters, des, sim)
111 call opt%run(prob, des, sim)
120 call nekotop_continuation%free()
122 if (
allocated(des))
deallocate(des)
123 if (
allocated(opt))
deallocate(opt)
128end program topopt_user
Factory function for the design object.
Factory function for the optimizer.
Continuation scheduler for the optimization loop.
subroutine neko_top_register_types()
Add all known types to the Neko registries.
Defines the abstract type optimizer.
Module for handling the optimization problem.
Implements the steady_problem_t type.
Abstract optimizer class.
The abstract problem type.