36 use,
intrinsic :: iso_c_binding
42 kim_compute_callback_name_type, &
61 type, bind(c) :: kim_compute_callback_name_type
68 integer(c_int) compute_callback_name_id
69 end type kim_compute_callback_name_type
77 type(kim_compute_callback_name_type),
protected,
save, &
78 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetNeighborList") &
87 type(kim_compute_callback_name_type),
protected,
save, &
88 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm") &
97 type(kim_compute_callback_name_type),
protected,
save, &
98 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term") &
107 module procedure kim_compute_callback_name_known
108 end interface kim_known
115 interface operator(.eq.)
116 module procedure kim_compute_callback_name_equal
117 end interface operator(.eq.)
125 interface operator(.ne.)
126 module procedure kim_compute_callback_name_not_equal
127 end interface operator(.ne.)
136 interface kim_from_string
137 module procedure kim_compute_callback_name_from_string
138 end interface kim_from_string
145 interface kim_to_string
146 module procedure kim_compute_callback_name_to_string
147 end interface kim_to_string
155 logical recursive function kim_compute_callback_name_known( &
156 compute_callback_name)
159 integer(c_int) recursive function known(compute_callback_name) &
160 bind(c, name=
"KIM_ComputeCallbackName_Known")
161 use,
intrinsic :: iso_c_binding
162 import kim_compute_callback_name_type
164 type(kim_compute_callback_name_type),
intent(in),
value :: &
165 compute_callback_name
168 type(kim_compute_callback_name_type),
intent(in) :: compute_callback_name
170 kim_compute_callback_name_known = (known(compute_callback_name) /= 0)
171 end function kim_compute_callback_name_known
178 logical recursive function kim_compute_callback_name_equal(lhs, rhs)
180 type(kim_compute_callback_name_type),
intent(in) :: lhs
181 type(kim_compute_callback_name_type),
intent(in) :: rhs
183 kim_compute_callback_name_equal &
184 = (lhs%compute_callback_name_id == rhs%compute_callback_name_id)
185 end function kim_compute_callback_name_equal
193 logical recursive function kim_compute_callback_name_not_equal(lhs, rhs)
195 type(kim_compute_callback_name_type),
intent(in) :: lhs
196 type(kim_compute_callback_name_type),
intent(in) :: rhs
198 kim_compute_callback_name_not_equal = .not. (lhs == rhs)
199 end function kim_compute_callback_name_not_equal
208 recursive subroutine kim_compute_callback_name_from_string( &
209 string, compute_callback_name)
212 type(kim_compute_callback_name_type)
recursive function from_string( &
213 string) bind(c, name=
"KIM_ComputeCallbackName_FromString")
214 use,
intrinsic :: iso_c_binding
215 import kim_compute_callback_name_type
217 character(c_char),
intent(in) :: string(*)
218 end function from_string
220 character(len=*, kind=c_char),
intent(in) :: string
221 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
223 compute_callback_name = from_string(trim(string)//c_null_char)
224 end subroutine kim_compute_callback_name_from_string
231 recursive subroutine kim_compute_callback_name_to_string( &
232 compute_callback_name, string)
233 use kim_convert_string_module
, only: kim_convert_c_char_ptr_to_string
236 type(c_ptr)
recursive function get_string(compute_callback_name) &
237 bind(c, name=
"KIM_ComputeCallbackName_ToString")
238 use,
intrinsic :: iso_c_binding
239 import kim_compute_callback_name_type
241 type(kim_compute_callback_name_type),
intent(in),
value :: &
242 compute_callback_name
243 end function get_string
245 type(kim_compute_callback_name_type),
intent(in) :: &
246 compute_callback_name
247 character(len=*, kind=c_char),
intent(out) :: string
251 p = get_string(compute_callback_name)
252 call kim_convert_c_char_ptr_to_string(p, string)
253 end subroutine kim_compute_callback_name_to_string
263 number_of_compute_callback_names)
266 recursive subroutine get_number_of_compute_callback_names( &
267 number_of_compute_callback_names) &
269 name=
"KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames")
270 use,
intrinsic :: iso_c_binding
271 integer(c_int),
intent(out) :: number_of_compute_callback_names
272 end subroutine get_number_of_compute_callback_names
274 integer(c_int),
intent(out) :: number_of_compute_callback_names
276 call get_number_of_compute_callback_names(number_of_compute_callback_names)
286 compute_callback_name, &
290 integer(c_int) recursive function get_compute_callback_name( &
291 index, compute_callback_name) &
292 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName")
293 use,
intrinsic :: iso_c_binding
294 import kim_compute_callback_name_type
296 integer(c_int),
intent(in),
value :: index
297 type(kim_compute_callback_name_type),
intent(out) :: &
298 compute_callback_name
299 end function get_compute_callback_name
301 integer(c_int),
intent(in) :: index
302 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
303 integer(c_int),
intent(out) :: ierr
305 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. ...