Write element information to disk
Type | Intent | Optional | 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 |
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