36 use json_module,
only: json_file
37 use json_utils,
only: json_get
38 use num_types,
only: rp
39 use point_zone,
only: point_zone_t
41 use vector,
only: vector_t
42 use utils,
only: neko_error
59 real(kind=rp) ::
value
61 type(vector_t) :: sensitivity
63 character(len=25) :: name
67 class(point_zone_t),
pointer :: mask => null()
74 generic :: init => init_json, init_json_sim
77 procedure, pass(this) :: init_json => functional_init_json
79 procedure, pass(this) :: init_json_sim => functional_init_json_sim
84 procedure(functional_update_value), pass(this),
deferred :: update_value
86 procedure(functional_update_sensitivity), pass(this),
deferred :: &
99 class(base_functional_t),
intent(inout) :: this
103 subroutine functional_update_value(this, design)
105 class(base_functional_t),
intent(inout) :: this
106 class(design_t),
intent(in) :: design
107 end subroutine functional_update_value
110 subroutine functional_update_sensitivity(this, design)
112 class(base_functional_t),
intent(inout) :: this
113 class(design_t),
intent(in) :: design
114 end subroutine functional_update_sensitivity
121 subroutine functional_init_json(this, json, design)
122 class(base_functional_t),
intent(inout) :: this
123 type(json_file),
intent(inout) :: json
124 class(design_t),
intent(in) :: design
125 character(len=:),
allocatable :: type
127 call json_get(json,
'type', type)
128 call neko_error(
"Functional type: '" //
type // &
129 "' does not support initialization without simulation")
130 end subroutine functional_init_json
133 subroutine functional_init_json_sim(this, json, design, simulation)
134 class(base_functional_t),
intent(inout) :: this
135 type(json_file),
intent(inout) :: json
136 class(design_t),
intent(in) :: design
137 type(simulation_t),
target,
intent(inout) :: simulation
138 character(len=:),
allocatable :: type
140 call json_get(json,
'type', type)
141 call neko_error(
"Functional type: '" //
type // &
142 "' does not support initialization with simulation")
143 end subroutine functional_init_json_sim
Defines the abstract the base_functional_t type.
Implements the steady_problem_t type.
The base functional type.