FrontISTR  5.7.0
Large-scale structural analysis program with finit element method
hecmw_adapt_get_new_cell_info.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 
7 !C
8 !C***
9 !C*** hecmw_adapt_GET_NEW_CELL_INFO
10 !C***
11 !C
12 !C get new CELL info.
13 !C
14 subroutine hecmw_adapt_get_new_cell_info (hecMESH)
15 
16  use hecmw_util
17  implicit real*8 (a-h,o-z)
18 
19  integer(kind=kint), dimension(:), allocatable :: IW1
20  type (hecmwST_local_mesh) :: hecMESH
21 
22  allocate (iw1(hecmesh%n_elem))
23  do neib= 1, hecmesh%n_neighbor_pe
24  icou= 0
25  neib0= hecmesh%neighbor_pe(neib)
26  do icel= 1, hecmesh%n_elem
27  ic1= hecmesh%elem_ID(2*icel)
28  if (ic1.eq.neib0 .and. hecmesh%adapt_type(icel).ne.0) then
29  is= hecmesh%adapt_children_index(icel-1) + 1
30  ie= hecmesh%adapt_children_index(icel)
31  ics= hecmesh%adapt_children_local(is)
32  if (hecmesh%when_i_was_refined_elem(ics).eq. &
33  & hecmesh%n_adapt) then
34  do k= is, ie
35  if (hecmesh%adapt_children_item(2*k-1).ne.0) then
36  icou = icou + 1
37  iw1(icou)= hecmesh%adapt_children_item(2*k-1)
38  endif
39  enddo
40  endif
41  endif
42  enddo
43 
44  icou= 0
45  do icel= 1, hecmesh%n_elem
46  ic1= hecmesh%elem_ID(2*icel)
47  ic2= hecmesh%when_i_was_refined_elem(icel)
48  if (ic1.eq.neib0 .and. ic2.eq.hecmesh%n_adapt) then
49  icou= icou + 1
50  hecmesh%elem_ID(2*icel-1)= iw1(icou)
51  endif
52  enddo
53  enddo
54 
55  deallocate (iw1)
56 
57 end subroutine hecmw_adapt_get_new_cell_info
58 
59 
hecmw_util
I/O and Utility.
Definition: hecmw_util_f.F90:7
hecmw_adapt_get_new_cell_info
subroutine hecmw_adapt_get_new_cell_info(hecMESH)
Adaptive Mesh Refinement.
Definition: hecmw_adapt_get_new_cell_info.f90:15