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