D.5.7 Get_Values_Assembled_Vector Procedure

The main documentation of the Get_Values_Assembled_Vector Procedure contains additional explanation of this code listing.

  define([GET_VALUES_ROUTINE],[
    pushdef([DIM], [$1])
    pushdef([Get_Values_Assembled_Vector_DIM], 
      expand(Get_Values_Assembled_Vector_DIM))

    subroutine Get_Values_Assembled_Vector_DIM (Values, AV)

      ! Input variable.
  
      type(Assembled_Vector_type), intent(in) :: AV ! Variable to be queried.
  
      ! Input/Output variable.
      
      type(real,DIM,np), intent(inout) :: Values   ! Values bare naked vector.
  
      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
      ! Verify requirements.
  
      VERIFY(Valid_State(AV),5)                               ! AV is valid.
      VERIFY(Valid_State_NP(Values) .or. this_is_not_IO_PE,5) ! Values is valid.
      ! Values shape check.
      VERIFY(SHAPE(Values) == SHAPE(AV%Values$1) .or. this_is_not_IO_PE,5)
      VERIFY($1 == AV%Dimensionality,5)   ! AV has been set up for this call.

      ! Get the value.
  
      if (this_is_IO_PE) Values = AV%Values$1
  
      ! Verify guarantees.

      VERIFY(Valid_State(AV),5)                            ! AV is still valid.

      return
    end subroutine Get_Values_Assembled_Vector_DIM

    popdef([DIM])
    popdef([Get_Values_Assembled_Vector_DIM])
  ])

  forloop([Dim],[1],[4],[
    GET_VALUES_ROUTINE(Dim)
  ])



Michael L. Hall