KIM API V2
kim_charge_unit_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.0 package.
31 !
32 
33 
35  use, intrinsic :: iso_c_binding
36  implicit none
37  private
38 
39  public &
40  kim_charge_unit_type, &
41  kim_charge_unit_from_string, &
42  operator (.eq.), &
43  operator (.ne.), &
44  kim_charge_unit_string, &
45 
50 
51  kim_charge_unit_get_number_of_charge_units, &
52  kim_charge_unit_get_charge_unit
53 
54 
55  type, bind(c) :: kim_charge_unit_type
56  integer(c_int) charge_unit_id
57  end type kim_charge_unit_type
58 
59  type(kim_charge_unit_type), protected, &
60  bind(c, name="KIM_CHARGE_UNIT_unused") &
62  type(kim_charge_unit_type), protected, &
63  bind(c, name="KIM_CHARGE_UNIT_c") &
65  type(kim_charge_unit_type), protected, &
66  bind(c, name="KIM_CHARGE_UNIT_e") &
68  type(kim_charge_unit_type), protected, &
69  bind(c, name="KIM_CHARGE_UNIT_statC") &
71 
72  interface operator (.eq.)
73  logical function kim_charge_unit_equal(left, right)
74  use, intrinsic :: iso_c_binding
75  import kim_charge_unit_type
76  implicit none
77  type(kim_charge_unit_type), intent(in) :: left
78  type(kim_charge_unit_type), intent(in) :: right
79  end function kim_charge_unit_equal
80  end interface operator (.eq.)
81 
82  interface operator (.ne.)
83  logical function kim_charge_unit_not_equal(left, right)
84  use, intrinsic :: iso_c_binding
85  import kim_charge_unit_type
86  implicit none
87  type(kim_charge_unit_type), intent(in) :: left
88  type(kim_charge_unit_type), intent(in) :: right
89  end function kim_charge_unit_not_equal
90  end interface operator (.ne.)
91 
92  interface
93  subroutine kim_charge_unit_from_string(string, charge_unit)
94  use, intrinsic :: iso_c_binding
95  import kim_charge_unit_type
96  implicit none
97  character(len=*, kind=c_char), intent(in) :: string
98  type(kim_charge_unit_type), intent(out) :: charge_unit
99  end subroutine kim_charge_unit_from_string
100 
101  subroutine kim_charge_unit_string(charge_unit, string)
102  use, intrinsic :: iso_c_binding
103  import kim_charge_unit_type
104  implicit none
105  type(kim_charge_unit_type), intent(in), value :: charge_unit
106  character(len=*, kind=c_char), intent(out) :: string
107  end subroutine kim_charge_unit_string
108 
109  subroutine kim_charge_unit_get_number_of_charge_units( &
110  number_of_charge_units)
111  use, intrinsic :: iso_c_binding
112  implicit none
113  integer(c_int), intent(out) :: number_of_charge_units
114  end subroutine kim_charge_unit_get_number_of_charge_units
115 
116  subroutine kim_charge_unit_get_charge_unit(index, charge_unit, ierr)
117  use, intrinsic :: iso_c_binding
118  import kim_charge_unit_type
119  implicit none
120  integer(c_int), intent(in), value :: index
121  type(kim_charge_unit_type), intent(out) :: charge_unit
122  integer(c_int), intent(out) :: ierr
123  end subroutine kim_charge_unit_get_charge_unit
124  end interface
125 end module kim_charge_unit_module
type(kim_charge_unit_type), public, protected kim_charge_unit_statc
type(kim_charge_unit_type), public, protected kim_charge_unit_c
type(kim_charge_unit_type), public, protected kim_charge_unit_unused
type(kim_charge_unit_type), public, protected kim_charge_unit_e