36 use,
intrinsic :: iso_c_binding
59 type,
bind(c) :: kim_model_refresh_handle_type
60 type(c_ptr) :: p = c_null_ptr
72 interface operator(.eq.)
73 module procedure kim_model_refresh_handle_equal
74 end interface operator(.eq.)
79 interface operator(.ne.)
80 module procedure kim_model_refresh_handle_not_equal
81 end interface operator(.ne.)
90 module procedure kim_model_refresh_set_influence_distance_pointer
135 logical recursive function kim_model_refresh_handle_equal(lhs, rhs)
137 type(kim_model_refresh_handle_type),
intent(in) :: lhs
138 type(kim_model_refresh_handle_type),
intent(in) :: rhs
140 if ((.not. c_associated(lhs%p) .and. c_associated(rhs%p)))
then
141 kim_model_refresh_handle_equal = .true.
143 kim_model_refresh_handle_equal = c_associated(lhs%p, rhs%p)
145 end function kim_model_refresh_handle_equal
150 logical recursive function kim_model_refresh_handle_not_equal(lhs, rhs)
152 type(kim_model_refresh_handle_type),
intent(in) :: lhs
153 type(kim_model_refresh_handle_type),
intent(in) :: rhs
155 kim_model_refresh_handle_not_equal = .not. (lhs == rhs)
156 end function kim_model_refresh_handle_not_equal
164 recursive subroutine kim_model_refresh_set_influence_distance_pointer( &
165 model_refresh_handle, influence_distance)
166 use kim_interoperable_types_module,
only: kim_model_refresh_type
170 influence_distance) &
171 bind(c, name="KIM_ModelRefresh_SetInfluenceDistancePointer")
172 use,
intrinsic :: iso_c_binding
173 use kim_interoperable_types_module,
only: kim_model_refresh_type
175 type(kim_model_refresh_type),
intent(in) :: &
177 type(c_ptr),
intent(in),
value :: influence_distance
180 type(kim_model_refresh_handle_type),
intent(in) :: model_refresh_handle
181 real(c_double),
intent(in),
target :: influence_distance
182 type(kim_model_refresh_type),
pointer :: model_refresh
184 call c_f_pointer(model_refresh_handle%p, model_refresh)
186 c_loc(influence_distance))
187 end subroutine kim_model_refresh_set_influence_distance_pointer
196 model_refresh_handle, number_of_neighbor_lists, cutoffs, &
197 modelWillNotRequestNeighborsOfNoncontributingParticles)
198 use kim_interoperable_types_module,
only: kim_model_refresh_type
202 model_refresh, number_of_neighbor_lists, cutoffs_ptr, &
203 modelWillNotRequestNeighborsOfNoncontributingParticles) &
204 bind(c, name="KIM_ModelRefresh_SetNeighborListPointers")
205 use,
intrinsic :: iso_c_binding
206 use kim_interoperable_types_module,
only: kim_model_refresh_type
208 type(kim_model_refresh_type),
intent(in) :: &
210 integer(c_int),
intent(in),
value :: number_of_neighbor_lists
211 type(c_ptr),
intent(in),
value :: cutoffs_ptr
212 type(c_ptr),
intent(in),
value :: &
213 modelwillnotrequestneighborsofnoncontributingparticles
217 integer(c_int),
intent(in) :: number_of_neighbor_lists
218 real(c_double),
intent(in),
target :: cutoffs(number_of_neighbor_lists)
219 integer(c_int),
intent(in),
target :: &
220 modelwillnotrequestneighborsofnoncontributingparticles( &
221 number_of_neighbor_lists)
222 type(kim_model_refresh_type),
pointer :: model_refresh
224 call c_f_pointer(model_refresh_handle%p, model_refresh)
226 model_refresh, number_of_neighbor_lists, c_loc(cutoffs), &
227 c_loc(modelwillnotrequestneighborsofnoncontributingparticles))
237 model_refresh_handle, ptr)
238 use kim_interoperable_types_module,
only: kim_model_refresh_type
242 bind(c, name="KIM_ModelRefresh_GetModelBufferPointer")
243 use,
intrinsic :: iso_c_binding
244 use kim_interoperable_types_module,
only: kim_model_refresh_type
246 type(kim_model_refresh_type),
intent(in) :: &
248 type(c_ptr),
intent(out) :: ptr
252 type(c_ptr),
intent(out) :: ptr
253 type(kim_model_refresh_type),
pointer :: model_refresh
255 call c_f_pointer(model_refresh_handle%p, model_refresh)
265 log_verbosity, message)
267 use kim_interoperable_types_module,
only: kim_model_refresh_type
271 model_refresh, log_verbosity, message, line_number, file_name) &
272 bind(c, name="KIM_ModelRefresh_LogEntry")
273 use,
intrinsic :: iso_c_binding
275 use kim_interoperable_types_module,
only: kim_model_refresh_type
277 type(kim_model_refresh_type),
intent(in) :: &
280 character(c_char),
intent(in) :: message(*)
281 integer(c_int),
intent(in),
value :: line_number
282 character(c_char),
intent(in) :: file_name(*)
286 type(kim_log_verbosity_type),
intent(in) :: log_verbosity
287 character(len=*, kind=c_char),
intent(in) :: message
288 type(kim_model_refresh_type),
pointer :: model_refresh
290 call c_f_pointer(model_refresh_handle%p, model_refresh)
291 call log_entry(model_refresh, log_verbosity, trim(message)//c_null_char, &
301 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
302 use kim_interoperable_types_module,
only: kim_model_refresh_type
305 type(c_ptr)
recursive function model_refresh_string(model_refresh) &
306 bind(c, name="KIM_ModelRefresh_ToString")
307 use,
intrinsic :: iso_c_binding
308 use kim_interoperable_types_module,
only: kim_model_refresh_type
310 type(kim_model_refresh_type),
intent(in) :: &
314 type(kim_model_refresh_handle_type),
intent(in) :: model_refresh_handle
315 character(len=*, kind=c_char),
intent(out) :: string
316 type(kim_model_refresh_type),
pointer :: model_refresh
320 call c_f_pointer(model_refresh_handle%p, model_refresh)
322 call kim_convert_c_char_ptr_to_string(p, string)
Get the Model's buffer pointer within the Model object.
Write a log entry into the log file.
Set the Model's influence distance data pointer.
Set the Model's neighbor list data pointers.
Get a string representing the internal state of the Model object.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::R...
recursive subroutine kim_model_refresh_to_string(model_refresh_handle, string)
Get a string representing the internal state of the Model object.
recursive subroutine kim_model_refresh_log_entry(model_refresh_handle, log_verbosity, message)
Write a log entry into the log file.
recursive subroutine kim_model_refresh_set_neighbor_list_pointers(model_refresh_handle, number_of_neighbor_lists, cutoffs, modelWillNotRequestNeighborsOfNoncontributingParticles)
Set the Model's neighbor list data pointers.
recursive subroutine kim_model_refresh_get_model_buffer_pointer(model_refresh_handle, ptr)
Get the Model's buffer pointer within the Model object.
type(kim_model_refresh_handle_type), save, public, protected kim_model_refresh_null_handle
NULL handle for use in comparisons.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::R...