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-alpha.0 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_cutoffs_pointer, &
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, &
55  bind(c,name="KIM_MODEL_REFRESH_null_handle") &
57 
58  Interface operator (.eq.)
59  logical function kim_model_refresh_handle_equal(left, right)
60  use, intrinsic :: iso_c_binding
61  import kim_model_refresh_handle_type
62  implicit none
63  type(kim_model_refresh_handle_type), intent(in) :: left
64  type(kim_model_refresh_handle_type), intent(in) :: right
65  end function kim_model_refresh_handle_equal
66  end interface operator (.eq.)
67 
68  interface operator (.ne.)
69  logical function kim_model_refresh_handle_not_equal(left, right)
70  use, intrinsic :: iso_c_binding
71  import kim_model_refresh_handle_type
72  implicit none
73  type(kim_model_refresh_handle_type), intent(in) :: left
74  type(kim_model_refresh_handle_type), intent(in) :: right
75  end function kim_model_refresh_handle_not_equal
76  end interface operator (.ne.)
77 
78  interface
79  subroutine kim_model_refresh_set_influence_distance_pointer(&
80  model_refresh_handle, influence_distance)
81  use, intrinsic :: iso_c_binding
82  import kim_model_refresh_handle_type
83  implicit none
84  type(kim_model_refresh_handle_type), intent(in) :: &
85  model_refresh_handle
86  real(c_double), intent(in), target :: influence_distance
87  end subroutine kim_model_refresh_set_influence_distance_pointer
88 
89  subroutine kim_model_refresh_set_neighbor_list_cutoffs_pointer( &
90  model_refresh_handle, number_of_cutoffs, cutoffs)
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_cutoffs
97  real(c_double), intent(in), target :: cutoffs(number_of_cutoffs)
98  end subroutine kim_model_refresh_set_neighbor_list_cutoffs_pointer
99 
100  subroutine kim_model_refresh_get_model_buffer_pointer( &
101  model_refresh_handle, ptr)
102  use, intrinsic :: iso_c_binding
103  import kim_model_refresh_handle_type
104  implicit none
105  type(kim_model_refresh_handle_type), intent(in) :: &
106  model_refresh_handle
107  type(c_ptr), intent(out) :: ptr
108  end subroutine kim_model_refresh_get_model_buffer_pointer
109 
110  subroutine kim_model_refresh_log_entry(model_refresh_handle, &
111  log_verbosity, message, line_number, file_name)
112  use, intrinsic :: iso_c_binding
113  use kim_log_verbosity_module, only : kim_log_verbosity_type
114  import kim_model_refresh_handle_type
115  implicit none
116  type(kim_model_refresh_handle_type), intent(in) :: &
117  model_refresh_handle
118  type(kim_log_verbosity_type), intent(in), value :: log_verbosity
119  character(len=*), intent(in) :: message
120  integer(c_int), intent(in), value :: line_number
121  character(len=*), intent(in) :: file_name
122  end subroutine kim_model_refresh_log_entry
123 
124  subroutine kim_model_refresh_string(model_refresh_handle, string)
125  use, intrinsic :: iso_c_binding
126  import kim_model_refresh_handle_type
127  implicit none
128  type(kim_model_refresh_handle_type), intent(in) :: &
129  model_refresh_handle
130  character(len=*), intent(out) :: string
131  end subroutine kim_model_refresh_string
132  end interface
133 end module kim_model_refresh_module
type(kim_model_refresh_handle_type), public, protected kim_model_refresh_null_handle