40 use,
intrinsic :: iso_c_binding
46 kim_compute_callback_name_type, &
68 type, bind(c) :: kim_compute_callback_name_type
75 integer(c_int) compute_callback_name_id
76 end type kim_compute_callback_name_type
84 type(kim_compute_callback_name_type),
protected,
save, &
85 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetNeighborList") &
94 type(kim_compute_callback_name_type),
protected,
save, &
95 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm") &
104 type(kim_compute_callback_name_type),
protected,
save, &
105 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term") &
114 module procedure kim_compute_callback_name_known
115 end interface kim_known
122 interface operator (.eq.)
123 module procedure kim_compute_callback_name_equal
124 end interface operator (.eq.)
132 interface operator (.ne.)
133 module procedure kim_compute_callback_name_not_equal
134 end interface operator (.ne.)
143 interface kim_from_string
144 module procedure kim_compute_callback_name_from_string
145 end interface kim_from_string
152 interface kim_to_string
153 module procedure kim_compute_callback_name_to_string
154 end interface kim_to_string
162 logical recursive function kim_compute_callback_name_known( &
163 compute_callback_name)
166 integer(c_int) recursive function known(compute_callback_name) &
167 bind(c, name=
"KIM_ComputeCallbackName_Known")
168 use,
intrinsic :: iso_c_binding
169 import kim_compute_callback_name_type
171 type(kim_compute_callback_name_type),
intent(in),
value :: &
172 compute_callback_name
175 type(kim_compute_callback_name_type),
intent(in) :: compute_callback_name
177 kim_compute_callback_name_known = (known(compute_callback_name) /= 0)
178 end function kim_compute_callback_name_known
185 logical recursive function kim_compute_callback_name_equal(lhs, rhs)
187 type(kim_compute_callback_name_type),
intent(in) :: lhs
188 type(kim_compute_callback_name_type),
intent(in) :: rhs
190 kim_compute_callback_name_equal &
191 = (lhs%compute_callback_name_id .eq. rhs%compute_callback_name_id)
192 end function kim_compute_callback_name_equal
200 logical recursive function kim_compute_callback_name_not_equal(lhs, rhs)
202 type(kim_compute_callback_name_type),
intent(in) :: lhs
203 type(kim_compute_callback_name_type),
intent(in) :: rhs
205 kim_compute_callback_name_not_equal = .not. (lhs .eq. rhs)
206 end function kim_compute_callback_name_not_equal
215 recursive subroutine kim_compute_callback_name_from_string(string, &
216 compute_callback_name)
219 type(kim_compute_callback_name_type)
recursive function from_string( &
220 string) bind(c, name=
"KIM_ComputeCallbackName_FromString")
221 use,
intrinsic :: iso_c_binding
222 import kim_compute_callback_name_type
224 character(c_char),
intent(in) :: string(*)
225 end function from_string
227 character(len=*, kind=c_char),
intent(in) :: string
228 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
230 compute_callback_name = from_string(trim(string)//c_null_char)
231 end subroutine kim_compute_callback_name_from_string
238 recursive subroutine kim_compute_callback_name_to_string( &
239 compute_callback_name, string)
240 use kim_convert_string_module
, only : kim_convert_c_char_ptr_to_string
243 type(c_ptr)
recursive function get_string(compute_callback_name) &
244 bind(c, name=
"KIM_ComputeCallbackName_ToString")
245 use,
intrinsic :: iso_c_binding
246 import kim_compute_callback_name_type
248 type(kim_compute_callback_name_type),
intent(in),
value :: &
249 compute_callback_name
250 end function get_string
252 type(kim_compute_callback_name_type),
intent(in) :: &
253 compute_callback_name
254 character(len=*, kind=c_char),
intent(out) :: string
258 p = get_string(compute_callback_name)
259 call kim_convert_c_char_ptr_to_string(p, string)
260 end subroutine kim_compute_callback_name_to_string
270 number_of_compute_callback_names)
273 recursive subroutine get_number_of_compute_callback_names( &
274 number_of_compute_callback_names) &
276 name=
"KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames")
277 use,
intrinsic :: iso_c_binding
278 integer(c_int),
intent(out) :: number_of_compute_callback_names
279 end subroutine get_number_of_compute_callback_names
281 integer(c_int),
intent(out) :: number_of_compute_callback_names
283 call get_number_of_compute_callback_names(number_of_compute_callback_names)
293 compute_callback_name, ierr)
296 integer(c_int) recursive function get_compute_callback_name(index, &
297 compute_callback_name) &
298 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName")
299 use,
intrinsic :: iso_c_binding
300 import kim_compute_callback_name_type
302 integer(c_int),
intent(in),
value :: index
303 type(kim_compute_callback_name_type),
intent(out) :: &
304 compute_callback_name
305 end function get_compute_callback_name
307 integer(c_int),
intent(in) :: index
308 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
309 integer(c_int),
intent(out) :: ierr
311 ierr = get_compute_callback_name(index-1, compute_callback_name)
type(kim_compute_callback_name_type), save, public, protected kim_compute_callback_name_process_d2edr2_term
recursive subroutine, public kim_get_compute_callback_name(index, compute_callback_name, ierr)
Get the identity of each defined standard ComputeCallbackName.
type(kim_compute_callback_name_type), save, public, protected kim_compute_callback_name_get_neighbor_list
type(kim_compute_callback_name_type), save, public, protected kim_compute_callback_name_process_dedr_term
recursive subroutine, public kim_get_number_of_compute_callback_names(number_of_compute_callback_names)
Get the number of standard ComputeCallbackName's defined by the KIM API.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API. ...