tem_commbuf_long_fillpos Subroutine

private subroutine tem_commbuf_long_fillpos(me, pos, nvals)

fill the positions that describe how the data in the state vector relates to the entries in the buffer.

Arguments

Type IntentOptional Attributes Name
type(tem_longbuffer_type), intent(inout) :: me
integer, intent(in) :: pos(nvals)
integer, intent(in) :: nvals

Source Code

  subroutine tem_commbuf_long_fillpos( me, pos, nvals )
    ! -------------------------------------------------------------------- !
    type(tem_longbuffer_type), intent(inout) :: me
    integer, intent(in) :: nvals
    integer, intent(in) :: pos(nvals)
    ! -------------------------------------------------------------------- !

    me%nvals = nvals

    if ( allocated(me%pos) ) deallocate(me%pos)
    allocate(me%pos(nvals))
    me%pos = pos

    if ( associated(me%val) ) deallocate(me%val)
    allocate(me%val(nvals))

  end subroutine tem_commbuf_long_fillpos