
subroutine g_IcGrid2D_FVM_Builder_construct_icosahedral_grid1( &
  & grid_type, glevel, ic_radius, icgrid_cptr &
  & ) bind(C, name='g_IcGrid2D_FVM_Builder_construct_icosahedral_grid1' )

  use, intrinsic :: iso_c_binding

  use IcGrid2D_FVM_Manager, only: &
    & IcGrid2D_FVM

  use IcGrid2D_FVM_Builder, only: &
    & construct_icosahedral_grid

  use dc_types, only: &
    DP

  implicit none
  integer(c_int), value :: grid_type
  integer(c_int), value :: glevel
  real(DP), value :: ic_radius
  type(c_ptr), intent(out) :: icgrid_cptr

  type(IcGrid2D_FVM), pointer :: icgrid_ptr

  call construct_icosahedral_grid(grid_type, glevel, ic_radius, icgrid_ptr)

  icgrid_cptr = c_loc(icgrid_ptr)

end subroutine g_IcGrid2D_FVM_Builder_construct_icosahedral_grid1

subroutine g_IcGrid2D_FVM_Builder_construct_icosahedral_grid2( &
  & grid_type,icgrid_cptr &
  & ) bind(C, name='g_IcGrid2D_FVM_Builder_construct_icosahedral_grid2')

  use, intrinsic :: iso_c_binding

  use IcGrid2D_FVM_Manager, only: &
    & IcGrid2D_FVM

  use IcGrid2D_FVM_Builder, only: &
    & construct_icosahedral_grid

  implicit none
  integer(c_int), value :: grid_type
  type(c_ptr), value :: icgrid_cptr

  type(IcGrid2D_FVM), pointer :: icgrid_ptr

  call c_f_pointer(icgrid_cptr, icgrid_ptr)
  call construct_icosahedral_grid(grid_type, icgrid_ptr)

end subroutine g_IcGrid2D_FVM_Builder_construct_icosahedral_grid2



