ndarray_oc_unpack Subroutine

public subroutine ndarray_oc_unpack(this, z, flags)

Subroutine to unpack a flatarray after receiving

Arguments

Type IntentOptional AttributesName
class(ndarray_oc), intent(inout) :: this
real(kind=pfdp), intent(in) :: z(:)
integer, intent(in), optional :: flags

Contents

Source Code


Source Code

  subroutine ndarray_oc_unpack(this, z, flags)
    class(ndarray_oc), intent(inout) :: this
    real(pfdp),  intent(in   )        :: z(:)
    integer,     intent(in   ), optional :: flags
    integer :: which

    which = 0
    if (present(flags)) which = flags

    select case (which)
    case (0)
       stop "ERROR in ndarray_oc_unpack: only 1, 2 allowed as flags"
    case (1)
       this%yflatarray = z
    case (2)
       this%pflatarray = z 
    case default
       stop "ERROR in ndarray_oc_upack: only 1, 2 allowed as flags"
    end select
  end subroutine ndarray_oc_unpack