FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_couple_copy_f2c_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
11 
12  implicit none
13  private
14  public :: hecmw_couple_copy_f2c
15 
16 contains
17 
18 subroutine hecmw_couple_copy_f2c(couple_value, ierr)
19 
20  type(hecmw_couple_value), intent(inout) :: couple_value
21  integer(kind=kint), intent(inout) :: ierr
22  character(len=100) :: sname, vname
23 
24  sname = "hecmw_couple_value"
25 
26  vname = "n"
27  call hecmw_cpl_copy_f2c_set_if(sname, vname, couple_value%n, ierr)
28  if(ierr /= 0) return
29 
30  vname = "item_type"
31  call hecmw_cpl_copy_f2c_set_if(sname, vname, couple_value%item_type, ierr)
32  if(ierr /= 0) return
33 
34  vname = "n_dof"
35  call hecmw_cpl_copy_f2c_set_if(sname, vname, couple_value%n_dof, ierr)
36  if(ierr /= 0) return
37 
38  if(couple_value%n > 0) then
39  if(associated(couple_value%item)) then
40  vname = "item"
41  call hecmw_cpl_copy_f2c_set_if(sname, vname, couple_value%item, ierr)
42  if(ierr /= 0) return
43  endif
44  endif
45 
46  if(couple_value%n > 0 .AND. couple_value%n_dof > 0) then
47  if(associated(couple_value%value)) then
48  vname = "value"
49  call hecmw_cpl_copy_f2c_set_if(sname, vname, couple_value%value, ierr)
50  if(ierr /= 0) return
51  endif
52  endif
53 
54 end subroutine hecmw_couple_copy_f2c
55 
56 end module hecmw_couple_copy_f2c_f
hecmw_couple_copy_f2c_f
Coupling Interface.
Definition: hecmw_couple_copy_f2c_f.f90:7
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_couple_copy_f2c_f::hecmw_couple_copy_f2c
subroutine, public hecmw_couple_copy_f2c(couple_value, ierr)
Definition: hecmw_couple_copy_f2c_f.f90:19
hecmw_couple_struct_f
Coupling Interface.
Definition: hecmw_couple_struct_f.f90:7
hecmw_couple_value
Definition: hecmw_couple_startup.h:9
hecmw_cpl_copy_f2c_set_if
void hecmw_cpl_copy_f2c_set_if(char *struct_name, char *var_name, void *src, int *err, int slen, int vlen)
Definition: hecmw_couple_copy_f2c.c:127