3submodule(optimizer) optimizer_factory_mod
4 use json_utils,
only: json_get
5 use utils,
only: neko_type_error
12 character(len=25),
parameter :: KNOWN_TYPES(1) = [ character(len=25) :: &
29 module subroutine optimizer_factory(object, parameters,
problem,
design, &
31 class(optimizer_t),
allocatable,
intent(inout) :: object
32 type(json_file),
intent(inout) :: parameters
33 class(problem_t),
intent(inout) :: problem
34 class(design_t),
intent(in) :: design
35 type(simulation_t),
optional,
intent(in) :: simulation
37 character(len=:),
allocatable :: type
39 if (
allocated(object))
then
45 call json_get(parameters,
"optimization.solver.type", type)
48 select case (trim(type))
52 call neko_type_error(
"Optimizer",
type, KNOWN_TYPES)
55 call object%init_from_json(parameters,
problem,
design, simulation)
57 end subroutine optimizer_factory
60end submodule optimizer_factory_mod
Module for handling the optimization problem.