41 use,
intrinsic :: iso_c_binding
47 kim_model_compute_arguments_create_handle_type, &
55 kim_set_argument_support_status, &
56 kim_set_callback_support_status, &
57 kim_set_model_buffer_pointer, &
68 type, bind(c) :: kim_model_compute_arguments_create_handle_type
69 type(c_ptr) :: p = c_null_ptr
70 end type kim_model_compute_arguments_create_handle_type
75 type(kim_model_compute_arguments_create_handle_type),
protected,
save &
82 interface operator (.eq.)
83 module procedure kim_model_compute_arguments_create_handle_equal
84 end interface operator (.eq.)
90 interface operator (.ne.)
91 module procedure kim_model_compute_arguments_create_handle_not_equal
92 end interface operator (.ne.)
101 interface kim_set_argument_support_status
103 kim_model_compute_arguments_create_set_argument_support_status
104 end interface kim_set_argument_support_status
113 interface kim_set_callback_support_status
116 end interface kim_set_callback_support_status
124 interface kim_set_model_buffer_pointer
126 end interface kim_set_model_buffer_pointer
134 interface kim_log_entry
136 end interface kim_log_entry
144 interface kim_to_string
146 end interface kim_to_string
153 logical recursive function kim_model_compute_arguments_create_handle_equal( &
156 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: lhs
157 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: rhs
159 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then 160 kim_model_compute_arguments_create_handle_equal = .true.
162 kim_model_compute_arguments_create_handle_equal = c_associated(lhs%p, &
165 end function kim_model_compute_arguments_create_handle_equal
171 logical recursive function &
172 kim_model_compute_arguments_create_handle_not_equal(lhs, rhs)
174 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: lhs
175 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: rhs
177 kim_model_compute_arguments_create_handle_not_equal = &
179 end function kim_model_compute_arguments_create_handle_not_equal
188 recursive subroutine &
189 kim_model_compute_arguments_create_set_argument_support_status( &
190 model_commpute_arguments_create_handle, compute_argument_name, &
191 support_status, ierr)
194 use kim_interoperable_types_module
, only : &
195 kim_model_compute_arguments_create_type
198 integer(c_int) recursive function set_argument_support_status( &
199 model_commpute_arguments_create, compute_argument_name, &
201 bind(c, name=
"KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus")
202 use,
intrinsic :: iso_c_binding
204 kim_compute_argument_name_type
206 use kim_interoperable_types_module
, only : &
207 kim_model_compute_arguments_create_type
209 type(kim_model_compute_arguments_create_type),
intent(in) :: &
210 model_commpute_arguments_create
211 type(kim_compute_argument_name_type),
intent(in),
value :: &
212 compute_argument_name
213 type(kim_support_status_type),
intent(in),
value :: support_status
214 end function set_argument_support_status
216 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
217 model_commpute_arguments_create_handle
218 type(kim_compute_argument_name_type),
intent(in) :: &
219 compute_argument_name
220 type(kim_support_status_type),
intent(in) :: support_status
221 integer(c_int),
intent(out) :: ierr
222 type(kim_model_compute_arguments_create_type),
pointer :: &
223 model_commpute_arguments_create
225 call c_f_pointer(model_commpute_arguments_create_handle%p, &
226 model_commpute_arguments_create)
227 ierr = set_argument_support_status(model_commpute_arguments_create, &
228 compute_argument_name, support_status)
229 end subroutine kim_model_compute_arguments_create_set_argument_support_status
238 recursive subroutine &
240 model_commpute_arguments_create_handle, compute_callback_name, &
241 support_status, ierr)
244 use kim_interoperable_types_module
, only : &
245 kim_model_compute_arguments_create_type
248 integer(c_int) recursive function set_callback_support_status( &
249 model_commpute_arguments_create, compute_callback_name, &
251 bind(c, name=
"KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus")
252 use,
intrinsic :: iso_c_binding
254 kim_compute_callback_name_type
256 use kim_interoperable_types_module
, only : &
257 kim_model_compute_arguments_create_type
259 type(kim_model_compute_arguments_create_type),
intent(in) :: &
260 model_commpute_arguments_create
261 type(kim_compute_callback_name_type),
intent(in),
value :: &
262 compute_callback_name
263 type(kim_support_status_type),
intent(in),
value :: support_status
264 end function set_callback_support_status
266 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
267 model_commpute_arguments_create_handle
268 type(kim_compute_callback_name_type),
intent(in) :: &
269 compute_callback_name
270 type(kim_support_status_type),
intent(in) :: support_status
271 integer(c_int),
intent(out) :: ierr
272 type(kim_model_compute_arguments_create_type),
pointer :: &
273 model_commpute_arguments_create
275 call c_f_pointer(model_commpute_arguments_create_handle%p, &
276 model_commpute_arguments_create)
277 ierr = set_callback_support_status(model_commpute_arguments_create, &
278 compute_callback_name, support_status)
287 recursive subroutine &
289 model_commpute_arguments_create_handle, ptr)
290 use kim_interoperable_types_module
, only : &
291 kim_model_compute_arguments_create_type
294 recursive subroutine set_model_buffer_pointer( &
295 model_commpute_arguments_create, ptr) bind(c, &
296 name="KIM_ModelComputeArgumentsCreate_SetModelBufferPointer")
297 use,
intrinsic :: iso_c_binding
298 use kim_interoperable_types_module
, only : &
299 kim_model_compute_arguments_create_type
301 type(kim_model_compute_arguments_create_type),
intent(in) :: &
302 model_commpute_arguments_create
303 type(c_ptr),
intent(in),
value :: ptr
304 end subroutine set_model_buffer_pointer
306 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
307 model_commpute_arguments_create_handle
308 type(c_ptr),
intent(in) :: ptr
309 type(kim_model_compute_arguments_create_type),
pointer :: &
310 model_commpute_arguments_create
312 call c_f_pointer(model_commpute_arguments_create_handle%p, &
313 model_commpute_arguments_create)
314 call set_model_buffer_pointer(model_commpute_arguments_create, ptr)
324 model_commpute_arguments_create_handle, log_verbosity, message)
326 use kim_interoperable_types_module
, only : &
327 kim_model_compute_arguments_create_type
330 recursive subroutine log_entry(model_commpute_arguments_create, &
331 log_verbosity, message, line_number, file_name) &
332 bind(c, name=
"KIM_ModelComputeArgumentsCreate_LogEntry")
333 use,
intrinsic :: iso_c_binding
335 use kim_interoperable_types_module
, only : &
336 kim_model_compute_arguments_create_type
338 type(kim_model_compute_arguments_create_type),
intent(in) :: &
339 model_commpute_arguments_create
340 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
341 character(c_char),
intent(in) :: message(*)
342 integer(c_int),
intent(in),
value :: line_number
343 character(c_char),
intent(in) :: file_name(*)
344 end subroutine log_entry
346 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
347 model_commpute_arguments_create_handle
348 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
349 character(len=*, kind=c_char),
intent(in) :: message
350 type(kim_model_compute_arguments_create_type),
pointer :: &
351 model_commpute_arguments_create
353 call c_f_pointer(model_commpute_arguments_create_handle%p, &
354 model_commpute_arguments_create)
355 call log_entry(model_commpute_arguments_create, log_verbosity, &
356 trim(message)//c_null_char, 0,
""//c_null_char)
366 model_commpute_arguments_create_handle, string)
367 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
368 use kim_interoperable_types_module
, only : &
369 kim_model_compute_arguments_create_type
372 type(c_ptr)
recursive function model_commpute_arguments_create_string( &
373 model_commpute_arguments_create) &
374 bind(c, name=
"KIM_ModelComputeArgumentsCreate_ToString")
375 use,
intrinsic :: iso_c_binding
376 use kim_interoperable_types_module
, only : &
377 kim_model_compute_arguments_create_type
379 type(kim_model_compute_arguments_create_type),
intent(in) :: &
380 model_commpute_arguments_create
381 end function model_commpute_arguments_create_string
383 type(kim_model_compute_arguments_create_handle_type),
intent(in) :: &
384 model_commpute_arguments_create_handle
385 character(len=*, kind=c_char),
intent(out) :: string
386 type(kim_model_compute_arguments_create_type),
pointer :: &
387 model_commpute_arguments_create
391 call c_f_pointer(model_commpute_arguments_create_handle%p, &
392 model_commpute_arguments_create)
393 p = model_commpute_arguments_create_string(model_commpute_arguments_create)
394 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.