39 use,
intrinsic :: iso_c_binding
45 kim_compute_callback_name_type, &
64 type, bind(c) :: kim_compute_callback_name_type
71 integer(c_int) compute_callback_name_id
72 end type kim_compute_callback_name_type
80 type(kim_compute_callback_name_type),
protected,
save, &
81 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetNeighborList") &
90 type(kim_compute_callback_name_type),
protected,
save, &
91 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm") &
100 type(kim_compute_callback_name_type),
protected,
save, &
101 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term") &
110 module procedure kim_compute_callback_name_known
111 end interface kim_known
118 interface operator(.eq.)
119 module procedure kim_compute_callback_name_equal
120 end interface operator(.eq.)
128 interface operator(.ne.)
129 module procedure kim_compute_callback_name_not_equal
130 end interface operator(.ne.)
139 interface kim_from_string
140 module procedure kim_compute_callback_name_from_string
141 end interface kim_from_string
148 interface kim_to_string
149 module procedure kim_compute_callback_name_to_string
150 end interface kim_to_string
158 logical recursive function kim_compute_callback_name_known( &
159 compute_callback_name)
162 integer(c_int) recursive function known(compute_callback_name) &
163 bind(c, name=
"KIM_ComputeCallbackName_Known")
164 use,
intrinsic :: iso_c_binding
165 import kim_compute_callback_name_type
167 type(kim_compute_callback_name_type),
intent(in),
value :: &
168 compute_callback_name
171 type(kim_compute_callback_name_type),
intent(in) :: compute_callback_name
173 kim_compute_callback_name_known = (known(compute_callback_name) /= 0)
174 end function kim_compute_callback_name_known
181 logical recursive function kim_compute_callback_name_equal(lhs, rhs)
183 type(kim_compute_callback_name_type),
intent(in) :: lhs
184 type(kim_compute_callback_name_type),
intent(in) :: rhs
186 kim_compute_callback_name_equal &
187 = (lhs%compute_callback_name_id == rhs%compute_callback_name_id)
188 end function kim_compute_callback_name_equal
196 logical recursive function kim_compute_callback_name_not_equal(lhs, rhs)
198 type(kim_compute_callback_name_type),
intent(in) :: lhs
199 type(kim_compute_callback_name_type),
intent(in) :: rhs
201 kim_compute_callback_name_not_equal = .not. (lhs == rhs)
202 end function kim_compute_callback_name_not_equal
211 recursive subroutine kim_compute_callback_name_from_string( &
212 string, compute_callback_name)
215 type(kim_compute_callback_name_type)
recursive function from_string( &
216 string) bind(c, name=
"KIM_ComputeCallbackName_FromString")
217 use,
intrinsic :: iso_c_binding
218 import kim_compute_callback_name_type
220 character(c_char),
intent(in) :: string(*)
221 end function from_string
223 character(len=*, kind=c_char),
intent(in) :: string
224 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
226 compute_callback_name = from_string(trim(string)//c_null_char)
227 end subroutine kim_compute_callback_name_from_string
234 recursive subroutine kim_compute_callback_name_to_string( &
235 compute_callback_name, string)
236 use kim_convert_string_module
, only: kim_convert_c_char_ptr_to_string
239 type(c_ptr)
recursive function get_string(compute_callback_name) &
240 bind(c, name=
"KIM_ComputeCallbackName_ToString")
241 use,
intrinsic :: iso_c_binding
242 import kim_compute_callback_name_type
244 type(kim_compute_callback_name_type),
intent(in),
value :: &
245 compute_callback_name
246 end function get_string
248 type(kim_compute_callback_name_type),
intent(in) :: &
249 compute_callback_name
250 character(len=*, kind=c_char),
intent(out) :: string
254 p = get_string(compute_callback_name)
255 call kim_convert_c_char_ptr_to_string(p, string)
256 end subroutine kim_compute_callback_name_to_string
266 number_of_compute_callback_names)
269 recursive subroutine get_number_of_compute_callback_names( &
270 number_of_compute_callback_names) &
272 name=
"KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames")
273 use,
intrinsic :: iso_c_binding
274 integer(c_int),
intent(out) :: number_of_compute_callback_names
275 end subroutine get_number_of_compute_callback_names
277 integer(c_int),
intent(out) :: number_of_compute_callback_names
279 call get_number_of_compute_callback_names(number_of_compute_callback_names)
289 compute_callback_name, &
293 integer(c_int) recursive function get_compute_callback_name( &
294 index, compute_callback_name) &
295 bind(c, name=
"KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName")
296 use,
intrinsic :: iso_c_binding
297 import kim_compute_callback_name_type
299 integer(c_int),
intent(in),
value :: index
300 type(kim_compute_callback_name_type),
intent(out) :: &
301 compute_callback_name
302 end function get_compute_callback_name
304 integer(c_int),
intent(in) :: index
305 type(kim_compute_callback_name_type),
intent(out) :: compute_callback_name
306 integer(c_int),
intent(out) :: ierr
308 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. ...