tem_element_dump Subroutine

public subroutine tem_element_dump(me, elemPos, nUnit, compact, header, stencil)

Write element information to disk

Arguments

Type IntentOptional Attributes Name
type(tem_element_type), intent(in) :: me

element object

integer, intent(in) :: elemPos
integer, intent(in) :: nUnit
logical, intent(in), optional :: compact
logical, intent(in), optional :: header
logical, intent(in), optional :: stencil

Whether to write stencil information


Calls

proc~~tem_element_dump~~CallsGraph proc~tem_element_dump tem_element_dump interface~tem_stencil_dump tem_stencil_dump proc~tem_element_dump->interface~tem_stencil_dump proc~tem_stencilheader_dump tem_stencilHeader_dump interface~tem_stencil_dump->proc~tem_stencilheader_dump proc~tem_stencilelement_dump tem_stencilElement_dump interface~tem_stencil_dump->proc~tem_stencilelement_dump interface~tem_tostr tem_toStr proc~tem_stencilheader_dump->interface~tem_tostr proc~tem_printarray tem_printArray proc~tem_stencilelement_dump->proc~tem_printarray proc~tem_d2str tem_d2str interface~tem_tostr->proc~tem_d2str proc~tem_r2str_arr tem_r2str_arr interface~tem_tostr->proc~tem_r2str_arr proc~tem_i2str_arr tem_i2str_arr interface~tem_tostr->proc~tem_i2str_arr proc~tem_b2str_arr tem_b2str_arr interface~tem_tostr->proc~tem_b2str_arr proc~tem_l2str tem_l2str interface~tem_tostr->proc~tem_l2str proc~tem_r2str tem_r2str interface~tem_tostr->proc~tem_r2str proc~tem_b2str tem_b2str interface~tem_tostr->proc~tem_b2str proc~tem_i2str tem_i2str interface~tem_tostr->proc~tem_i2str proc~tem_d2str_arr tem_d2str_arr interface~tem_tostr->proc~tem_d2str_arr proc~tem_l2str_arr tem_l2str_arr interface~tem_tostr->proc~tem_l2str_arr

Called by

proc~~tem_element_dump~~CalledByGraph proc~tem_element_dump tem_element_dump proc~tem_elemlist_dump tem_elemList_dump proc~tem_elemlist_dump->proc~tem_element_dump proc~build_levelelements build_levelElements proc~build_levelelements->proc~tem_elemlist_dump proc~communicate_elements communicate_elements proc~communicate_elements->proc~tem_elemlist_dump proc~tem_init_elemlevels tem_init_elemLevels proc~tem_init_elemlevels->proc~tem_elemlist_dump proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~build_levelelements proc~tem_find_allelements->proc~communicate_elements proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_init_elemlevels proc~tem_create_leveldesc->proc~tem_find_allelements proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc

Contents

Source Code


Source Code

  subroutine tem_element_dump( me, elemPos, nUnit, compact, header, stencil )
    ! ---------------------------------------------------------------------------
    !> element object
    type( tem_element_type ), intent(in) :: me
    !>
    integer, intent(in) :: elemPos
    !>
    integer, intent(in) :: nUnit
    !>
    logical, intent(in), optional :: compact
    !>
    logical, intent(in), optional :: header
    !> Whether to write stencil information
    logical, intent(in), optional :: stencil
    ! ---------------------------------------------------------------------------
    integer :: iStencil
    logical :: locCompact, locStencil
    ! ---------------------------------------------------------------------------

    locStencil = .false.
    if( present( stencil )) then
      locStencil = stencil
    endif

    if( present( compact )) then
      locCompact = compact
    else
      locCompact = .true.
    endif

    if( locCompact ) then
      ! in compact format
      if( present( header )) then
        if( header ) then
          write(nUnit,'(a10,6(a8))') 'treeID', 'prop', 'eType', 'process',&
            &                        'haloNst', 'pntTID', 'stencil'
        endif
      endif
      write(nUnit,'(I10,I8,A12,4I8)') me%tID%val( elemPos ),                  &
        &                      me%property%val( elemPos ),                     &
        &                      eT_labels(me%eType%val( elemPos )),             &
        &                      me%sourceProc%val( elemPos ),                   &
        &                      me%haloNesting%val( elemPos ),                  &
        &                      me%pntTID%val( elemPos ),                       &
        &                      me%stencil%val( elemPos )%nVals
    else
      ! in detailed format
      write(nUnit,"(A)")    '---------------------------------------------'
      write(nUnit,"(A)")    'Element'
      write(nUnit,"(A,I0)") '   treeID      ', me%tID%val( elemPos )
      write(nUnit,"(A,I0)") '   property    ', me%property%val( elemPos )
      write(nUnit,"(A,A)")  '   eType       ', eT_labels(me%eType%val( elemPos ))
      write(nUnit,"(A,I0)") '   srcProc     ', me%sourceProc%val( elemPos )
      write(nUnit,"(A,I0)") '   haloNesting ', me%haloNesting%val( elemPos )
      write(nUnit,"(A)")    '---------------------------------------------'
    end if

    if ( locStencil ) then
      do iStencil = 1, me%stencil%val( elemPos )%nVals
        call tem_stencil_dump(                                         &
          &       me      = me%stencil%val( elemPos )%val( iStencil ), &
          &       nUnit   = nUnit,                                     &
          &       neighID = me%neighID%val( elemPos )%val,             &
          &       tIDonly = .false. )
      end do
    end if

  end subroutine tem_element_dump