FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_couple_cleanup_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
12 
13  implicit none
14  private
15  public :: hecmw_couple_cleanup
16 
17 contains
18 
19 subroutine hecmw_couple_cleanup(couple_value)
20 
21  type(hecmw_couple_value), intent(inout) :: couple_value
22  integer(kind=kint) :: ista
23 
24  if(associated(couple_value%item)) then
25  deallocate(couple_value%item, stat=ista)
26  if(ista > 0) call hecmw_abort(hecmw_comm_get_comm())
27  endif
28 
29  if(associated(couple_value%value)) then
30  deallocate(couple_value%value, stat=ista)
31  if(ista > 0) call hecmw_abort(hecmw_comm_get_comm())
32  endif
33 
34  couple_value%n = 0
35  couple_value%item_type = hecmw_couple_group_undef
36  couple_value%n_dof = 0
37  nullify(couple_value%item)
38  nullify(couple_value%value)
39 
40 end subroutine hecmw_couple_cleanup
41 
42 end module hecmw_couple_cleanup_f
hecmw_couple_cleanup_f
Coupling Interface.
Definition: hecmw_couple_cleanup_f.f90:7
hecmw_util::hecmw_abort
subroutine hecmw_abort(comm)
Definition: hecmw_util_f.F90:534
hecmw_couple_cleanup_f::hecmw_couple_cleanup
subroutine, public hecmw_couple_cleanup(couple_value)
Definition: hecmw_couple_cleanup_f.f90:20
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
m_fstr::ista
integer(kind=kint), parameter ista
Definition: m_fstr.f90:108
hecmw_couple_struct_f
Coupling Interface.
Definition: hecmw_couple_struct_f.f90:7
hecmw_couple_value
Definition: hecmw_couple_startup.h:9
hecmw_couple_define_f
Coupling Interface.
Definition: hecmw_couple_define_f.f90:7
hecmw_couple_define_f::hecmw_couple_group_undef
integer(kind=kint), parameter, public hecmw_couple_group_undef
Definition: hecmw_couple_define_f.f90:27
hecmw_util::hecmw_comm_get_comm
integer(kind=kint) function hecmw_comm_get_comm()
Definition: hecmw_util_f.F90:571