# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
module heliarr
! an array of two helix convolutions
  use adj_mod
  use helicon
  implicit none
  type (filter), private :: aa1
  type (filter), private :: aa2
  integer, private :: nx
  contains
  subroutine heliarr_init ( nx_in,aa1_in,aa2_in )
    integer :: nx_in
    type (filter) :: aa1_in
    type (filter) :: aa2_in
    nx = nx_in
    aa1 = aa1_in
    aa2 = aa2_in
  end subroutine
  function heliarr_lop ( adj, add, xx, yy) result(stat)
    integer :: stat
    logical,intent(in) :: adj,add
    real,dimension(:) :: xx,yy
    call adjnull (adj,add,xx,yy )
    call heliarr_lop2(adj,add,xx,yy )
    stat=0
  end function
  subroutine heliarr_lop2(adj,add,xx,yy)
    logical,intent(in) :: adj,add
    real, dimension (:) :: xx
    real, dimension (:) :: yy
    integer stat1, stat2
    call helicon_init (aa1)
    stat1 = helicon_lop (adj, .true., xx, yy (:nx))
    call helicon_init (aa2)
    stat2 = helicon_lop (adj, .true., xx, yy (1+nx:))
  end subroutine
  subroutine heliarr_close()
  end subroutine
end module
