seg_append Subroutine

public subroutine seg_append(se0, se1, sy0, sy1, ns, e0, e1, y0, y1)

Append one outline segment, growing by doubling.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), allocatable :: se0(:)

Strip edge of each segment's first and second end.

integer(kind=int32), intent(inout), allocatable :: se1(:)

Strip edge of each segment's first and second end.

real(kind=real64), intent(inout), allocatable :: sy0(:)

y of each segment's first and second end.

real(kind=real64), intent(inout), allocatable :: sy1(:)

y of each segment's first and second end.

integer(kind=int32), intent(inout) :: ns

Number of segments, incremented.

integer(kind=int32), intent(in) :: e0

Strip edges of new segment's ends.

integer(kind=int32), intent(in) :: e1

Strip edges of new segment's ends.

real(kind=real64), intent(in) :: y0

y of new segment's ends.

real(kind=real64), intent(in) :: y1

y of new segment's ends.


Source Code

   subroutine seg_append(se0, se1, sy0, sy1, ns, e0, e1, y0, y1)
      !! Append one outline segment, growing by doubling.
      ! Arguments
      integer(int32), allocatable, intent(inout) :: se0(:), se1(:)
         !! Strip edge of each segment's first and second end.
      real(real64), allocatable, intent(inout) :: sy0(:), sy1(:)
         !! y of each segment's first and second end.
      integer(int32), intent(inout) :: ns
         !! Number of segments, incremented.
      integer(int32), intent(in)    :: e0, e1
         !! Strip edges of new segment's ends.
      real(real64), intent(in)    :: y0, y1
         !! y of new segment's ends.
      ns = ns + 1
      call grow_i32(se0, ns); call grow_i32(se1, ns)
      call grow_r64(sy0, ns); call grow_r64(sy1, ns)
      se0(ns) = e0; se1(ns) = e1
      sy0(ns) = y0; sy1(ns) = y1
   end subroutine seg_append