tem_dumpTreeIDlists Subroutine

public subroutine tem_dumpTreeIDlists(minlevel, maxLevel, LD)

output all level-wise treeIDs in a clean way

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: minlevel

minimum level of the global tree

integer, intent(in) :: maxLevel

minimum level of the global tree

type(tem_levelDesc_type), intent(in) :: LD(minlevel:maxLevel)

level descriptor


Calls

proc~~tem_dumptreeidlists~~CallsGraph proc~tem_dumptreeidlists tem_dumpTreeIDlists proc~tem_horizontalspacer tem_horizontalSpacer proc~tem_dumptreeidlists->proc~tem_horizontalspacer proc~print_nelems print_nElems proc~tem_dumptreeidlists->proc~print_nelems proc~tem_printarray tem_printArray proc~tem_dumptreeidlists->proc~tem_printarray

Contents

Source Code


Source Code

  subroutine tem_dumpTreeIDlists( minLevel, maxLevel, LD )
    ! ---------------------------------------------------------------------------
    !> minimum level of the global tree
    integer, intent(in) :: minlevel, maxLevel
    !> level descriptor
    type(tem_levelDesc_type), intent(in) :: LD(minlevel:maxLevel)
    ! ---------------------------------------------------------------------------
    integer :: iLevel, first, last
    ! ---------------------------------------------------------------------------

    call tem_horizontalSpacer( dbgUnit(3), 2 )
    write(dbgUnit(3),*) '           Level Descriptor'
    call tem_horizontalSpacer( dbgUnit(3) )

    do iLevel = minLevel, maxLevel

      write(dbgUnit(3),"(A,I0)") '   Level: ', iLevel
      write(dbgUnit(3),"(A,I0)") '  nElems: ', LD(iLevel)%nElems
      call print_nElems( LD(iLevel)%elem%nElems(eT_minRelevant:eT_maxRelevant),&
        &                dbgUnit(5) )

      first = LD(iLevel)%offset(1,eT_fluid) + 1
      last  = LD(iLevel)%offset(2,eT_fluid)
      call tem_printArray( title = 'fluid',                     &
        &                  me = LD(iLevel)%total( first:last ), &
        &                  itemLength = 10,                     &
        &                  lineLength = 120,                    &
        &                  nUnit = dbgUnit(3)                   )

      if ( LD(iLevel)%elem%nElems( eT_ghostFromCoarser ) > 0 ) then
        first = LD(iLevel)%offset(1,eT_ghostFromCoarser) + 1
        last  = LD(iLevel)%offset(2,eT_ghostFromCoarser)
        call tem_printArray( title = 'ghostFromCoarser',          &
          &                  me = LD(iLevel)%total( first:last ), &
          &                  itemLength = 10,                     &
          &                  lineLength = 120,                    &
          &                  nUnit = dbgUnit(3)                   )
      end if

      if ( LD(iLevel)%elem%nElems( eT_ghostFromFiner ) > 0 ) then
        first = LD(iLevel)%offset(1,eT_ghostFromFiner) + 1
        last  = LD(iLevel)%offset(2,eT_ghostFromFiner)
        call tem_printArray( title = 'ghostFromFiner',          &
          &                  me = LD(iLevel)%total( first:last ), &
          &                  itemLength = 10,                     &
          &                  lineLength = 120,                    &
          &                  nUnit = dbgUnit(3)                   )
      end if

      if ( LD(iLevel)%elem%nElems( eT_halo ) > 0 ) then
        first = LD(iLevel)%offset(1,eT_halo) + 1
        last  = LD(iLevel)%offset(2,eT_halo)
        call tem_printArray( title = 'halo',          &
          &                  me = LD(iLevel)%total( first:last ), &
          &                  itemLength = 10,                     &
          &                  lineLength = 120,                    &
          &                  nUnit = dbgUnit(3)                   )
      end if
    end do ! iLevel

  end subroutine tem_dumpTreeIDlists