FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_couple_info_f.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
2 ! Copyright (c) 2019 FrontISTR Commons
3 ! This software is released under the MIT License, see LICENSE.txt
4 !-------------------------------------------------------------------------------
6 
8 
9  use hecmw_util
10 
11  implicit none
12  private
13  public :: hecmw_couple_get_unit_id
14  public :: hecmw_couple_is_member
17  public :: hecmw_couple_is_root
20  public :: hecmw_intercomm_get_size
21  public :: hecmw_intracomm_get_size
23  public :: hecmw_intercomm_get_rank
24  public :: hecmw_intracomm_get_rank
26  public :: hecmw_intercomm_get_comm
27  public :: hecmw_intracomm_get_comm
32 
33 contains
34 
35 !...
36 !...
37 !...
38 subroutine hecmw_couple_get_unit_id(boundary_id, unit_specifier, unit_id)
39 
40  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
41  integer(kind=kint), intent(in) :: unit_specifier
42  character(len=HECMW_NAME_LEN), intent(out) :: unit_id
43  integer(kind=kint) :: ierr
44 
45  call hecmw_couple_get_unit_id_if(boundary_id, unit_specifier, unit_id, ierr)
46  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
47 
48 end subroutine hecmw_couple_get_unit_id
49 
50 !...
51 !...
52 !...
53 function hecmw_couple_is_member(boundary_id) result (is_member)
54 
55  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
56  integer(kind=kint) :: is_member
57 
58  call hecmw_couple_is_memb_if(boundary_id, is_member)
59 
60 end function hecmw_couple_is_member
61 
62 !...
63 !...
64 !...
65 function hecmw_couple_is_unit_member(boundary_id, unit_specifier) result(is_member)
66 
67  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
68  integer(kind=kint), intent(in) :: unit_specifier
69  integer(kind=kint) :: is_member
70 
71  call hecmw_couple_is_unit_memb_if(boundary_id, unit_specifier, is_member)
72 
73 end function hecmw_couple_is_unit_member
74 
75 !...
76 !...
77 !...
78 function hecmw_couple_is_unit_member_u(unit_id) result(is_member)
79 
80  character(len=HECMW_NAME_LEN), intent(in) :: unit_id
81  integer(kind=kint) :: is_member
82 
83  call hecmw_couple_is_unit_memb_u_if(unit_id, is_member)
84 
86 
87 !...
88 !...
89 !...
90 function hecmw_couple_is_root(boundary_id) result(is_root)
91 
92  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
93  integer(kind=kint) :: is_root
94 
95  call hecmw_couple_is_root_if(boundary_id, is_root)
96 
97 end function hecmw_couple_is_root
98 
99 !...
100 !...
101 !...
102 function hecmw_couple_is_unit_root(boundary_id, unit_specifier) result(is_root)
103 
104  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
105  integer(kind=kint), intent(in) :: unit_specifier
106  integer(kind=kint) :: is_root
107 
108  call hecmw_couple_is_unit_root_if(boundary_id, unit_specifier, is_root)
109 
110 end function hecmw_couple_is_unit_root
111 
112 !...
113 !...
114 !...
115 function hecmw_couple_is_unit_root_u(unit_id) result(is_root)
116 
117  character(len=HECMW_NAME_LEN), intent(in) :: unit_id
118  integer(kind=kint) :: is_root
119 
120  call hecmw_couple_is_unit_root_u_if(unit_id, is_root)
121 
122 end function hecmw_couple_is_unit_root_u
123 
124 !...
125 !...
126 !...
127 function hecmw_intercomm_get_size(boundary_id) result(psize)
128 
129  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
130  integer(kind=kint) :: psize
131 
132  call hecmw_intercomm_get_size_if(boundary_id, psize)
133 
134 end function hecmw_intercomm_get_size
135 
136 !...
137 !...
138 !...
139 function hecmw_intracomm_get_size(boundary_id, unit_specifier) result(psize)
140 
141  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
142  integer(kind=kint), intent(in) :: unit_specifier
143  integer(kind=kint) :: psize
144 
145  call hecmw_intracomm_get_size_if(boundary_id, unit_specifier, psize)
146 
147 end function hecmw_intracomm_get_size
148 
149 !...
150 !...
151 !...
152 function hecmw_intracomm_get_size_u(unit_id) result(psize)
153 
154  character(len=HECMW_NAME_LEN), intent(in) :: unit_id
155  integer(kind=kint) :: psize
156 
157  call hecmw_intracomm_get_size_u_if(unit_id, psize)
158 
159 end function hecmw_intracomm_get_size_u
160 
161 !...
162 !...
163 !...
164 function hecmw_intercomm_get_rank(boundary_id) result(rank)
165 
166  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
167  integer(kind=kint) :: rank
168 
169  call hecmw_intercomm_get_rank_if(boundary_id, rank)
170 
171 end function hecmw_intercomm_get_rank
172 
173 !...
174 !...
175 !...
176 function hecmw_intracomm_get_rank(boundary_id, unit_specifier) result(rank)
177 
178  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
179  integer(kind=kint), intent(in) :: unit_specifier
180  integer(kind=kint) :: rank
181 
182  call hecmw_intracomm_get_rank_if(boundary_id, unit_specifier, rank)
183 
184 end function hecmw_intracomm_get_rank
185 
186 !...
187 !...
188 !...
189 function hecmw_intracomm_get_rank_u(unit_id) result(rank)
190 
191  character(len=HECMW_NAME_LEN), intent(in) :: unit_id
192  integer(kind=kint) :: rank
193 
194  call hecmw_intracomm_get_rank_u_if(unit_id, rank)
195 
196 end function hecmw_intracomm_get_rank_u
197 
198 !...
199 !...
200 !...
201 function hecmw_intercomm_get_comm(boundary_id) result(comm)
202 
203  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
204  integer(kind=kint) :: comm
205 
206  call hecmw_intercomm_get_comm_if(boundary_id, comm)
207 
208 end function hecmw_intercomm_get_comm
209 
210 !...
211 !...
212 !...
213 function hecmw_intracomm_get_comm(boundary_id, unit_specifier) result(comm)
214 
215  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
216  integer(kind=kint), intent(in) :: unit_specifier
217  integer(kind=kint) :: comm
218 
219  call hecmw_intracomm_get_comm_if(boundary_id, unit_specifier, comm)
220 
221 end function hecmw_intracomm_get_comm
222 
223 !...
224 !...
225 !...
226 function hecmw_intracomm_get_comm_u(unit_id) result(comm)
227 
228  character(len=HECMW_NAME_LEN), intent(in) :: unit_id
229  integer(kind=kint) :: comm
230 
231  call hecmw_intracomm_get_comm_u_if(unit_id, comm)
232 
233 end function hecmw_intracomm_get_comm_u
234 
235 !...
236 !...
237 !...
238 function hecmw_intercomm_get_group(boundary_id) result(group)
239 
240  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
241  integer(kind=kint) :: group
242 
243  call hecmw_intercomm_get_group_if(boundary_id, group)
244 
245 end function hecmw_intercomm_get_group
246 
247 !...
248 !...
249 !...
250 function hecmw_intracomm_get_group(boundary_id, unit_specifier) result(group)
251 
252  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
253  integer(kind=kint), intent(in) :: unit_specifier
254  integer(kind=kint) :: group
255 
256  call hecmw_intracomm_get_group_if(boundary_id, unit_specifier, group)
257 
258 end function hecmw_intracomm_get_group
259 
260 !...
261 !...
262 !...
263 function hecmw_intracomm_get_group_u(boundary_id) result(group)
264 
265  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
266  integer(kind=kint) :: group
267 
268  call hecmw_intracomm_get_group_u_if(boundary_id, group)
269 
270 end function hecmw_intracomm_get_group_u
271 
272 end module hecmw_couple_info_f
273 
hecmw_intracomm_get_size_u_if
void hecmw_intracomm_get_size_u_if(char *unit_id, int *psize, int id_len)
Definition: hecmw_couple_info_if.c:287
hecmw_intercomm_get_size_if
void hecmw_intercomm_get_size_if(char *boundary_id, int *psize, int id_len)
Definition: hecmw_couple_info_if.c:230
hecmw_couple_info_f::hecmw_intercomm_get_rank
integer(kind=kint) function, public hecmw_intercomm_get_rank(boundary_id)
Definition: hecmw_couple_info_f.f90:165
hecmw_couple_info_f::hecmw_couple_is_unit_member
integer(kind=kint) function, public hecmw_couple_is_unit_member(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:66
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
hecmw_couple_get_unit_id_if
void hecmw_couple_get_unit_id_if(char *boundary_id, int *unit_specifier, char *buf, int *err, int id_len, int buf_len)
Definition: hecmw_couple_info_if.c:17
hecmw_intracomm_get_rank_u_if
void hecmw_intracomm_get_rank_u_if(char *unit_id, int *rank, int id_len)
Definition: hecmw_couple_info_if.c:370
hecmw_couple_info_f::hecmw_intracomm_get_rank_u
integer(kind=kint) function, public hecmw_intracomm_get_rank_u(unit_id)
Definition: hecmw_couple_info_f.f90:190
hecmw_couple_info_f::hecmw_intracomm_get_size_u
integer(kind=kint) function, public hecmw_intracomm_get_size_u(unit_id)
Definition: hecmw_couple_info_f.f90:153
hecmw_intracomm_get_group_u_if
void hecmw_intracomm_get_group_u_if(char *unit_id, int *group, int id_len)
Definition: hecmw_couple_info_if.c:538
hecmw_intracomm_get_comm_u_if
void hecmw_intracomm_get_comm_u_if(char *unit_id, int *comm, int id_len)
Definition: hecmw_couple_info_if.c:453
hecmw_intercomm_get_comm_if
void hecmw_intercomm_get_comm_if(char *boundary_id, int *comm, int id_len)
Definition: hecmw_couple_info_if.c:396
hecmw_couple_info_f::hecmw_couple_is_member
integer(kind=kint) function, public hecmw_couple_is_member(boundary_id)
Definition: hecmw_couple_info_f.f90:54
hecmw_couple_info_f::hecmw_couple_get_unit_id
subroutine, public hecmw_couple_get_unit_id(boundary_id, unit_specifier, unit_id)
Definition: hecmw_couple_info_f.f90:39
hecmw_couple_info_f::hecmw_couple_is_root
integer(kind=kint) function, public hecmw_couple_is_root(boundary_id)
Definition: hecmw_couple_info_f.f90:91
hecmw_couple_info_f::hecmw_intracomm_get_size
integer(kind=kint) function, public hecmw_intracomm_get_size(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:140
hecmw_couple_info_f::hecmw_couple_is_unit_member_u
integer(kind=kint) function, public hecmw_couple_is_unit_member_u(unit_id)
Definition: hecmw_couple_info_f.f90:79
hecmw_couple_info_f::hecmw_intracomm_get_group
integer(kind=kint) function, public hecmw_intracomm_get_group(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:251
hecmw_couple_info_f
Coupling Interface.
Definition: hecmw_couple_info_f.f90:7
hecmw_couple_info_f::hecmw_intercomm_get_group
integer(kind=kint) function, public hecmw_intercomm_get_group(boundary_id)
Definition: hecmw_couple_info_f.f90:239
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_intercomm_get_group_if
void hecmw_intercomm_get_group_if(char *boundary_id, int *group, int id_len)
Definition: hecmw_couple_info_if.c:480
hecmw_intracomm_get_group_if
void hecmw_intracomm_get_group_if(char *boundary_id, int *unit_specifier, int *group, int id_len)
Definition: hecmw_couple_info_if.c:508
hecmw_couple_info_f::hecmw_intracomm_get_rank
integer(kind=kint) function, public hecmw_intracomm_get_rank(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:177
hecmw_couple_info_f::hecmw_intercomm_get_size
integer(kind=kint) function, public hecmw_intercomm_get_size(boundary_id)
Definition: hecmw_couple_info_f.f90:128
hecmw_intracomm_get_comm_if
void hecmw_intracomm_get_comm_if(char *boundary_id, int *unit_specifier, int *comm, int id_len)
Definition: hecmw_couple_info_if.c:424
hecmw_couple_info_f::hecmw_intracomm_get_comm
integer(kind=kint) function, public hecmw_intracomm_get_comm(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:214
hecmw_couple_info_f::hecmw_intracomm_get_comm_u
integer(kind=kint) function, public hecmw_intracomm_get_comm_u(unit_id)
Definition: hecmw_couple_info_f.f90:227
hecmw_couple_info_f::hecmw_couple_is_unit_root
integer(kind=kint) function, public hecmw_couple_is_unit_root(boundary_id, unit_specifier)
Definition: hecmw_couple_info_f.f90:103
hecmw_couple_is_unit_root_if
void hecmw_couple_is_unit_root_if(char *boundary_id, int *unit_specifier, int *is_root, int id_len)
Definition: hecmw_couple_info_if.c:173
hecmw_couple_info_f::hecmw_intercomm_get_comm
integer(kind=kint) function, public hecmw_intercomm_get_comm(boundary_id)
Definition: hecmw_couple_info_f.f90:202
hecmw_couple_is_unit_memb_if
void hecmw_couple_is_unit_memb_if(char *boundary_id, int *unit_specifier, int *is_member, int id_len)
Definition: hecmw_couple_info_if.c:88
hecmw_intracomm_get_rank_if
void hecmw_intracomm_get_rank_if(char *boundary_id, int *unit_specifier, int *rank, int id_len)
Definition: hecmw_couple_info_if.c:341
hecmw_couple_is_root_if
void hecmw_couple_is_root_if(char *boundary_id, int *is_root, int id_len)
Definition: hecmw_couple_info_if.c:145
hecmw_couple_info_f::hecmw_intracomm_get_group_u
integer(kind=kint) function, public hecmw_intracomm_get_group_u(boundary_id)
Definition: hecmw_couple_info_f.f90:264
hecmw_couple_is_unit_root_u_if
void hecmw_couple_is_unit_root_u_if(char *unit_id, int *is_root, int id_len)
Definition: hecmw_couple_info_if.c:203
hecmw_couple_info_f::hecmw_couple_is_unit_root_u
integer(kind=kint) function, public hecmw_couple_is_unit_root_u(unit_id)
Definition: hecmw_couple_info_f.f90:116
hecmw_intercomm_get_rank_if
void hecmw_intercomm_get_rank_if(char *boundary_id, int *rank, int id_len)
Definition: hecmw_couple_info_if.c:313
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571
hecmw_couple_is_memb_if
void hecmw_couple_is_memb_if(char *boundary_id, int *is_member, int id_len)
Definition: hecmw_couple_info_if.c:60
hecmw_intracomm_get_size_if
void hecmw_intracomm_get_size_if(char *boundary_id, int *unit_specifier, int *psize, int id_len)
Definition: hecmw_couple_info_if.c:258
hecmw_couple_is_unit_memb_u_if
void hecmw_couple_is_unit_memb_u_if(char *unit_id, int *is_member, int id_len)
Definition: hecmw_couple_info_if.c:118