MESH: Build data block list after each mesh update.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-12-07 20:51:22 -03:00
parent e20cd5de6c
commit ddb9c83608

View File

@ -202,7 +202,7 @@ module mesh
use blocks , only : link_blocks, unlink_blocks, refine_block use blocks , only : link_blocks, unlink_blocks, refine_block
use blocks , only : get_mblocks, get_nleafs use blocks , only : get_mblocks, get_nleafs
use blocks , only : set_neighbors_refine use blocks , only : set_neighbors_refine
use blocks , only : build_leaf_list use blocks , only : build_leaf_list, build_datablock_list
#ifdef DEBUG #ifdef DEBUG
use blocks , only : check_neighbors use blocks , only : check_neighbors
#endif /* DEBUG */ #endif /* DEBUG */
@ -483,6 +483,10 @@ module mesh
! !
100 continue 100 continue
! update the vector of data blocks
!
call build_datablock_list(status)
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
end subroutine generate_mesh end subroutine generate_mesh
@ -505,19 +509,14 @@ module mesh
! !
subroutine update_mesh(status) subroutine update_mesh(status)
! import external procedures and variables use blocks, only : block_data, list_data
! use blocks, only : build_leaf_list, build_datablock_list
use blocks, only : build_leaf_list
#ifdef DEBUG #ifdef DEBUG
use blocks, only : check_neighbors use blocks, only : check_neighbors
#endif /* DEBUG */ #endif /* DEBUG */
! local variables are not implicit by default
!
implicit none implicit none
! subroutine arguments
!
integer, intent(out) :: status integer, intent(out) :: status
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
@ -562,10 +561,12 @@ module mesh
call check_neighbors() call check_neighbors()
#endif /* DEBUG */ #endif /* DEBUG */
! error entry point
!
100 continue 100 continue
! update the vector of data blocks
!
call build_datablock_list(status)
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
end subroutine update_mesh end subroutine update_mesh
@ -1901,16 +1902,17 @@ module mesh
integer , dimension(NDIMS) :: l, u integer , dimension(NDIMS) :: l, u
real(kind=8), dimension(NDIMS) :: du real(kind=8), dimension(NDIMS) :: du
real(kind=8), dimension(:,:,:), pointer, save :: tmp
integer :: nt = 0 integer :: nt = 0
!$ integer :: omp_get_thread_num !$ integer :: omp_get_thread_num
!$omp threadprivate(first, nt, tmp)
real(kind=8), dimension(:,:,:), pointer, save :: tmp
character(len=*), parameter :: loc = 'MESH::prolong_block()' character(len=*), parameter :: loc = 'MESH::prolong_block()'
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
!$ nt = omp_get_thread_num !$ nt = omp_get_thread_num()
status = 0 status = 0
if (first) then if (first) then