diff --git a/src/blocks.F90 b/src/blocks.F90 index 981e4cb..7464107 100644 --- a/src/blocks.F90 +++ b/src/blocks.F90 @@ -113,6 +113,10 @@ module blocks ! 0 - do nothing ! 1 - refine + integer(kind=4) :: coord(ndims) ! coordinate of the lower +! corner in the effective +! resolution + logical :: leaf ! leaf flag real(kind=8) :: xmin, xmax ! bounds for the x direction @@ -317,6 +321,10 @@ module blocks pmeta%refine = 0 pmeta%leaf = .false. +! initialize the coordinate +! + pmeta%coord(:) = 0 + ! initialize bounds of the block ! pmeta%xmin = 0.0 @@ -740,6 +748,35 @@ module blocks ! !=============================================================================== ! +! metablock_set_coord: subroutine sets the coordinates of the meta block +! +!=============================================================================== +! + subroutine metablock_set_coord(pmeta, px, py, pz) + + implicit none + +! input/output arguments +! + type(block_meta), pointer, intent(inout) :: pmeta + integer(kind=4) , intent(in) :: px, py, pz +! +!------------------------------------------------------------------------------- +! +! set the coordintaes +! + pmeta%coord(1) = px + pmeta%coord(2) = py +#if NDIMS == 3 + pmeta%coord(3) = pz +#endif /* NDIMS == 3 */ + +!------------------------------------------------------------------------------- +! + end subroutine metablock_set_coord +! +!=============================================================================== +! ! metablock_setbounds: subroutine sets the bounds of data block ! !===============================================================================