FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_couple_startup_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
13 
14  implicit none
15  private
16  public :: hecmw_couple_startup
18 
19 contains
20 
21 subroutine hecmw_couple_startup(boundary_id, couple_value)
22 
23  character(len=HECMW_NAME_LEN), intent(in) :: boundary_id
24  type(hecmw_couple_value), intent(out) :: couple_value
25  integer(kind=kint) :: ierr
26 
27  call hecmw_couple_startup_init_if(boundary_id, ierr)
28  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
29 
30  call hecmw_couple_copy_c2f(couple_value, ierr)
31  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
32 
34  if(ierr /= 0) call hecmw_abort(hecmw_comm_get_comm())
35 
36 end subroutine hecmw_couple_startup
37 
38 
39 subroutine hecmw_couple_print_couple_value(couple_value)
40 
41  type(hecmw_couple_value), intent(in) :: couple_value
42  integer(kind=kint) :: ierr, i, j
43 
44  write(unit=*,fmt="(a)") "*** Value of coupling area"
45 
46  write(unit=*,fmt="(a,i)") "number of item: ", couple_value%n
47 
48  if(couple_value%item_type == hecmw_couple_node_group) then
49  write(unit=*,fmt="(a)") "item type: NODE GROUP"
50  else if(couple_value%item_type == hecmw_couple_element_group) then
51  write(unit=*,fmt="(a)") "item type: ELEMENT GROUP"
52  else if(couple_value%item_type == hecmw_couple_surface_group) then
53  write(unit=*,fmt="(a)") "item type: SURFACE GROUP"
54  else
55  write(unit=*,fmt="(a)") "item type: UNKNOWN"
56  endif
57 
58  write(unit=*,fmt="(a,i)") "number of DOF: ", couple_value%n_dof
59 
60  write(unit=*,fmt="(a)") "ID & value:"
61  do i= 1, couple_value%n
62  if(couple_value%item_type == hecmw_couple_surface_group) then
63  write(unit=*,fmt="(2i)",advance="NO") couple_value%item(2*i-1), couple_value%item(2*i)
64  else
65  write(unit=*,fmt="(i)",advance="NO") couple_value%item(i)
66  endif
67 
68  do j= 1, couple_value%n_dof
69  write(unit=*,fmt="(e15.7)",advance="NO") couple_value%value(couple_value%n_dof*(i-1)+j)
70  enddo
71  write(unit=*,fmt="(/)",advance="NO")
72  enddo
73 
75 
76 end module hecmw_couple_startup_f
hecmw_couple_define_f::hecmw_couple_node_group
integer(kind=kint), parameter, public hecmw_couple_node_group
Definition: hecmw_couple_define_f.f90:28
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
hecmw_couple_copy_c2f_f::hecmw_couple_copy_c2f
subroutine, public hecmw_couple_copy_c2f(couple_value, ierr)
Definition: hecmw_couple_copy_c2f_f.f90:20
hecmw_couple_startup_f::hecmw_couple_print_couple_value
subroutine, public hecmw_couple_print_couple_value(couple_value)
Definition: hecmw_couple_startup_f.f90:40
hecmw_couple_startup_f
Coupling Interface.
Definition: hecmw_couple_startup_f.f90:7
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_couple_define_f::hecmw_couple_surface_group
integer(kind=kint), parameter, public hecmw_couple_surface_group
Definition: hecmw_couple_define_f.f90:30
hecmw_couple_struct_f
Coupling Interface.
Definition: hecmw_couple_struct_f.f90:7
hecmw_couple_startup_final_if
void hecmw_couple_startup_final_if(int *err)
Definition: hecmw_couple_startup_if.c:49
hecmw_couple_value
Definition: hecmw_couple_startup.h:9
hecmw_couple_define_f
Coupling Interface.
Definition: hecmw_couple_define_f.f90:7
hecmw_couple_startup_init_if
void hecmw_couple_startup_init_if(char *boundary_id, int *err, int len)
Definition: hecmw_couple_startup_if.c:20
hecmw_couple_startup_f::hecmw_couple_startup
subroutine, public hecmw_couple_startup(boundary_id, couple_value)
Definition: hecmw_couple_startup_f.f90:22
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571
hecmw_couple_copy_c2f_f
Coupling Interface.
Definition: hecmw_couple_copy_c2f_f.f90:7
hecmw_couple_define_f::hecmw_couple_element_group
integer(kind=kint), parameter, public hecmw_couple_element_group
Definition: hecmw_couple_define_f.f90:29