!---------------------------------------------------------------------------
! This code was developed at Tech-X (www.txcorp.com). It is free for any one
! to use but comes with no warranty whatsoever. Use at your own risk. 
! Thanks for reporting bugs to pletzer@txcorp.com. 
!---------------------------------------------------------------------------
! Return error if any of the target points lie outside the domain

#include "cpp/czspline_handle_size.h"

  !point
#define _S czspline_isindomain1
#define _O czspline1
  subroutine _S(handle, p1, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    real(fp), intent(in) :: p1
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, p1, ier)
  end subroutine _S
#undef _S
#undef _O

  !cloud
#define _S czspline_isindomain1_cloud
#define _O czspline1
  subroutine _S(handle, k, p1, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k
    real(fp), intent(in) :: p1(k)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k, p1, ier)
  end subroutine _S
#undef _S
#undef _O

  !array
#define _S czspline_isindomain1_array
#define _O czspline1
  subroutine _S(handle, k1, p1, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k1
    real(fp), intent(in) :: p1(k1)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k1, p1, ier)
  end subroutine _S
#undef _S
#undef _O

  !point
#define _S czspline_isindomain2
#define _O czspline2
  subroutine _S(handle, p1, p2, ier)
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    real(fp), intent(in) :: p1, p2
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, p1, p2, ier)
  end subroutine _S
#undef _S
#undef _O

  !cloud
#define _S czspline_isindomain2_cloud
#define _O czspline2
  subroutine _S(handle, k, p1, p2, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k
    real(fp), intent(in) :: p1(k), p2(k)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k, p1, p2, ier)
  end subroutine _S
#undef _S
#undef _O

  !array
#define _S czspline_isindomain2_array
#define _O czspline2
  subroutine _S(handle, k1, k2, p1, p2, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k1, k2
    real(fp), intent(in)  :: p1(k1), p2(k2)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k1, k2, p1, p2, ier)
  end subroutine _S
#undef _S
#undef _O

  !point
#define _S czspline_isindomain3
#define _O czspline3
  subroutine _S(handle, p1, p2, p3, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    real(fp), intent(in) :: p1, p2, p3
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, p1, p2, p3, ier)
  end subroutine _S
#undef _S
#undef _O

  !cloud
#define _S czspline_isindomain3_cloud
#define _O czspline3
  subroutine _S(handle, k, p1, p2, p3, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k
    real(fp), intent(in) :: p1(k), p2(k), p3(k)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k, p1, p2, p3, ier)
  end subroutine _S
#undef _S
#undef _O

  !array
#define _S czspline_isindomain3_array
#define _O czspline3
  subroutine _S(handle, k1, k2, k3, p1, p2, p3, ier)
    use iso_c_binding, only: fp => c_double
    use ezspline_obj
    use ezspline
    use czspline_pointer_types
    implicit none
    integer, intent(inout) :: handle(_ARRSZ)
    integer, intent(in) :: k1, k2, k3
    real(fp), intent(in) :: p1(k1), p2(k2), p3(k3)
    integer, intent(out) :: ier
    type(_O) :: self
    self = transfer(handle, self)
    call ezspline_isindomain(self % ptr, k1, k2, k3, p1, p2, p3, ier)
  end subroutine _S
#undef _S
#undef _O
