depSource_append Subroutine

public subroutine depSource_append(me, sourceList, mySources, n)

Arguments

Type IntentOptional Attributes Name
type(depSource_type) :: me
type(dyn_intarray_type) :: sourceList
integer, intent(in) :: mySources(n)
integer, intent(in) :: n

Calls

proc~~depsource_append~~CallsGraph proc~depsource_append depSource_append interface~append~11 append proc~depsource_append->interface~append~11 interface~destroy~25 destroy proc~depsource_append->interface~destroy~25 interface~init~24 init proc~depsource_append->interface~init~24 proc~append_ga_dynlong append_ga_dynlong interface~append~11->proc~append_ga_dynlong proc~append_ga_dynlong_vec append_ga_dynlong_vec interface~append~11->proc~append_ga_dynlong_vec proc~destroy_ga2d_real destroy_ga2d_real interface~destroy~25->proc~destroy_ga2d_real proc~init_ga2d_real init_ga2d_real interface~init~24->proc~init_ga2d_real interface~expand~9 expand proc~append_ga_dynlong->interface~expand~9 proc~append_ga_dynlong_vec->interface~expand~9 proc~expand_ga_dynlong expand_ga_dynlong interface~expand~9->proc~expand_ga_dynlong

Source Code

  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