# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
module helderiv
  use adj_mod
  use lapfac
  use helicon
  implicit none
  type( filter), private :: aa
  contains
  subroutine helderiv_init ( n1,na,eps )
    integer, intent (in) :: n1, na
    real, intent (in) :: eps
    aa = lapfac2( eps, n1, na)
    call helicon_init( aa)
  end subroutine
  function helderiv_lop ( adj, add, pp, qq) result(stat)
    integer :: stat
    logical,intent(in) :: adj,add
    real,dimension(:) :: pp,qq
    call adjnull (adj,add,pp,qq )
    call helderiv_lop2(adj,add,pp,qq )
    stat=0
  end function
  subroutine helderiv_lop2(adj,add,pp,qq)
    logical,intent(in) :: adj,add
    real, dimension (:) :: pp
    real, dimension (:) :: qq
    integer stat1
    stat1 = helicon_lop( adj, .false., pp, qq)
  end subroutine
  subroutine helderiv_close()
    call deallocatehelix( aa)
  end subroutine
end module
