5 use json_module,
only: json_file
6 use utils,
only: neko_error
7 use json_utils_ext,
only: json_read_file
8 use user,
only: user_setup
10 use neko_top,
only: neko_top_register_types
12 use mpi_f08,
only: mpi_init
18 type(json_file) :: parameters
19 character(len=256) :: parameter_file
25 type(simulation_t) :: sim
27 type(problem_t) :: prob
29 class(design_t),
allocatable :: des
31 class(optimizer_t),
allocatable :: opt
36 call neko_top_register_types()
41 argc = command_argument_count()
42 if (argc .lt. 1)
call neko_error(
'Missing parameter file')
43 call get_command_argument(1, parameter_file)
46 parameters = json_read_file(trim(parameter_file))
52 call user_setup(sim%neko_case%user)
55 call sim%init(parameters)
61 call prob%init(parameters, des, sim)
69 call opt%run(prob, des, sim)
75 if (
allocated(opt))
deallocate(opt)
81end program topopt_user
Factory function for the design object.
Factory function for the optimizer.
Module for handling the optimization problem.
Implements the steady_problem_t type.
Abstract optimizer class.
The abstract problem type.