36submodule(
design) design_factory_mod
37 use json_utils,
only: json_get
38 use utils,
only: neko_type_error
47 character(len=25),
parameter :: KNOWN_TYPES(2) = [ character(len=25) :: &
62 module subroutine design_factory(object, parameters, simulation)
63 class(design_t),
allocatable,
intent(inout) :: object
64 type(json_file),
intent(inout) :: parameters
65 type(simulation_t),
intent(inout),
optional :: simulation
66 character(len=:),
allocatable :: type
68 if (
allocated(object))
then
73 call json_get(parameters,
"type", type)
74 select case (trim(type))
81 call neko_type_error(
"design",
type, KNOWN_TYPES)
84 if (
present(simulation))
then
85 call object%init_from_json_sim(parameters, simulation)
87 call object%init_from_json(parameters)
89 end subroutine design_factory
91end submodule design_factory_mod
A topology optimization design variable.
A topology optimization design variable.