FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_couple_init_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
14 
15  implicit none
16  private
17  public :: hecmw_couple_init
18 
19 contains
20 
21 subroutine hecmw_couple_init(boundary_id, mesh_unit1, mesh_unit2)
22 
23  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
24  type(hecmwst_local_mesh), intent(inout) :: mesh_unit1
25  type(hecmwst_local_mesh), intent(inout) :: mesh_unit2
26  integer(kind=kint) :: is_unit1_memb, is_unit2_memb
27  integer(kind=kint) :: ierr
28 
29  is_unit1_memb = hecmw_couple_is_unit_member(boundary_id, hecmw_couple_unit1)
30  is_unit2_memb = hecmw_couple_is_unit_member(boundary_id, hecmw_couple_unit2)
31  if(is_unit1_memb < 0 .or. is_unit2_memb < 0) call hecmw_abort(hecmw_comm_get_comm())
32 
33  if(is_unit1_memb == 1) then
35  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
36 
37  call hecmw_dist_copy_f2c(mesh_unit1, ierr)
38  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
39  endif
40 
41  if(is_unit2_memb == 1) then
43  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
44 
45  call hecmw_dist_copy_f2c(mesh_unit2, ierr)
46  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
47  endif
48 
49  call hecmw_couple_init_if(boundary_id, ierr)
50  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
51 
53  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
54 
55 ! if(is_unit1_memb == 1) then
56 ! mesh_unit1%PETOT = hecmw_intracomm_get_size(boundary_id, HECMW_COUPLE_UNIT1)
57 ! mesh_unit1%my_rank = hecmw_intracomm_get_rank(boundary_id, HECMW_COUPLE_UNIT1)
58 ! mesh_unit1%MPI_COMM = hecmw_intracomm_get_comm(boundary_id, HECMW_COUPLE_UNIT1)
59 ! if(mesh_unit1%my_rank == 0) then
60 ! mesh_unit1%zero = 1
61 ! else
62 ! mesh_unit1%zero = 0
63 ! endif
64 ! endif
65 !
66 ! if(is_unit2_memb == 1) then
67 ! mesh_unit2%PETOT = hecmw_intracomm_get_size(boundary_id, HECMW_COUPLE_UNIT2)
68 ! mesh_unit2%my_rank = hecmw_intracomm_get_rank(boundary_id, HECMW_COUPLE_UNIT2)
69 ! mesh_unit2%MPI_COMM = hecmw_intracomm_get_comm(boundary_id, HECMW_COUPLE_UNIT2)
70 ! if(mesh_unit2%my_rank == 0) then
71 ! mesh_unit2%zero = 1
72 ! else
73 ! mesh_unit2%zero = 0
74 ! endif
75 ! endif
76 
77 end subroutine hecmw_couple_init
78 
79 end module hecmw_couple_init_f
80 
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_init_final_if
void hecmw_couple_init_final_if(int *err)
Definition: hecmw_couple_init_if.c:149
hecmw_couple_info_f
Coupling Interface.
Definition: hecmw_couple_info_f.f90:7
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_util::hecmwst_local_mesh
Definition: hecmw_util_f.F90:234
hecmw_couple_define_f::hecmw_couple_unit1
integer(kind=kint), parameter, public hecmw_couple_unit1
Definition: hecmw_couple_define_f.f90:20
hecmw_couple_init_f
Coupling Interface.
Definition: hecmw_couple_init_f.f90:7
hecmw_dist_free_f
I/O and Utility.
Definition: hecmw_dist_free_f.f90:7
hecmw_couple_init_init_if
void hecmw_couple_init_init_if(int *unit_specifier, int *err)
Definition: hecmw_couple_init_if.c:119
hecmw_couple_init_f::hecmw_couple_init
subroutine, public hecmw_couple_init(boundary_id, mesh_unit1, mesh_unit2)
Definition: hecmw_couple_init_f.f90:22
hecmw_couple_define_f::hecmw_couple_unit2
integer(kind=kint), parameter, public hecmw_couple_unit2
Definition: hecmw_couple_define_f.f90:21
hecmw_dist_copy_f2c_f
I/O and Utility memo) Intel 9 compiler generates codes to waste stack memory when an array of string ...
Definition: hecmw_dist_copy_f2c_f.f90:12
hecmw_couple_define_f
Coupling Interface.
Definition: hecmw_couple_define_f.f90:7
hecmw_couple_init_if
void hecmw_couple_init_if(char *boundary_id, int *err, int len)
Definition: hecmw_couple_init_if.c:94
hecmw_dist_copy_f2c_f::hecmw_dist_copy_f2c
subroutine, public hecmw_dist_copy_f2c(mesh, ierr)
Definition: hecmw_dist_copy_f2c_f.f90:24
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571