shelf_data_size Function

private pure function shelf_data_size(this)

Returns the number of elements in the ice shelf's state vector. This is the size of the vector returned by residual and state_vector and taken as an argument by update.

Arguments

Type IntentOptional AttributesName
class(ice_shelf), intent(in) :: this

Return Value integer

The number of elements in the ice shelf's state vector.


Contents

Source Code


Source Code

  pure function shelf_data_size(this)
    !* Author: Christopher MacMackin
    !  Date: August 2016
    !
    ! Returns the number of elements in the ice shelf's state vector.
    ! This is the size of the vector returned by [[ice_shelf:residual]]
    ! and [[ice_shelf:state_vector]] and taken as an argument by 
    ! [[ice_shelf:update]].
    !
    class(ice_shelf), intent(in) :: this
    integer                      :: shelf_data_size
      !! The number of elements in the ice shelf's state vector.
    shelf_data_size = this%thickness_size
#ifdef DEBUG
    call logger%debug('ice_shelf%data_size','Ice shelf has '//   &
                      trim(str(shelf_data_size))//' elements '// &
                      'in its state vector.')
#endif
  end function shelf_data_size