35submodule(optimizer) optimizer_factory_mod
36 use json_utils,
only: json_get
37 use utils,
only: neko_type_error
44 character(len=25),
parameter :: KNOWN_TYPES(1) = [ character(len=25) :: &
61 module subroutine optimizer_factory(object, parameters,
problem,
design, &
63 class(optimizer_t),
allocatable,
intent(inout) :: object
64 type(json_file),
intent(inout) :: parameters
65 class(problem_t),
intent(inout) :: problem
66 class(design_t),
intent(in) :: design
67 type(simulation_t),
optional,
intent(in) :: simulation
69 character(len=:),
allocatable :: type
71 if (
allocated(object))
then
77 call json_get(parameters,
"optimization.solver.type", type)
80 select case (trim(type))
84 call neko_type_error(
"Optimizer",
type, KNOWN_TYPES)
87 call object%init_from_json(parameters,
problem,
design, simulation)
89 end subroutine optimizer_factory
92end submodule optimizer_factory_mod
Module for handling the optimization problem.