40 use,
intrinsic :: iso_c_binding
46 kim_simulator_model_handle_type, &
56 kim_get_simulator_name_and_version, &
57 kim_get_number_of_supported_species, &
58 kim_get_supported_species, &
59 kim_open_and_initialize_template_map, &
60 kim_template_map_is_open, &
61 kim_add_template_map, &
62 kim_close_template_map, &
63 kim_get_number_of_simulator_fields, &
64 kim_get_simulator_field_metadata, &
65 kim_get_simulator_field_line, &
66 kim_get_parameter_file_directory_name, &
67 kim_get_specification_file_name, &
68 kim_get_number_of_parameter_files, &
69 kim_get_parameter_file_name, &
70 kim_set_simulator_buffer_pointer, &
71 kim_get_simulator_buffer_pointer, &
74 kim_push_log_verbosity, &
83 type, bind(c) :: kim_simulator_model_handle_type
84 type(c_ptr) :: p = c_null_ptr
85 end type kim_simulator_model_handle_type
90 type(kim_simulator_model_handle_type),
protected,
save &
96 interface operator (.eq.)
97 module procedure kim_simulator_model_handle_equal
98 end interface operator (.eq.)
103 interface operator (.ne.)
104 module procedure kim_simulator_model_handle_not_equal
105 end interface operator (.ne.)
113 interface kim_get_simulator_name_and_version
114 module procedure kim_simulator_model_get_simulator_name_and_version
115 end interface kim_get_simulator_name_and_version
123 interface kim_get_number_of_supported_species
125 end interface kim_get_number_of_supported_species
133 interface kim_get_supported_species
135 end interface kim_get_supported_species
143 interface kim_open_and_initialize_template_map
145 end interface kim_open_and_initialize_template_map
153 interface kim_template_map_is_open
155 end interface kim_template_map_is_open
162 interface kim_add_template_map
164 end interface kim_add_template_map
172 interface kim_close_template_map
174 end interface kim_close_template_map
182 interface kim_get_number_of_simulator_fields
184 end interface kim_get_number_of_simulator_fields
192 interface kim_get_simulator_field_metadata
194 end interface kim_get_simulator_field_metadata
202 interface kim_get_simulator_field_line
204 end interface kim_get_simulator_field_line
212 interface kim_get_parameter_file_directory_name
214 end interface kim_get_parameter_file_directory_name
222 interface kim_get_specification_file_name
224 end interface kim_get_specification_file_name
232 interface kim_get_number_of_parameter_files
234 end interface kim_get_number_of_parameter_files
242 interface kim_get_parameter_file_name
244 end interface kim_get_parameter_file_name
252 interface kim_set_simulator_buffer_pointer
254 end interface kim_set_simulator_buffer_pointer
262 interface kim_get_simulator_buffer_pointer
264 end interface kim_get_simulator_buffer_pointer
271 interface kim_to_string
273 end interface kim_to_string
280 interface kim_set_log_id
282 end interface kim_set_log_id
290 interface kim_push_log_verbosity
292 end interface kim_push_log_verbosity
299 interface kim_pop_log_verbosity
301 end interface kim_pop_log_verbosity
307 logical recursive function kim_simulator_model_handle_equal(lhs, rhs)
309 type(kim_simulator_model_handle_type),
intent(in) :: lhs
310 type(kim_simulator_model_handle_type),
intent(in) :: rhs
312 if ((.not. c_associated(lhs%p)) .and. (.not. c_associated(rhs%p)))
then 313 kim_simulator_model_handle_equal = .true.
315 kim_simulator_model_handle_equal = c_associated(lhs%p, rhs%p)
317 end function kim_simulator_model_handle_equal
322 logical recursive function kim_simulator_model_handle_not_equal(lhs, rhs)
324 type(kim_simulator_model_handle_type),
intent(in) :: lhs
325 type(kim_simulator_model_handle_type),
intent(in) :: rhs
327 kim_simulator_model_handle_not_equal = .not. (lhs .eq. rhs)
328 end function kim_simulator_model_handle_not_equal
336 simulator_model_handle, ierr)
339 integer(c_int) recursive function create(simulator_model_name, &
340 simulator_model) bind(c, name="KIM_SimulatorModel_Create")
341 use,
intrinsic :: iso_c_binding
343 character(c_char),
intent(in) :: simulator_model_name(*)
344 type(c_ptr),
intent(out) :: simulator_model
347 character(len=*, kind=c_char),
intent(in) :: simulator_model_name
348 type(kim_simulator_model_handle_type),
intent(out) :: simulator_model_handle
349 integer(c_int),
intent(out) :: ierr
351 type(c_ptr) :: psimulator_model
353 ierr = create(trim(simulator_model_name)//c_null_char, psimulator_model)
354 simulator_model_handle%p = psimulator_model
365 recursive subroutine destroy(simulator_model) &
366 bind(c, name=
"KIM_SimulatorModel_Destroy")
367 use,
intrinsic :: iso_c_binding
369 type(c_ptr),
intent(inout) :: simulator_model
370 end subroutine destroy
372 type(kim_simulator_model_handle_type),
intent(inout) :: &
373 simulator_model_handle
375 type(c_ptr) :: psimulator_model
376 psimulator_model = simulator_model_handle%p
377 call destroy(psimulator_model)
378 simulator_model_handle%p = c_null_ptr
387 recursive subroutine kim_simulator_model_get_simulator_name_and_version( &
388 simulator_model_handle, simulator_name, simulator_version)
389 use kim_interoperable_types_module
, only : kim_simulator_model_type
390 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
393 recursive subroutine get_simulator_name_and_version(simulator_model, &
394 simulator_name, simulator_version) &
395 bind(c, name=
"KIM_SimulatorModel_GetSimulatorNameAndVersion")
396 use,
intrinsic :: iso_c_binding
397 use kim_interoperable_types_module
, only : kim_simulator_model_type
399 type(kim_simulator_model_type),
intent(in) :: simulator_model
400 type(c_ptr),
intent(out) :: simulator_name
401 type(c_ptr),
intent(out) :: simulator_version
402 end subroutine get_simulator_name_and_version
404 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
405 character(len=*, kind=c_char),
intent(out) :: simulator_name
406 character(len=*, kind=c_char),
intent(out) :: simulator_version
407 type(kim_simulator_model_type),
pointer :: simulator_model
409 type(c_ptr) psimulator_name, psimulator_version
411 call c_f_pointer(simulator_model_handle%p, simulator_model)
412 call get_simulator_name_and_version(simulator_model, psimulator_name, &
414 call kim_convert_c_char_ptr_to_string(psimulator_name, simulator_name)
415 call kim_convert_c_char_ptr_to_string(psimulator_version, simulator_version)
416 end subroutine kim_simulator_model_get_simulator_name_and_version
425 simulator_model_handle, number_of_supported_species)
426 use kim_interoperable_types_module
, only : kim_simulator_model_type
429 recursive subroutine get_number_of_supported_species(simulator_model, &
430 number_of_supported_species) &
431 bind(c, name=
"KIM_SimulatorModel_GetNumberOfSupportedSpecies")
432 use,
intrinsic :: iso_c_binding
433 use kim_interoperable_types_module
, only : kim_simulator_model_type
435 type(kim_simulator_model_type),
intent(in) :: simulator_model
436 integer(c_int),
intent(out) :: number_of_supported_species
437 end subroutine get_number_of_supported_species
439 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
440 integer(c_int),
intent(out) :: number_of_supported_species
441 type(kim_simulator_model_type),
pointer :: simulator_model
443 call c_f_pointer(simulator_model_handle%p, simulator_model)
444 call get_number_of_supported_species(simulator_model, &
445 number_of_supported_species)
455 simulator_model_handle, index, species_name, ierr)
456 use kim_interoperable_types_module
, only : kim_simulator_model_type
457 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
460 integer(c_int) recursive function get_supported_species(simulator_model, &
461 index, species_name) &
462 bind(c, name=
"KIM_SimulatorModel_GetSupportedSpecies")
463 use,
intrinsic :: iso_c_binding
464 use kim_interoperable_types_module
, only : kim_simulator_model_type
466 type(kim_simulator_model_type),
intent(in) :: simulator_model
467 integer(c_int),
intent(in),
value :: index
468 type(c_ptr),
intent(out) :: species_name
469 end function get_supported_species
471 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
472 integer(c_int),
intent(in) :: index
473 character(len=*, kind=c_char),
intent(out) :: species_name
474 integer(c_int),
intent(out) :: ierr
475 type(kim_simulator_model_type),
pointer :: simulator_model
477 type(c_ptr) pspecies_name
479 call c_f_pointer(simulator_model_handle%p, simulator_model)
480 ierr = get_supported_species(simulator_model, index-1, pspecies_name)
481 call kim_convert_c_char_ptr_to_string(pspecies_name, species_name)
491 simulator_model_handle)
492 use kim_interoperable_types_module
, only : kim_simulator_model_type
495 recursive subroutine open_and_initialize_template_map(simulator_model) &
496 bind(c, name=
"KIM_SimulatorModel_OpenAndInitializeTemplateMap")
497 use,
intrinsic :: iso_c_binding
498 use kim_interoperable_types_module
, only : kim_simulator_model_type
500 type(kim_simulator_model_type),
intent(in) :: simulator_model
501 end subroutine open_and_initialize_template_map
503 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
504 type(kim_simulator_model_type),
pointer :: simulator_model
506 call c_f_pointer(simulator_model_handle%p, simulator_model)
507 call open_and_initialize_template_map(simulator_model)
517 simulator_model_handle)
518 use kim_interoperable_types_module
, only : kim_simulator_model_type
521 integer(c_int) recursive function template_map_is_open(simulator_model) &
522 bind(c, name=
"KIM_SimulatorModel_TemplateMapIsOpen")
523 use,
intrinsic :: iso_c_binding
524 use kim_interoperable_types_module
, only : kim_simulator_model_type
526 type(kim_simulator_model_type),
intent(in) :: simulator_model
527 end function template_map_is_open
529 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
530 type(kim_simulator_model_type),
pointer :: simulator_model
532 call c_f_pointer(simulator_model_handle%p, simulator_model)
543 simulator_model_handle, key, value, ierr)
544 use kim_interoperable_types_module
, only : kim_simulator_model_type
545 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
548 integer(c_int) recursive function add_template_map(simulator_model, key, &
549 value) bind(c, name="KIM_SimulatorModel_AddTemplateMap")
550 use,
intrinsic :: iso_c_binding
551 use kim_interoperable_types_module
, only : kim_simulator_model_type
553 type(kim_simulator_model_type),
intent(in) :: simulator_model
554 character(c_char),
intent(in) :: key(*)
555 character(c_char),
intent(in) ::
value(*)
556 end function add_template_map
558 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
559 character(len=*, kind=c_char),
intent(in) :: key
560 character(len=*, kind=c_char),
intent(in) :: value
561 integer(c_int),
intent(out) :: ierr
562 type(kim_simulator_model_type),
pointer :: simulator_model
564 call c_f_pointer(simulator_model_handle%p, simulator_model)
565 ierr = add_template_map(simulator_model, trim(key)//c_null_char, &
566 trim(
value)//c_null_char)
576 simulator_model_handle)
577 use kim_interoperable_types_module
, only : kim_simulator_model_type
580 recursive subroutine close_template_map(simulator_model) &
581 bind(c, name=
"KIM_SimulatorModel_CloseTemplateMap")
582 use,
intrinsic :: iso_c_binding
583 use kim_interoperable_types_module
, only : kim_simulator_model_type
585 type(kim_simulator_model_type),
intent(in) :: simulator_model
586 end subroutine close_template_map
588 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
589 type(kim_simulator_model_type),
pointer :: simulator_model
591 call c_f_pointer(simulator_model_handle%p, simulator_model)
592 call close_template_map(simulator_model)
602 simulator_model_handle, number_of_simulator_fields)
603 use kim_interoperable_types_module
, only : kim_simulator_model_type
606 recursive subroutine get_number_of_simulator_fields(simulator_model, &
607 number_of_simulator_fields) &
608 bind(c, name=
"KIM_SimulatorModel_GetNumberOfSimulatorFields")
609 use,
intrinsic :: iso_c_binding
610 use kim_interoperable_types_module
, only : kim_simulator_model_type
612 type(kim_simulator_model_type),
intent(in) :: simulator_model
613 integer(c_int),
intent(out) :: number_of_simulator_fields
614 end subroutine get_number_of_simulator_fields
616 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
617 integer(c_int),
intent(out) :: number_of_simulator_fields
618 type(kim_simulator_model_type),
pointer :: simulator_model
620 call c_f_pointer(simulator_model_handle%p, simulator_model)
621 call get_number_of_simulator_fields(simulator_model, &
622 number_of_simulator_fields)
632 simulator_model_handle, field_index, extent, field_name, ierr)
633 use kim_interoperable_types_module
, only : kim_simulator_model_type
634 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
637 integer(c_int) recursive function get_simulator_field_metadata( &
638 simulator_model, field_index, extent, field_name) &
639 bind(c, name=
"KIM_SimulatorModel_GetSimulatorFieldMetadata")
640 use,
intrinsic :: iso_c_binding
641 use kim_interoperable_types_module
, only : kim_simulator_model_type
643 type(kim_simulator_model_type),
intent(in) :: simulator_model
644 integer(c_int),
intent(in),
value :: field_index
645 integer(c_int),
intent(out) :: extent
646 type(c_ptr),
intent(out) :: field_name
647 end function get_simulator_field_metadata
649 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
650 integer(c_int),
intent(in) :: field_index
651 integer(c_int),
intent(out) :: extent
652 character(len=*, kind=c_char),
intent(out) :: field_name
653 integer(c_int),
intent(out) :: ierr
654 type(kim_simulator_model_type),
pointer :: simulator_model
656 type(c_ptr) pfield_name
658 call c_f_pointer(simulator_model_handle%p, simulator_model)
659 ierr = get_simulator_field_metadata(simulator_model, field_index-1, &
661 call kim_convert_c_char_ptr_to_string(pfield_name, field_name)
671 simulator_model_handle, field_index, line_index, line_value, ierr)
672 use kim_interoperable_types_module
, only : kim_simulator_model_type
673 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
676 integer(c_int) recursive function get_simulator_field_line( &
677 simulator_model, field_index, line_index, line_value) &
678 bind(c, name=
"KIM_SimulatorModel_GetSimulatorFieldLine")
679 use,
intrinsic :: iso_c_binding
680 use kim_interoperable_types_module
, only : kim_simulator_model_type
682 type(kim_simulator_model_type),
intent(in) :: simulator_model
683 integer(c_int),
intent(in),
value :: field_index
684 integer(c_int),
intent(in),
value :: line_index
685 type(c_ptr),
intent(out) :: line_value
686 end function get_simulator_field_line
688 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
689 integer(c_int),
intent(in),
value :: field_index
690 integer(c_int),
intent(in),
value :: line_index
691 character(len=*, kind=c_char),
intent(out) :: line_value
692 integer(c_int),
intent(out) :: ierr
693 type(kim_simulator_model_type),
pointer :: simulator_model
695 type(c_ptr) pline_value
697 call c_f_pointer(simulator_model_handle%p, simulator_model)
698 ierr = get_simulator_field_line(simulator_model, field_index-1, &
699 line_index-1, pline_value)
700 call kim_convert_c_char_ptr_to_string(pline_value, line_value)
710 simulator_model_handle, directory_name)
711 use kim_interoperable_types_module
, only : kim_simulator_model_type
712 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
715 recursive subroutine get_parameter_file_directory_name(simulator_model, &
717 bind(c, name=
"KIM_SimulatorModel_GetParameterFileDirectoryName")
718 use,
intrinsic :: iso_c_binding
719 use kim_interoperable_types_module
, only : kim_simulator_model_type
721 type(kim_simulator_model_type),
intent(in) :: simulator_model
722 type(c_ptr),
intent(out) :: directory_name
723 end subroutine get_parameter_file_directory_name
725 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
726 character(len=*, kind=c_char),
intent(out) :: directory_name
727 type(kim_simulator_model_type),
pointer :: simulator_model
729 type(c_ptr) pdirectory_name
731 call c_f_pointer(simulator_model_handle%p, simulator_model)
732 call get_parameter_file_directory_name(simulator_model, pdirectory_name)
733 call kim_convert_c_char_ptr_to_string(pdirectory_name, directory_name)
743 simulator_model_handle, specification_file_name)
744 use kim_interoperable_types_module
, only : kim_simulator_model_type
745 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
748 recursive subroutine get_specification_file_name(simulator_model, &
749 specification_file_name) &
750 bind(c, name=
"KIM_SimulatorModel_GetSpecificationFileName")
751 use,
intrinsic :: iso_c_binding
752 use kim_interoperable_types_module
, only : kim_simulator_model_type
754 type(kim_simulator_model_type),
intent(in) :: simulator_model
755 type(c_ptr),
intent(out) :: specification_file_name
756 end subroutine get_specification_file_name
758 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
759 character(len=*, kind=c_char),
intent(out) :: specification_file_name
760 type(kim_simulator_model_type),
pointer :: simulator_model
762 type(c_ptr) pspecification_file_name
764 call c_f_pointer(simulator_model_handle%p, simulator_model)
765 call get_specification_file_name(simulator_model, pspecification_file_name)
766 call kim_convert_c_char_ptr_to_string(pspecification_file_name, &
767 specification_file_name)
777 simulator_model_handle, number_of_parameter_files)
778 use kim_interoperable_types_module
, only : kim_simulator_model_type
781 recursive subroutine get_number_of_parameter_files(simulator_model, &
782 number_of_parameter_files) &
783 bind(c, name=
"KIM_SimulatorModel_GetNumberOfParameterFiles")
784 use,
intrinsic :: iso_c_binding
785 use kim_interoperable_types_module
, only : kim_simulator_model_type
787 type(kim_simulator_model_type),
intent(in) :: simulator_model
788 integer(c_int),
intent(out) :: number_of_parameter_files
789 end subroutine get_number_of_parameter_files
791 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
792 integer(c_int),
intent(out) :: number_of_parameter_files
793 type(kim_simulator_model_type),
pointer :: simulator_model
795 call c_f_pointer(simulator_model_handle%p, simulator_model)
796 call get_number_of_parameter_files(simulator_model, &
797 number_of_parameter_files)
807 simulator_model_handle, index, parameter_file_name, ierr)
808 use kim_interoperable_types_module
, only : kim_simulator_model_type
809 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
812 integer(c_int) recursive function get_parameter_file_name( &
813 simulator_model, index, parameter_file_name) &
814 bind(c, name=
"KIM_SimulatorModel_GetParameterFileName")
815 use,
intrinsic :: iso_c_binding
816 use kim_interoperable_types_module
, only : kim_simulator_model_type
818 type(kim_simulator_model_type),
intent(in) :: simulator_model
819 integer(c_int),
intent(in),
value :: index
820 type(c_ptr),
intent(out) :: parameter_file_name
821 end function get_parameter_file_name
823 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
824 integer(c_int),
intent(in) :: index
825 character(len=*, kind=c_char),
intent(out) :: parameter_file_name
826 integer(c_int),
intent(out) :: ierr
827 type(kim_simulator_model_type),
pointer :: simulator_model
829 type(c_ptr) pparameter_file_name
831 call c_f_pointer(simulator_model_handle%p, simulator_model)
832 ierr = get_parameter_file_name(simulator_model, index-1, &
833 pparameter_file_name)
834 call kim_convert_c_char_ptr_to_string(pparameter_file_name, &
845 simulator_model_handle, ptr)
846 use kim_interoperable_types_module
, only : kim_simulator_model_type
849 recursive subroutine set_simulator_buffer_pointer(simulator_model, ptr) &
850 bind(c, name=
"KIM_SimulatorModel_SetSimulatorBufferPointer")
851 use,
intrinsic :: iso_c_binding
852 use kim_interoperable_types_module
, only : kim_simulator_model_type
854 type(kim_simulator_model_type),
intent(in) :: simulator_model
855 type(c_ptr),
intent(in),
value :: ptr
856 end subroutine set_simulator_buffer_pointer
858 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
859 type(c_ptr),
intent(in) :: ptr
860 type(kim_simulator_model_type),
pointer :: simulator_model
862 call c_f_pointer(simulator_model_handle%p, simulator_model)
863 call set_simulator_buffer_pointer(simulator_model, ptr)
873 simulator_model_handle, ptr)
874 use kim_interoperable_types_module
, only : kim_simulator_model_type
877 recursive subroutine get_simulator_buffer_pointer(simulator_model, ptr) &
878 bind(c, name=
"KIM_SimulatorModel_GetSimulatorBufferPointer")
879 use,
intrinsic :: iso_c_binding
880 use kim_interoperable_types_module
, only : kim_simulator_model_type
882 type(kim_simulator_model_type),
intent(in) :: simulator_model
883 type(c_ptr),
intent(out) :: ptr
884 end subroutine get_simulator_buffer_pointer
886 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
887 type(c_ptr),
intent(out) :: ptr
888 type(kim_simulator_model_type),
pointer :: simulator_model
890 call c_f_pointer(simulator_model_handle%p, simulator_model)
891 call get_simulator_buffer_pointer(simulator_model, ptr)
901 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
902 use kim_interoperable_types_module
, only : kim_simulator_model_type
905 type(c_ptr)
recursive function model_string(simulator_model) &
906 bind(c, name=
"KIM_SimulatorModel_ToString")
907 use,
intrinsic :: iso_c_binding
908 use kim_interoperable_types_module
, only : kim_simulator_model_type
910 type(kim_simulator_model_type),
intent(in) :: simulator_model
911 end function model_string
913 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
914 character(len=*, kind=c_char),
intent(out) :: string
915 type(kim_simulator_model_type),
pointer :: simulator_model
919 call c_f_pointer(simulator_model_handle%p, simulator_model)
920 p = model_string(simulator_model)
921 call kim_convert_c_char_ptr_to_string(p, string)
931 use kim_interoperable_types_module
, only : kim_simulator_model_type
934 recursive subroutine set_log_id(simulator_model, log_id) &
935 bind(c, name=
"KIM_SimulatorModel_SetLogID")
936 use,
intrinsic :: iso_c_binding
937 use kim_interoperable_types_module
, only : kim_simulator_model_type
939 type(kim_simulator_model_type),
intent(in) :: simulator_model
940 character(c_char),
intent(in) :: log_id(*)
941 end subroutine set_log_id
943 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
944 character(len=*, kind=c_char),
intent(in) :: log_id
945 type(kim_simulator_model_type),
pointer :: simulator_model
947 call c_f_pointer(simulator_model_handle%p, simulator_model)
948 call set_log_id(simulator_model, trim(log_id)//c_null_char)
958 simulator_model_handle, log_verbosity)
960 use kim_interoperable_types_module
, only : kim_simulator_model_type
963 recursive subroutine push_log_verbosity(simulator_model, log_verbosity) &
964 bind(c, name=
"KIM_SimulatorModel_PushLogVerbosity")
965 use,
intrinsic :: iso_c_binding
967 use kim_interoperable_types_module
, only : kim_simulator_model_type
969 type(kim_simulator_model_type),
intent(in) :: simulator_model
970 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
971 end subroutine push_log_verbosity
973 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
974 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
975 type(kim_simulator_model_type),
pointer :: simulator_model
977 call c_f_pointer(simulator_model_handle%p, simulator_model)
978 call push_log_verbosity(simulator_model, log_verbosity)
987 simulator_model_handle)
989 use kim_interoperable_types_module
, only : kim_simulator_model_type
992 recursive subroutine pop_log_verbosity(simulator_model) &
993 bind(c, name=
"KIM_SimulatorModel_PopLogVerbosity")
994 use,
intrinsic :: iso_c_binding
996 use kim_interoperable_types_module
, only : kim_simulator_model_type
998 type(kim_simulator_model_type),
intent(in) :: simulator_model
999 end subroutine pop_log_verbosity
1001 type(kim_simulator_model_handle_type),
intent(in) :: simulator_model_handle
1002 type(kim_simulator_model_type),
pointer :: simulator_model
1004 call c_f_pointer(simulator_model_handle%p, simulator_model)
1005 call pop_log_verbosity(simulator_model)
recursive subroutine, public kim_simulator_model_create(simulator_model_name, simulator_model_handle, ierr)
Create a new KIM API SimulatorModel object.
recursive subroutine kim_simulator_model_close_template_map(simulator_model_handle)
Close the template map and perform template substitutions.
recursive subroutine kim_simulator_model_get_number_of_parameter_files(simulator_model_handle, number_of_parameter_files)
Get the number of parameter files provided by the SimulatorModel.
recursive subroutine kim_simulator_model_set_simulator_buffer_pointer(simulator_model_handle, ptr)
Set the Simulator's buffer pointer within the SimulatorModel object.
recursive subroutine kim_simulator_model_push_log_verbosity(simulator_model_handle, log_verbosity)
Push a new LogVerbosity onto the SimulatorModel object's Log object verbosity stack.
integer(c_int) recursive function kim_simulator_model_template_map_is_open(simulator_model_handle)
Determine if the template map is open.
recursive subroutine kim_simulator_model_get_parameter_file_name(simulator_model_handle, index, parameter_file_name, ierr)
Get the basename (file name without path) of a particular parameter file. The file is located in the ...
recursive subroutine kim_simulator_model_get_number_of_simulator_fields(simulator_model_handle, number_of_simulator_fields)
Get the number of simulator fields provided by the SimulatorModel.
type(kim_simulator_model_handle_type), save, public, protected kim_simulator_model_null_handle
NULL handle for use in comparisons.
recursive subroutine kim_simulator_model_get_specification_file_name(simulator_model_handle, specification_file_name)
Get the SimulatorModel's specification file basename (file name without path). The file is located in...
Provides the primary interface to a KIM API SimulatorModel object and is meant to be used by simulato...
recursive subroutine kim_simulator_model_add_template_map(simulator_model_handle, key, value, ierr)
Add a new key-value entry to the template map.
recursive subroutine kim_simulator_model_get_simulator_buffer_pointer(simulator_model_handle, ptr)
Get the Simulator's buffer pointer from the SimulatorModel object.
recursive subroutine kim_simulator_model_set_log_id(simulator_model_handle, log_id)
Set the identity of the Log object associated with the SimulatorModel object.
recursive subroutine kim_simulator_model_pop_log_verbosity(simulator_model_handle)
Pop a LogVerbosity from the SimulatorModel object's Log object verbosity stack.
recursive subroutine kim_simulator_model_get_simulator_field_metadata(simulator_model_handle, field_index, extent, field_name, ierr)
Get the metadata for the simulator field of interest.
recursive subroutine, public kim_simulator_model_destroy(simulator_model_handle)
Destroy a previously SimulatorModel::Create'd object.
recursive subroutine kim_simulator_model_get_simulator_field_line(simulator_model_handle, field_index, line_index, line_value, ierr)
Get a line for the simulator field of interest with all template substitutions performed (Requires th...
recursive subroutine kim_simulator_model_get_number_of_supported_species(simulator_model_handle, number_of_supported_species)
Get the number of species supported by the SimulatorModel.
recursive subroutine kim_simulator_model_get_parameter_file_directory_name(simulator_model_handle, directory_name)
Get absolute path name of the temporary directory where parameter files provided by the simulator mod...
recursive subroutine kim_simulator_model_get_supported_species(simulator_model_handle, index, species_name, ierr)
Get a species name supported by the SimulatorModel.
recursive subroutine kim_simulator_model_to_string(simulator_model_handle, string)
Get a string representing the internal state of the SimulatorModel object.
recursive subroutine kim_simulator_model_open_and_initialize_template_map(simulator_model_handle)
Open and initialize the template map for simulator field line substitutions.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.