Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(depSource_type) | :: | me | ||||
type(dyn_intarray_type) | :: | sourceList | ||||
integer, | intent(in) | :: | mySources(n) | |||
integer, | intent(in) | :: | n |
subroutine depSource_append( me, sourceList, mySources, n ) ! --------------------------------------------------------------------------- type( depSource_type ) :: me type( dyn_intArray_type ) :: sourceList integer, intent(in) :: n integer, intent(in) :: mySources(n) ! --------------------------------------------------------------------------- integer :: iElem, posInSourceList ! --------------------------------------------------------------------------- ! initialize array for storing the positions of the source elements in ! the levelwise buffer call destroy( me = me%elem ) call init( me = me%elem, length = n ) call init( me = me%elemBuffer, length = n ) do iElem = 1, n ! Add the found element to the dependency element list call append( me = me%elem, & & val = mySources(iElem) ) ! Store to the levelwise source element list call append( me = sourceList, & & val = mySources(iElem), & & pos = posInSourceList ) ! ... and store the position in the levelwise source element ! list for each ghost dep call append( me = me%elemBuffer, & & val = posInSourceList ) end do end subroutine depSource_append