Write element information to disk
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_stencilElement_type), | intent(in) | :: | me |
stencil element to be dumped |
||
integer, | intent(in) | :: | nUnit |
unit to dump to |
||
integer(kind=long_k), | intent(in), | optional, | allocatable | :: | neighID(:) |
neighbor ID |
logical, | intent(in), | optional | :: | tIDonly |
only use tree IDs |
subroutine tem_stencilElement_dump( me, nUnit, neighID, tIDonly )
! -------------------------------------------------------------------- !
!> stencil element to be dumped
type( tem_stencilElement_type ), intent(in) :: me
!> unit to dump to
integer, intent(in) :: nUnit
!> neighbor ID
integer(kind=long_k), allocatable, intent(in), optional :: neighID(:)
!> only use tree IDs
logical, intent(in), optional :: tIDonly
! -------------------------------------------------------------------- !
integer :: iVal
logical :: tIDonly_loc
integer(kind=long_k) :: treeIDs( me%QQN )
! -------------------------------------------------------------------- !
if( present( tIDonly )) then
tIDonly_loc = tIDonly
else
tIDonly_loc = .false.
endif
write(nUnit, "(' QQN: ', I2, ', headerPos: ', I0 )" ) me%QQN, me%headerPos
if ( present(neighID) ) then
if ( allocated(neighID) .and. allocated(me%tIDpos) ) then
! get neighIDs
do iVal=1,size(me%tIDpos)
if ( me%tIDpos(iVal) == 0 ) then
treeIDs(iVal) = 0
else
treeIDs(iVal) = neighID( me%tIDpos(iVal) )
end if
end do
call tem_printArray( treeIDs, 8, 'neighIDs', 120, nUnit)
end if
end if
end subroutine tem_stencilElement_dump