append_ga_ellipsoid Subroutine

private subroutine append_ga_ellipsoid(me, val, length)

Arguments

Type IntentOptional Attributes Name
type(grw_ellipsoidarray_type) :: me
type(tem_ellipsoid_type), intent(in) :: val
integer, intent(in), optional :: length

optional length to expand the array


Calls

proc~~append_ga_ellipsoid~2~~CallsGraph proc~append_ga_ellipsoid~2 append_ga_ellipsoid interface~expand~35 expand proc~append_ga_ellipsoid~2->interface~expand~35 proc~expand_ga_ellipsoid~2 expand_ga_ellipsoid interface~expand~35->proc~expand_ga_ellipsoid~2

Called by

proc~~append_ga_ellipsoid~2~~CalledByGraph proc~append_ga_ellipsoid~2 append_ga_ellipsoid interface~append~36 append interface~append~36->proc~append_ga_ellipsoid~2

Contents

Source Code


Source Code

  subroutine append_ga_ellipsoid(me, val, length)
    type(grw_ellipsoidarray_type) :: me !< array to append the value to
    type(tem_ellipsoid_type), intent(in) :: val !< value to append
    !> optional length to expand the array
    integer, intent(in), optional :: length

    ! value to append is larger than all existing ones,
    ! just put it to the end of the list, this captures
    ! also the case of empty lists.
    ! in this case foundpos = me%nvals + 1 holds.
    if (me%nvals+1 > me%containersize) then
      ! expand the array, if its boundary is reached
      call expand(me = me, length = length)
    end if

    me%nvals = me%nvals+1
    me%val(me%nvals) = val

  end subroutine append_ga_ellipsoid