KIM API V2
kim_model_refresh_module.f90
Go to the documentation of this file.
1 !
2 ! CDDL HEADER START
3 !
4 ! The contents of this file are subject to the terms of the Common Development
5 ! and Distribution License Version 1.0 (the "License").
6 !
7 ! You can obtain a copy of the license at
8 ! http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 ! specific language governing permissions and limitations under the License.
10 !
11 ! When distributing Covered Code, include this CDDL HEADER in each file and
12 ! include the License file in a prominent location with the name LICENSE.CDDL.
13 ! If applicable, add the following below this CDDL HEADER, with the fields
14 ! enclosed by brackets "[]" replaced with your own identifying information:
15 !
16 ! Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 !
18 ! CDDL HEADER END
19 !
20 
21 !
22 ! Copyright (c) 2016--2018, Regents of the University of Minnesota.
23 ! All rights reserved.
24 !
25 ! Contributors:
26 ! Ryan S. Elliott
27 !
28 
29 !
30 ! Release: This file is part of the kim-api-v2.0.0-beta.1 package.
31 !
32 
33 
35  use, intrinsic :: iso_c_binding
36  implicit none
37  private
38 
39  public &
40  kim_model_refresh_handle_type, &
42  operator (.eq.), &
43  operator (.ne.), &
44  kim_model_refresh_set_influence_distance_pointer, &
45  kim_model_refresh_set_neighbor_list_pointers, &
46  kim_model_refresh_get_model_buffer_pointer, &
47  kim_model_refresh_log_entry, &
49 
50  type, bind(c) :: kim_model_refresh_handle_type
51  type(c_ptr) :: p = c_null_ptr
52  end type kim_model_refresh_handle_type
53 
54  type(kim_model_refresh_handle_type), protected &
56 
57  Interface operator (.eq.)
58  logical function kim_model_refresh_handle_equal(left, right)
59  use, intrinsic :: iso_c_binding
60  import kim_model_refresh_handle_type
61  implicit none
62  type(kim_model_refresh_handle_type), intent(in) :: left
63  type(kim_model_refresh_handle_type), intent(in) :: right
64  end function kim_model_refresh_handle_equal
65  end interface operator (.eq.)
66 
67  interface operator (.ne.)
68  logical function kim_model_refresh_handle_not_equal(left, right)
69  use, intrinsic :: iso_c_binding
70  import kim_model_refresh_handle_type
71  implicit none
72  type(kim_model_refresh_handle_type), intent(in) :: left
73  type(kim_model_refresh_handle_type), intent(in) :: right
74  end function kim_model_refresh_handle_not_equal
75  end interface operator (.ne.)
76 
77  interface
78  subroutine kim_model_refresh_set_influence_distance_pointer(&
79  model_refresh_handle, influence_distance)
80  use, intrinsic :: iso_c_binding
81  import kim_model_refresh_handle_type
82  implicit none
83  type(kim_model_refresh_handle_type), intent(in) :: &
84  model_refresh_handle
85  real(c_double), intent(in), target :: influence_distance
86  end subroutine kim_model_refresh_set_influence_distance_pointer
87 
88  subroutine kim_model_refresh_set_neighbor_list_pointers( &
89  model_refresh_handle, number_of_neighbor_lists, cutoffs, &
90  padding_neighbor_hints, half_list_hints)
91  use, intrinsic :: iso_c_binding
92  import kim_model_refresh_handle_type
93  implicit none
94  type(kim_model_refresh_handle_type), intent(in) :: &
95  model_refresh_handle
96  integer(c_int), intent(in), value :: number_of_neighbor_lists
97  real(c_double), intent(in), target :: cutoffs(number_of_neighbor_lists)
98  integer(c_int), intent(in), target :: &
99  padding_neighbor_hints(number_of_neighbor_lists)
100  integer(c_int), intent(in), target :: &
101  half_list_hints(number_of_neighbor_lists)
102  end subroutine kim_model_refresh_set_neighbor_list_pointers
103 
104  subroutine kim_model_refresh_get_model_buffer_pointer( &
105  model_refresh_handle, ptr)
106  use, intrinsic :: iso_c_binding
107  import kim_model_refresh_handle_type
108  implicit none
109  type(kim_model_refresh_handle_type), intent(in) :: &
110  model_refresh_handle
111  type(c_ptr), intent(out) :: ptr
112  end subroutine kim_model_refresh_get_model_buffer_pointer
113 
114  subroutine kim_model_refresh_log_entry(model_refresh_handle, &
115  log_verbosity, message, line_number, file_name)
116  use, intrinsic :: iso_c_binding
117  use kim_log_verbosity_module, only : kim_log_verbosity_type
118  import kim_model_refresh_handle_type
119  implicit none
120  type(kim_model_refresh_handle_type), intent(in) :: &
121  model_refresh_handle
122  type(kim_log_verbosity_type), intent(in), value :: log_verbosity
123  character(len=*, kind=c_char), intent(in) :: message
124  integer(c_int), intent(in), value :: line_number
125  character(len=*, kind=c_char), intent(in) :: file_name
126  end subroutine kim_model_refresh_log_entry
127 
128  subroutine kim_model_refresh_string(model_refresh_handle, string)
129  use, intrinsic :: iso_c_binding
130  import kim_model_refresh_handle_type
131  implicit none
132  type(kim_model_refresh_handle_type), intent(in) :: &
133  model_refresh_handle
134  character(len=*, kind=c_char), intent(out) :: string
135  end subroutine kim_model_refresh_string
136  end interface
137 end module kim_model_refresh_module
type(kim_model_refresh_handle_type), public, protected kim_model_refresh_null_handle