36 use,
intrinsic :: iso_c_binding
61 type,
bind(c) :: kim_compute_callback_name_type
68 integer(c_int) compute_callback_name_id
78 bind(c, name="KIM_COMPUTE_CALLBACK_NAME_GetNeighborList") &
88 bind(c, name="KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm") &
98 bind(c, name="KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term") &
107 module procedure kim_compute_callback_name_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.)
137 module procedure kim_compute_callback_name_from_string
146 module procedure kim_compute_callback_name_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
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
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
241 type(kim_compute_callback_name_type),
intent(in),
value :: &
242 compute_callback_name
245 type(kim_compute_callback_name_type),
intent(in) :: &
246 compute_callback_name
247 character(len=*, kind=c_char),
intent(out) :: string
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
296 integer(c_int),
intent(in),
value :: index
298 compute_callback_name
299 end function get_compute_callback_name
301 integer(c_int),
intent(in) :: index
303 integer(c_int),
intent(out) :: ierr
305 ierr = get_compute_callback_name(index - 1, compute_callback_name)
ComputeCallbackName(std::string const &)
Determines if the object is a quantity known to the KIM API.
Converts the object to a string.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.
type(kim_compute_callback_name_type), save, bind(C, name="KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term"), public, protected kim_compute_callback_name_process_d2edr2_term
The standard ProcessD2EDr2Term callback.
recursive subroutine, public kim_get_number_of_compute_callback_names(number_of_compute_callback_names)
GetNumberOfComputeCallbackNames
type(kim_compute_callback_name_type), save, bind(C, name="KIM_COMPUTE_CALLBACK_NAME_GetNeighborList"), public, protected kim_compute_callback_name_get_neighbor_list
The standard GetNeighborList callback.
type(kim_compute_callback_name_type), save, bind(C, name="KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm"), public, protected kim_compute_callback_name_process_dedr_term
The standard ProcessDEDrTerm callback.
recursive subroutine, public kim_get_compute_callback_name(index, compute_callback_name, ierr)
Get the identity of each defined standard ComputeCallbackName.
An Extensible Enumeration for the ComputeCallbackName's supported by the KIM API.