35 use json_utils,
only: json_get
36 use utils,
only: neko_type_error
44 character(len=25),
parameter :: KNOWN_TYPES(1) = [ character(len=25) :: &
58 module subroutine constraint_factory(object, json,
design, simulation)
59 class(constraint_t),
allocatable,
intent(inout) :: object
60 type(json_file),
intent(inout) :: json
61 class(design_t),
intent(in) :: design
62 type(simulation_t),
target,
optional,
intent(inout) :: simulation
63 character(len=:),
allocatable :: type
65 if (
allocated(object))
then
70 call json_get(json,
"type", type)
71 select case (trim(type))
75 call neko_type_error(
"Constraint",
type, KNOWN_TYPES)
78 call object%init(json,
design, simulation)
79 end subroutine constraint_factory
81end submodule constraint_factory_mod
Implements the constraint_t type.
Implements the volume_constraint_t type.
A constraint on the volume of the design.