36 use json_utils,
only: json_get
37 use utils,
only: neko_type_error
45 character(len=25),
parameter :: KNOWN_TYPES(2) = [ character(len=25) :: &
63 module subroutine optimizer_factory(object, parameters,
problem,
design, &
65 class(optimizer_t),
allocatable,
intent(inout) :: object
66 type(json_file),
intent(inout) :: parameters
67 class(problem_t),
intent(inout) :: problem
68 class(design_t),
intent(in) :: design
69 type(simulation_t),
optional,
intent(in) :: simulation
71 character(len=:),
allocatable :: type
73 if (
allocated(object))
then
79 call json_get(parameters,
"optimization.solver.type", type)
82 select case (trim(type))
85 case (
"steepest_descent")
88 call neko_type_error(
"Optimizer",
type, KNOWN_TYPES)
91 call object%init_from_json(parameters,
problem,
design, simulation)
93 end subroutine optimizer_factory
96end submodule optimizer_factory_mod
Defines the abstract type optimizer.
Module for handling the optimization problem.
Steepest descent optimizer with move limits.
Steepest descent optimizer with move limits.