
subroutine VDerivate_Field_IcGrid3D_new( &
  & cptr, cptr_icgrid3d &
  & ) bind(C, name='VDerivate_Field_IcGrid3D_new')

  use, intrinsic :: iso_c_binding

  use VDerivate_Field_IcGrid3D_Manager, only: &
    & VDerivate_Field_IcGrid3D, VDerivate_Field_IcGrid3D_Init

  use IcGrid3D_FVM_Manager, only: &
    & IcGrid3D_FVM

  implicit none
  type(c_ptr), intent(out) :: cptr
  type(c_ptr), value :: cptr_icgrid3d

  type(VDerivate_Field_IcGrid3D), pointer :: ptr
  type(IcGrid3D_FVM), pointer :: ptr_icgrid3d

  call c_f_pointer(cptr_icgrid3d, ptr_icgrid3d)

  allocate(ptr)
  call VDerivate_Field_IcGrid3D_Init(ptr, ptr_icgrid3d)

  cptr = c_loc(ptr)

end subroutine VDerivate_Field_IcGrid3D_new

subroutine VDerivate_Field_IcGrid3D_del( &
  & cptr &
  & ) bind(C, name='VDerivate_Field_IcGrid3D_del')

  use, intrinsic :: iso_c_binding

  use VDerivate_Field_IcGrid3D_Manager, only: &
    & VDerivate_Field_IcGrid3D, VDerivate_Field_IcGrid3D_Final

  implicit none
  type(c_ptr), intent(inout) :: cptr

  type(VDerivate_Field_IcGrid3D), pointer :: ptr

  call c_f_pointer(cptr, ptr)
  call VDerivate_Field_IcGrid3D_Final(ptr)
  deallocate(ptr)

  cptr = c_null_ptr

end subroutine VDerivate_Field_IcGrid3D_del
