36 use,
intrinsic :: iso_c_binding
65 type,
bind(c) :: kim_compute_arguments_handle_type
66 type(c_ptr) :: p = c_null_ptr
78 interface operator(.eq.)
79 module procedure kim_compute_arguments_handle_equal
80 end interface operator(.eq.)
85 interface operator(.ne.)
86 module procedure kim_compute_arguments_handle_not_equal
87 end interface operator(.ne.)
96 module procedure kim_compute_arguments_get_argument_support_status
208 logical recursive function kim_compute_arguments_handle_equal(lhs, rhs)
210 type(kim_compute_arguments_handle_type),
intent(in) :: lhs
211 type(kim_compute_arguments_handle_type),
intent(in) :: rhs
213 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then
214 kim_compute_arguments_handle_equal = .true.
216 kim_compute_arguments_handle_equal = c_associated(lhs%p, rhs%p)
218 end function kim_compute_arguments_handle_equal
223 logical recursive function kim_compute_arguments_handle_not_equal(lhs, rhs)
225 type(kim_compute_arguments_handle_type),
intent(in) :: lhs
226 type(kim_compute_arguments_handle_type),
intent(in) :: rhs
228 kim_compute_arguments_handle_not_equal = .not. (lhs == rhs)
229 end function kim_compute_arguments_handle_not_equal
237 recursive subroutine kim_compute_arguments_get_argument_support_status( &
238 compute_arguments_handle, compute_argument_name, &
239 support_status, ierr)
242 use kim_interoperable_types_module,
only: kim_compute_arguments_type
245 integer(c_int) recursive function get_argument_support_status( &
246 compute_arguments, compute_argument_name, support_status) &
247 bind(c, name="KIM_ComputeArguments_GetArgumentSupportStatus")
248 use,
intrinsic :: iso_c_binding
252 use kim_interoperable_types_module,
only: kim_compute_arguments_type
254 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
255 type(kim_compute_argument_name_type),
intent(in),
value :: &
256 compute_argument_name
257 type(kim_support_status_type),
intent(out) :: support_status
260 type(kim_compute_arguments_handle_type),
intent(in) :: &
261 compute_arguments_handle
262 type(kim_compute_argument_name_type),
intent(in) :: &
263 compute_argument_name
264 type(kim_support_status_type),
intent(out) :: support_status
265 integer(c_int),
intent(out) :: ierr
266 type(kim_compute_arguments_type),
pointer :: compute_arguments
268 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
270 compute_argument_name, support_status)
271 end subroutine kim_compute_arguments_get_argument_support_status
280 compute_arguments_handle, compute_callback_name, support_status, ierr)
283 use kim_interoperable_types_module,
only: kim_compute_arguments_type
286 integer(c_int) recursive function get_callback_support_status( &
287 compute_arguments, compute_callback_name, support_status) &
288 bind(c, name="KIM_ComputeArguments_GetCallbackSupportStatus")
289 use,
intrinsic :: iso_c_binding
293 use kim_interoperable_types_module,
only: kim_compute_arguments_type
295 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
296 type(kim_compute_callback_name_type),
intent(in),
value :: &
297 compute_callback_name
298 type(kim_support_status_type),
intent(out) :: support_status
301 type(kim_compute_arguments_handle_type),
intent(in) :: &
302 compute_arguments_handle
303 type(kim_compute_callback_name_type),
intent(in) :: &
304 compute_callback_name
305 type(kim_support_status_type),
intent(out) :: support_status
306 integer(c_int),
intent(out) :: ierr
307 type(kim_compute_arguments_type),
pointer :: compute_arguments
309 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
311 compute_callback_name, support_status)
321 compute_arguments_handle, compute_argument_name, int0, ierr)
323 use kim_interoperable_types_module,
only: kim_compute_arguments_type
326 integer(c_int) recursive function set_argument_pointer_integer( &
327 compute_arguments, compute_argument_name, ptr) &
328 bind(c, name="KIM_ComputeArguments_SetArgumentPointerInteger")
329 use,
intrinsic :: iso_c_binding
332 use kim_interoperable_types_module,
only: kim_compute_arguments_type
334 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
335 type(kim_compute_argument_name_type),
intent(in),
value :: &
336 compute_argument_name
337 type(c_ptr),
intent(in),
value :: ptr
340 type(kim_compute_arguments_handle_type),
intent(in) :: &
341 compute_arguments_handle
342 type(kim_compute_argument_name_type),
intent(in) :: &
343 compute_argument_name
344 integer(c_int),
intent(in),
target :: int0
345 integer(c_int),
intent(out) :: ierr
346 type(kim_compute_arguments_type),
pointer :: compute_arguments
348 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
350 compute_argument_name, c_loc(int0))
360 compute_arguments_handle, compute_argument_name, int1, ierr)
362 use kim_interoperable_types_module,
only: kim_compute_arguments_type
365 compute_arguments_handle
367 compute_argument_name
368 integer(c_int),
intent(in),
target :: int1(:)
369 integer(c_int),
intent(out) :: ierr
370 type(kim_compute_arguments_type),
pointer :: compute_arguments
372 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
373 call set(compute_arguments, compute_argument_name,
size(int1, 1, c_int), &
378 recursive subroutine set(compute_arguments, compute_argument_name, &
382 use kim_interoperable_types_module,
only: kim_compute_arguments_type
386 compute_arguments, compute_argument_name, ptr) &
387 bind(c, name="KIM_ComputeArguments_SetArgumentPointerInteger")
388 use,
intrinsic :: iso_c_binding
391 use kim_interoperable_types_module,
only: kim_compute_arguments_type
393 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
395 compute_argument_name
396 type(c_ptr),
intent(in),
value :: ptr
399 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
400 type(kim_compute_argument_name_type),
intent(in) :: &
401 compute_argument_name
402 integer(c_int),
intent(in) :: extent1
403 integer(c_int),
intent(in),
target :: int1(extent1)
404 integer(c_int),
intent(out) :: ierr
407 compute_argument_name, c_loc(int1))
418 compute_arguments_handle, compute_argument_name, int2, ierr)
420 use kim_interoperable_types_module,
only: kim_compute_arguments_type
423 compute_arguments_handle
425 compute_argument_name
426 integer(c_int),
intent(in),
target :: int2(:, :)
427 integer(c_int),
intent(out) :: ierr
428 type(kim_compute_arguments_type),
pointer :: compute_arguments
430 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
431 call set(compute_arguments, compute_argument_name,
size(int2, 1, c_int), &
432 size(int2, 2, c_int), int2, ierr)
436 recursive subroutine set(compute_arguments, compute_argument_name, &
437 extent1, extent2, int2, ierr)
440 use kim_interoperable_types_module,
only: kim_compute_arguments_type
444 compute_arguments, compute_argument_name, ptr) &
445 bind(c, name="KIM_ComputeArguments_SetArgumentPointerInteger")
446 use,
intrinsic :: iso_c_binding
449 use kim_interoperable_types_module,
only: kim_compute_arguments_type
451 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
453 compute_argument_name
454 type(c_ptr),
intent(in),
value :: ptr
457 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
458 type(kim_compute_argument_name_type),
intent(in) :: &
459 compute_argument_name
460 integer(c_int),
intent(in) :: extent1
461 integer(c_int),
intent(in) :: extent2
462 integer(c_int),
intent(in),
target :: int2(extent1, extent2)
463 integer(c_int),
intent(out) :: ierr
466 compute_argument_name, c_loc(int2))
477 compute_arguments_handle, compute_argument_name, double0, ierr)
479 use kim_interoperable_types_module,
only: kim_compute_arguments_type
482 integer(c_int) recursive function set_argument_pointer_double( &
483 compute_arguments, compute_argument_name, ptr) &
484 bind(c, name="KIM_ComputeArguments_SetArgumentPointerDouble")
485 use,
intrinsic :: iso_c_binding
488 use kim_interoperable_types_module,
only: kim_compute_arguments_type
490 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
491 type(kim_compute_argument_name_type),
intent(in),
value :: &
492 compute_argument_name
493 type(c_ptr),
intent(in),
value :: ptr
496 type(kim_compute_arguments_handle_type),
intent(in) :: &
497 compute_arguments_handle
498 type(kim_compute_argument_name_type),
intent(in) :: &
499 compute_argument_name
500 real(c_double),
intent(in),
target :: double0
501 integer(c_int),
intent(out) :: ierr
502 type(kim_compute_arguments_type),
pointer :: compute_arguments
504 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
506 compute_argument_name, c_loc(double0))
516 compute_arguments_handle, compute_argument_name, double1, ierr)
518 use kim_interoperable_types_module,
only: kim_compute_arguments_type
521 compute_arguments_handle
523 compute_argument_name
524 real(c_double),
intent(in),
target :: double1(:)
525 integer(c_int),
intent(out) :: ierr
526 type(kim_compute_arguments_type),
pointer :: compute_arguments
528 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
529 call set(compute_arguments, compute_argument_name, &
530 size(double1, 1, c_int), double1, ierr)
534 recursive subroutine set(compute_arguments, compute_argument_name, &
535 extent1, double1, ierr)
538 use kim_interoperable_types_module,
only: kim_compute_arguments_type
542 compute_arguments, compute_argument_name, ptr) &
543 bind(c, name="KIM_ComputeArguments_SetArgumentPointerDouble")
544 use,
intrinsic :: iso_c_binding
547 use kim_interoperable_types_module,
only: kim_compute_arguments_type
549 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
551 compute_argument_name
552 type(c_ptr),
intent(in),
value :: ptr
555 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
556 type(kim_compute_argument_name_type),
intent(in) :: &
557 compute_argument_name
558 integer(c_int),
intent(in) :: extent1
559 real(c_double),
intent(in),
target :: double1(extent1)
560 integer(c_int),
intent(out) :: ierr
563 compute_argument_name, c_loc(double1))
574 compute_arguments_handle, compute_argument_name, double2, ierr)
576 use kim_interoperable_types_module,
only: kim_compute_arguments_type
579 compute_arguments_handle
581 compute_argument_name
582 real(c_double),
intent(in),
target :: double2(:, :)
583 integer(c_int),
intent(out) :: ierr
584 type(kim_compute_arguments_type),
pointer :: compute_arguments
586 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
587 call set(compute_arguments, compute_argument_name, &
588 size(double2, 1, c_int),
size(double2, 2, c_int), double2, ierr)
592 recursive subroutine set(compute_arguments, compute_argument_name, &
593 extent1, extent2, double2, ierr)
599 compute_arguments, compute_argument_name, ptr) &
600 bind(c, name="KIM_ComputeArguments_SetArgumentPointerDouble")
601 use,
intrinsic :: iso_c_binding
604 use kim_interoperable_types_module,
only: kim_compute_arguments_type
606 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
608 compute_argument_name
609 type(c_ptr),
intent(in),
value :: ptr
612 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
613 type(kim_compute_argument_name_type),
intent(in) :: &
614 compute_argument_name
615 integer(c_int),
intent(in) :: extent1
616 integer(c_int),
intent(in) :: extent2
617 real(c_double),
intent(in),
target :: double2(extent1, extent2)
618 integer(c_int),
intent(out) :: ierr
621 compute_argument_name, c_loc(double2))
632 compute_arguments_handle, compute_callback_name, language_name, fptr, &
636 use kim_interoperable_types_module,
only: kim_compute_arguments_type
639 integer(c_int) recursive function set_callback_pointer( &
640 compute_arguments, compute_callback_name, language_name, fptr, &
641 data_object)
bind(c, name="KIM_ComputeArguments_SetCallbackPointer")
642 use,
intrinsic :: iso_c_binding
646 use kim_interoperable_types_module,
only: kim_compute_arguments_type
648 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
649 type(kim_language_name_type),
intent(in),
value :: language_name
650 type(kim_compute_callback_name_type),
intent(in),
value :: &
651 compute_callback_name
652 type(c_funptr),
intent(in),
value :: fptr
653 type(c_ptr),
intent(in),
value :: data_object
656 type(kim_compute_arguments_handle_type),
intent(in) :: &
657 compute_arguments_handle
658 type(kim_compute_callback_name_type),
intent(in) :: &
659 compute_callback_name
660 type(kim_language_name_type),
intent(in) :: language_name
661 type(c_funptr),
intent(in),
value :: fptr
662 type(c_ptr),
intent(in) :: data_object
663 integer(c_int),
intent(out) :: ierr
664 type(kim_compute_arguments_type),
pointer :: compute_arguments
666 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
668 language_name, fptr, data_object)
679 compute_arguments_handle, result_value, ierr)
680 use kim_interoperable_types_module,
only: kim_compute_arguments_type
683 integer(c_int) recursive function &
684 are_all_required_arguments_and_callbacks_present( &
685 compute_arguments, result_value) &
688 "KIM_ComputeArguments_AreAllRequiredArgumentsAndCallbacksPresent")
689 use,
intrinsic :: iso_c_binding
690 use kim_interoperable_types_module,
only: kim_compute_arguments_type
692 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
693 integer(c_int),
intent(out) :: result_value
696 type(kim_compute_arguments_handle_type),
intent(in) :: &
697 compute_arguments_handle
698 integer(c_int),
intent(out) :: result_value
699 integer(c_int),
intent(out) :: ierr
700 type(kim_compute_arguments_type),
pointer :: compute_arguments
702 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
704 compute_arguments, result_value)
714 compute_arguments_handle, ptr)
715 use kim_interoperable_types_module,
only: kim_compute_arguments_type
719 compute_arguments, ptr) &
720 bind(c, name="KIM_ComputeArguments_SetSimulatorBufferPointer")
721 use,
intrinsic :: iso_c_binding
722 use kim_interoperable_types_module,
only: kim_compute_arguments_type
724 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
725 type(c_ptr),
intent(in),
value :: ptr
728 type(kim_compute_arguments_handle_type),
intent(in) :: &
729 compute_arguments_handle
730 type(c_ptr),
intent(in) :: ptr
731 type(kim_compute_arguments_type),
pointer :: compute_arguments
733 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
744 compute_arguments_handle, ptr)
745 use kim_interoperable_types_module,
only: kim_compute_arguments_type
749 compute_arguments, ptr) &
750 bind(c, name="KIM_ComputeArguments_GetSimulatorBufferPointer")
751 use,
intrinsic :: iso_c_binding
752 use kim_interoperable_types_module,
only: kim_compute_arguments_type
754 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
755 type(c_ptr),
intent(out) :: ptr
758 type(kim_compute_arguments_handle_type),
intent(in) :: &
759 compute_arguments_handle
760 type(c_ptr),
intent(out) :: ptr
761 type(kim_compute_arguments_type),
pointer :: compute_arguments
763 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
773 compute_arguments_handle, string)
774 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
775 use kim_interoperable_types_module,
only: kim_compute_arguments_type
778 type(c_ptr)
recursive function compute_arguments_string( &
779 compute_arguments)
bind(c, name="KIM_ComputeArguments_ToString")
780 use,
intrinsic :: iso_c_binding
781 use kim_interoperable_types_module,
only: kim_compute_arguments_type
783 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
786 type(kim_compute_arguments_handle_type),
intent(in) :: &
787 compute_arguments_handle
788 character(len=*, kind=c_char),
intent(out) :: string
789 type(kim_compute_arguments_type),
pointer :: compute_arguments
793 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
795 call kim_convert_c_char_ptr_to_string(p, string)
804 compute_arguments_handle, log_id)
805 use kim_interoperable_types_module,
only: kim_compute_arguments_type
808 recursive subroutine set_log_id(compute_arguments, log_id) &
809 bind(c, name="KIM_ComputeArguments_SetLogID")
810 use,
intrinsic :: iso_c_binding
811 use kim_interoperable_types_module,
only: kim_compute_arguments_type
813 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
814 character(c_char),
intent(in) :: log_id(*)
818 compute_arguments_handle
819 character(len=*, kind=c_char),
intent(in) :: log_id
820 type(kim_compute_arguments_type),
pointer :: compute_arguments
822 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
823 call set_log_id(compute_arguments, trim(log_id)//c_null_char)
833 compute_arguments_handle, log_verbosity)
835 use kim_interoperable_types_module,
only: kim_compute_arguments_type
839 compute_arguments, log_verbosity) &
840 bind(c, name="KIM_ComputeArguments_PushLogVerbosity")
841 use,
intrinsic :: iso_c_binding
843 use kim_interoperable_types_module,
only: kim_compute_arguments_type
845 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
850 compute_arguments_handle
851 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
852 type(kim_compute_arguments_type),
pointer :: compute_arguments
854 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
865 compute_arguments_handle)
867 use kim_interoperable_types_module,
only: kim_compute_arguments_type
871 bind(c, name="KIM_ComputeArguments_PopLogVerbosity")
872 use,
intrinsic :: iso_c_binding
874 use kim_interoperable_types_module,
only: kim_compute_arguments_type
876 type(kim_compute_arguments_type),
intent(in) :: compute_arguments
880 compute_arguments_handle
881 type(kim_compute_arguments_type),
pointer :: compute_arguments
883 call c_f_pointer(compute_arguments_handle%p, compute_arguments)
AreAllRequiredArgumentsAndCallbacksPresent
Get the SupportStatus of a ComputeArgumentName.
Get the SupportStatus of a ComputeCallbackName.
Get the Simulator's buffer pointer from the ComputeArguments object.
Pop a LogVerbosity from the ComputeArguments object's Log object verbosity stack.
Push a new LogVerbosity onto the ComputeArguments object's Log object verbosity stack.
Set the data pointer for a ComputeArgumentName.
Set the function pointer for a ComputeCallbackName.
Set the identity of the Log object associated with the ComputeArguments object.
Set the Simulator's buffer pointer within the ComputeArguments object.
Get a string representing the internal state of the ComputeArguments object.
recursive subroutine set(compute_arguments, compute_argument_name, extent1, int1, ierr)
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simula...
type(kim_compute_arguments_handle_type), save, public, protected kim_compute_arguments_null_handle
NULL handle for use in comparisons.
recursive subroutine kim_compute_arguments_set_argument_pointer_int2(compute_arguments_handle, compute_argument_name, int2, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_set_argument_pointer_double0(compute_arguments_handle, compute_argument_name, double0, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_pop_log_verbosity(compute_arguments_handle)
Pop a LogVerbosity from the ComputeArguments object's Log object verbosity stack.
recursive subroutine kim_compute_arguments_push_log_verbosity(compute_arguments_handle, log_verbosity)
Push a new LogVerbosity onto the ComputeArguments object's Log object verbosity stack.
recursive subroutine kim_compute_arguments_set_argument_pointer_int1(compute_arguments_handle, compute_argument_name, int1, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_get_callback_support_status(compute_arguments_handle, compute_callback_name, support_status, ierr)
Get the SupportStatus of a ComputeCallbackName.
recursive subroutine kim_compute_arguments_get_simulator_buffer_pointer(compute_arguments_handle, ptr)
Get the Simulator's buffer pointer from the ComputeArguments object.
recursive subroutine kim_compute_arguments_set_simulator_buffer_pointer(compute_arguments_handle, ptr)
Set the Simulator's buffer pointer within the ComputeArguments object.
recursive subroutine kim_compute_arguments_set_argument_pointer_int0(compute_arguments_handle, compute_argument_name, int0, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_set_log_id(compute_arguments_handle, log_id)
Set the identity of the Log object associated with the ComputeArguments object.
recursive subroutine kim_compute_arguments_are_all_required_present(compute_arguments_handle, result_value, ierr)
AreAllRequiredArgumentsAndCallbacksPresent
recursive subroutine kim_compute_arguments_set_argument_pointer_double1(compute_arguments_handle, compute_argument_name, double1, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_set_callback_pointer(compute_arguments_handle, compute_callback_name, language_name, fptr, data_object, ierr)
Set the function pointer for a ComputeCallbackName.
recursive subroutine kim_compute_arguments_set_argument_pointer_double2(compute_arguments_handle, compute_argument_name, double2, ierr)
Set the data pointer for a ComputeArgumentName.
recursive subroutine kim_compute_arguments_to_string(compute_arguments_handle, string)
Get a string representing the internal state of the ComputeArguments object.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.
An Extensible Enumeration for the LanguageName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
An Extensible Enumeration for the SupportStatus's supported by the KIM API.
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simula...
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.
An Extensible Enumeration for the LanguageName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
An Extensible Enumeration for the SupportStatus's supported by the KIM API.