G.1.14 Update_DV_Mathematic_Vector Procedure

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

  subroutine Update_DV_Mathematic_Vector (MV)

    ! Input/Output variable.
    type(Mathematic_Vector_type), intent(inout) :: MV ! Variable to be set.
    ! Verify requirements.
    VERIFY(Valid_State(MV),5)                          ! MV is valid.

    ! Check to see if the DV needs to be updated.

    if (.not. MV%DV_is_Updated) then

      if (.not.Initialized(MV%DV)) then
        call Initialize (MV%DV, MV%Structure, MV%Dimensionality, &
      end if
      MV%DV = MV%Values

    end if

    ! Set the updated? variable.

    MV%DV_is_Updated = .true.

    ! Verify guarantees.

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

  end subroutine Update_DV_Mathematic_Vector

Michael L. Hall