40 use json_module,
only: json_file
44 use num_types,
only: rp
45 use vector_math,
only: vector_add2, vector_cmult
55 procedure,
public, pass(this) :: init_json => &
58 procedure,
public, pass(this) :: init_from_attributes => &
59 dummy_constraint_init_attributes
61 procedure,
public, pass(this) :: free => dummy_constraint_free
63 procedure,
public, pass(this) :: update_value => &
64 dummy_constraint_update_value
66 procedure,
public, pass(this) :: update_sensitivity => &
67 dummy_constraint_update_sensitivity
69 procedure,
public, pass(this) :: get_log_size => &
70 dummy_constraint_get_log_size
72 procedure,
public, pass(this) :: get_log_headers => &
73 dummy_constraint_get_log_headers
75 procedure,
public, pass(this) :: get_log_values => &
76 dummy_constraint_get_log_values
84 type(json_file),
intent(inout) :: json
85 class(
design_t),
intent(in) :: design
86 call this%init_from_attributes(
design)
90 subroutine dummy_constraint_init_attributes(this, design)
92 class(
design_t),
intent(in) :: design
95 call this%init_base(
"dummy_constraint",
design%size())
105 this%sensitivity = 0.0_rp
107 end subroutine dummy_constraint_init_attributes
110 subroutine dummy_constraint_free(this)
113 call this%free_base()
114 end subroutine dummy_constraint_free
117 subroutine dummy_constraint_update_value(this, design)
119 class(
design_t),
intent(in) :: design
120 end subroutine dummy_constraint_update_value
123 subroutine dummy_constraint_update_sensitivity(this, design)
125 class(
design_t),
intent(in) :: design
126 end subroutine dummy_constraint_update_sensitivity
131 function dummy_constraint_get_log_size(this)
result(n)
136 end function dummy_constraint_get_log_size
141 subroutine dummy_constraint_get_log_headers(this, headers)
143 character(len=*),
intent(out) :: headers(:)
145 if (
size(headers) .eq. 0)
return
147 end subroutine dummy_constraint_get_log_headers
152 subroutine dummy_constraint_get_log_values(this, values)
154 real(kind=rp),
intent(out) :: values(:)
156 if (
size(values) .eq. 0)
return
158 end subroutine dummy_constraint_get_log_values
Implements the constraint_t type.
Implements the dummy_constraint_t type.
subroutine dummy_constraint_init_json(this, json, design)
The common constructor using a JSON object.
The abstract constraint type.