block_shape_io Subroutine

public subroutine block_shape_io(igrid, n_ghost, ixOmin1, ixOmin2, ixOmin3, ixOmax1, ixOmax2, ixOmax3, n_values)

Uses

  • proc~~block_shape_io~~UsesGraph proc~block_shape_io block_shape_io module~mod_global_parameters mod_global_parameters proc~block_shape_io->module~mod_global_parameters module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_variables->module~mod_basic_types

Determine the shape of a block for output (whether to include ghost cells, and on which sides)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: igrid
integer, intent(out) :: n_ghost(2*ndim)

nghost(1:ndim) contains the number of ghost cells on the block's minimum boundaries, and nghost(ndim+1:2*ndim) on the block's maximum boundaries

integer, intent(out) :: ixOmin1

Index range on output block

integer, intent(out) :: ixOmin2

Index range on output block

integer, intent(out) :: ixOmin3

Index range on output block

integer, intent(out) :: ixOmax1

Index range on output block

integer, intent(out) :: ixOmax2

Index range on output block

integer, intent(out) :: ixOmax3

Index range on output block

integer, intent(out) :: n_values

Number of cells/values in output


Calls

proc~~block_shape_io~~CallsGraph proc~block_shape_io block_shape_io proc~count_ix count_ix proc~block_shape_io->proc~count_ix

Called by

proc~~block_shape_io~~CalledByGraph proc~block_shape_io block_shape_io proc~write_snapshot write_snapshot proc~write_snapshot->proc~block_shape_io proc~saveamrfile saveamrfile proc~saveamrfile->proc~write_snapshot proc~timeintegration timeintegration proc~timeintegration->proc~saveamrfile proc~main main proc~main->proc~timeintegration program~agile agile program~agile->proc~main

Source Code

  subroutine block_shape_io(igrid, n_ghost, ixOmin1,ixOmin2,ixOmin3,ixOmax1,&
     ixOmax2,ixOmax3, n_values)
    use mod_global_parameters

    integer, intent(in) :: igrid
    !> nghost(1:ndim) contains the number of ghost cells on the block's minimum
    !> boundaries, and nghost(ndim+1:2*ndim) on the block's maximum boundaries
    integer, intent(out) :: n_ghost(2*ndim)
    !> Index range on output block
    integer, intent(out) :: ixOmin1,ixOmin2,ixOmin3,ixOmax1,ixOmax2,ixOmax3
    !> Number of cells/values in output
    integer, intent(out) :: n_values

    integer            :: idim

    n_ghost(:) = 0

    if(save_physical_boundary) then
      do idim=1,ndim
        ! Include ghost cells on lower boundary
        if(ps(igrid)%is_physical_boundary(2*idim-1)) n_ghost(idim)=nghostcells
        ! Include ghost cells on upper boundary
        if(ps(igrid)%is_physical_boundary(2*idim)) &
           n_ghost(ndim+idim)=nghostcells
      end do
    end if

    ixOmin1 = ixMlo1 - n_ghost(1)
    ixOmin2 = ixMlo2 - n_ghost(2)
    ixOmin3 = ixMlo3 - n_ghost(3)
    ixOmax1 = ixMhi1 + n_ghost(ndim+1)
    ixOmax2 = ixMhi2 + n_ghost(ndim+2)
    ixOmax3 = ixMhi3 + n_ghost(ndim+3)

    n_values = count_ix(ixOmin1,ixOmin2,ixOmin3,ixOmax1,ixOmax2,ixOmax3) * nw

  end subroutine block_shape_io