37 use,
intrinsic :: iso_c_binding
43 kim_model_compute_arguments_create_handle_type, &
49 kim_set_argument_support_status, &
50 kim_set_callback_support_status, &
51 kim_set_model_buffer_pointer, &
61 type, bind(c) :: kim_model_compute_arguments_create_handle_type
62 type(c_ptr) :: p = c_null_ptr
63 end type kim_model_compute_arguments_create_handle_type
68 type(kim_model_compute_arguments_create_handle_type),
protected,
save &
75 interface operator(.eq.)
76 module procedure kim_model_compute_arguments_create_handle_equal
77 end interface operator(.eq.)
83 interface operator(.ne.)
84 module procedure kim_model_compute_arguments_create_handle_not_equal
85 end interface operator(.ne.)
94 interface kim_set_argument_support_status
96 kim_model_compute_arguments_create_set_argument_support_status
97 end interface kim_set_argument_support_status
106 interface kim_set_callback_support_status
109 end interface kim_set_callback_support_status
117 interface kim_set_model_buffer_pointer
119 end interface kim_set_model_buffer_pointer
127 interface kim_log_entry
129 end interface kim_log_entry
137 interface kim_to_string
139 end interface kim_to_string
146 logical recursive function kim_model_compute_arguments_create_handle_equal( &
149 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: lhs
150 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: rhs
152 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then 153 kim_model_compute_arguments_create_handle_equal = .true.
155 kim_model_compute_arguments_create_handle_equal = c_associated(lhs%p, &
158 end function kim_model_compute_arguments_create_handle_equal
164 logical recursive function &
165 kim_model_compute_arguments_create_handle_not_equal(lhs, rhs)
167 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: lhs
168 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: rhs
170 kim_model_compute_arguments_create_handle_not_equal = &
172 end function kim_model_compute_arguments_create_handle_not_equal
181 recursive subroutine &
182 kim_model_compute_arguments_create_set_argument_support_status( &
183 model_commpute_arguments_create_handle, compute_argument_name, &
184 support_status, ierr)
187 use kim_interoperable_types_module
, only: &
188 kim_model_compute_arguments_create_type
191 integer(c_int) recursive function set_argument_support_status( &
192 model_commpute_arguments_create, compute_argument_name, &
194 bind(c, name=
"KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus")
195 use,
intrinsic :: iso_c_binding
197 kim_compute_argument_name_type
199 use kim_interoperable_types_module
, only: &
200 kim_model_compute_arguments_create_type
202 type(kim_model_compute_arguments_create_type),
intent(in) :: &
203 model_commpute_arguments_create
204 type(kim_compute_argument_name_type),
intent(in),
value :: &
205 compute_argument_name
206 type(kim_support_status_type),
intent(in),
value :: support_status
207 end function set_argument_support_status
209 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
210 model_commpute_arguments_create_handle
211 type(kim_compute_argument_name_type),
intent(in) :: &
212 compute_argument_name
213 type(kim_support_status_type),
intent(in) :: support_status
214 integer(c_int),
intent(out) :: ierr
215 type(kim_model_compute_arguments_create_type),
pointer :: &
216 model_commpute_arguments_create
218 call c_f_pointer(model_commpute_arguments_create_handle%p, &
219 model_commpute_arguments_create)
220 ierr = set_argument_support_status(model_commpute_arguments_create, &
221 compute_argument_name, support_status)
222 end subroutine kim_model_compute_arguments_create_set_argument_support_status
231 recursive subroutine &
233 model_commpute_arguments_create_handle, compute_callback_name, &
234 support_status, ierr)
237 use kim_interoperable_types_module
, only: &
238 kim_model_compute_arguments_create_type
241 integer(c_int) recursive function set_callback_support_status( &
242 model_commpute_arguments_create, compute_callback_name, &
244 bind(c, name=
"KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus")
245 use,
intrinsic :: iso_c_binding
247 kim_compute_callback_name_type
249 use kim_interoperable_types_module
, only: &
250 kim_model_compute_arguments_create_type
252 type(kim_model_compute_arguments_create_type),
intent(in) :: &
253 model_commpute_arguments_create
254 type(kim_compute_callback_name_type),
intent(in),
value :: &
255 compute_callback_name
256 type(kim_support_status_type),
intent(in),
value :: support_status
257 end function set_callback_support_status
259 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
260 model_commpute_arguments_create_handle
261 type(kim_compute_callback_name_type),
intent(in) :: &
262 compute_callback_name
263 type(kim_support_status_type),
intent(in) :: support_status
264 integer(c_int),
intent(out) :: ierr
265 type(kim_model_compute_arguments_create_type),
pointer :: &
266 model_commpute_arguments_create
268 call c_f_pointer(model_commpute_arguments_create_handle%p, &
269 model_commpute_arguments_create)
270 ierr = set_callback_support_status(model_commpute_arguments_create, &
271 compute_callback_name, support_status)
280 recursive subroutine &
282 model_commpute_arguments_create_handle, ptr)
283 use kim_interoperable_types_module
, only: &
284 kim_model_compute_arguments_create_type
287 recursive subroutine set_model_buffer_pointer( &
288 model_commpute_arguments_create, ptr) &
289 bind(c, name=
"KIM_ModelComputeArgumentsCreate_SetModelBufferPointer")
290 use,
intrinsic :: iso_c_binding
291 use kim_interoperable_types_module
, only: &
292 kim_model_compute_arguments_create_type
294 type(kim_model_compute_arguments_create_type),
intent(in) :: &
295 model_commpute_arguments_create
296 type(c_ptr),
intent(in),
value :: ptr
297 end subroutine set_model_buffer_pointer
299 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
300 model_commpute_arguments_create_handle
301 type(c_ptr),
intent(in) :: ptr
302 type(kim_model_compute_arguments_create_type),
pointer :: &
303 model_commpute_arguments_create
305 call c_f_pointer(model_commpute_arguments_create_handle%p, &
306 model_commpute_arguments_create)
307 call set_model_buffer_pointer(model_commpute_arguments_create, ptr)
317 model_commpute_arguments_create_handle, log_verbosity, message)
319 use kim_interoperable_types_module
, only: &
320 kim_model_compute_arguments_create_type
323 recursive subroutine log_entry( &
324 model_commpute_arguments_create, log_verbosity, message, line_number, &
325 file_name) bind(c, name="KIM_ModelComputeArgumentsCreate_LogEntry")
326 use,
intrinsic :: iso_c_binding
328 use kim_interoperable_types_module
, only: &
329 kim_model_compute_arguments_create_type
331 type(kim_model_compute_arguments_create_type),
intent(in) :: &
332 model_commpute_arguments_create
333 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
334 character(c_char),
intent(in) :: message(*)
335 integer(c_int),
intent(in),
value :: line_number
336 character(c_char),
intent(in) :: file_name(*)
337 end subroutine log_entry
339 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
340 model_commpute_arguments_create_handle
341 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
342 character(len=*, kind=c_char),
intent(in) :: message
343 type(kim_model_compute_arguments_create_type),
pointer :: &
344 model_commpute_arguments_create
346 call c_f_pointer(model_commpute_arguments_create_handle%p, &
347 model_commpute_arguments_create)
348 call log_entry(model_commpute_arguments_create, log_verbosity, &
349 trim(message)//c_null_char, 0,
""//c_null_char)
359 model_commpute_arguments_create_handle, string)
360 use kim_convert_string_module
, only: kim_convert_c_char_ptr_to_string
361 use kim_interoperable_types_module
, only: &
362 kim_model_compute_arguments_create_type
365 type(c_ptr)
recursive function model_commpute_arguments_create_string( &
366 model_commpute_arguments_create) &
367 bind(c, name=
"KIM_ModelComputeArgumentsCreate_ToString")
368 use,
intrinsic :: iso_c_binding
369 use kim_interoperable_types_module
, only: &
370 kim_model_compute_arguments_create_type
372 type(kim_model_compute_arguments_create_type),
intent(in) :: &
373 model_commpute_arguments_create
374 end function model_commpute_arguments_create_string
376 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
377 model_commpute_arguments_create_handle
378 character(len=*, kind=c_char),
intent(out) :: string
379 type(kim_model_compute_arguments_create_type),
pointer :: &
380 model_commpute_arguments_create
384 call c_f_pointer(model_commpute_arguments_create_handle%p, &
385 model_commpute_arguments_create)
386 p = model_commpute_arguments_create_string(model_commpute_arguments_create)
387 call kim_convert_c_char_ptr_to_string(p, string)
type(kim_model_compute_arguments_create_handle_type), save, public, protected kim_model_compute_arguments_create_null_handle
NULL handle for use in comparisons.
recursive subroutine kim_model_compute_arguments_create_to_string(model_commpute_arguments_create_handle, string)
Get a string representing the internal state of the ComputeArguments object.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
recursive subroutine kim_model_compute_arguments_create_set_callback_support_status(model_commpute_arguments_create_handle, compute_callback_name, support_status, ierr)
Set the SupportStatus of a ComputeCallbackName.
An Extensible Enumeration for the SupportStatus's supported by the KIM API.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API. ...
recursive subroutine kim_model_compute_arguments_create_set_model_buffer_pointer(model_commpute_arguments_create_handle, ptr)
Set the Model's buffer pointer within the ComputeArguments object.
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API. ...
recursive subroutine kim_model_compute_arguments_create_log_entry(model_commpute_arguments_create_handle, log_verbosity, message)
Write a log entry into the log file.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.