module experiment_impl_template

  use dc_types, only: &
    & DP, TOKEN, STRING

  use IcGrid2D_FVM_Manager, only: &
    & IcGrid2D_FVM

  use IcGrid3D_FVM_Manager, only: &
    & IcGrid3D_FVM

  use Field_Grid1D_Manager, only: &
    & Field_Grid1D

  use Field_IcGrid2D_Manager, only: &
    & Field_IcGrid2D

  use Field_IcGrid3D_Manager, only: &
    & Field_IcGrid3D

  use TFCoord_IcGrid3D_helper, only: &
    & TFCoord_IcGrid3D

  implicit none
  private

  public :: experiment_impl_Init, experiment_impl_Final
  public :: timelevel_updated

  integer :: iEMin, iEMax, jEMin, jEMax, rcIDMin, rcIDMax

contains

subroutine experiment_impl_Init( &
  & experimentName, z_RhoBasic, z_PressBasic, &
  & xyz_Vh, xyr_W, xyz_RhoPertub, xyz_PressPertub, xyz_ENl, &
  & tfcoordz, tfcoordr &
  & )

  character(*), intent(in) :: experimentName
  type(Field_Grid1D), intent(inout) :: z_RhoBasic
  type(Field_Grid1D), intent(inout) :: z_PressBasic
  type(Field_IcGrid3D), intent(inout) :: xyz_Vh
  type(Field_IcGrid3D), intent(inout) :: xyr_W
  type(Field_IcGrid3D), intent(inout) :: xyz_RhoPertub
  type(Field_IcGrid3D), intent(inout) :: xyz_PressPertub
  type(Field_IcGrid3D), intent(inout) :: xyz_ENl
  type(TFCoord_IcGrid3D), intent(in) :: tfcoordz
  type(TFCoord_IcGrid3D), intent(in) :: tfcoordr

  type(LocalProcRectInfo), pointer :: lcRCInfo

  lcRCInfo => get_LocalProcRectInfo(get_icgrid2D(get_icgrid3D(xyz_Vh))

  call get_InteriorRegion_IndexInfo( &
    & lcRCInfo,            &                         ! (in)
    & iEMin, iEMax, jEMin, jEMax, rcIDMin, rcIDMax ) ! (out)

end subroutine experiment_impl_Init

subroutine LongTimeLevel_updated( &
  & NStepLong, xyz_RhoBasic, xyz_PressBasic, &
  & xyz_VhNl, xyr_WNl, xyz_RNl, xyz_ENl &
  & )

  integer, intent(in) :: NStepLong
  type(Field_IcGrid3D), intent(inout) :: z_RhoBasic
  type(Field_IcGrid3D), intent(inout) :: z_PressBasic
  type(Field_IcGrid3D), intent(inout) :: xyz_VhNl
  type(Field_IcGrid3D), intent(inout) :: xyr_WNl
  type(Field_IcGrid3D), intent(inout) :: xyz_RNl
  type(Field_IcGrid3D), intent(inout) :: xyz_ENl


end subroutine LongTimeLevel_updated

subroutine ShortTimeLevel_updated( &
  & NStepLong, NStepShort, xyz_RhoBasic, xyz_PressBasic, &
  & xyz_VhDevNs, xyr_WDevNs, xyz_RDevNs, xyz_EDevNs &
  & )

  integer, intent(in) :: NStepLong
  integer, intent(in) :: NStepShort
  type(Field_IcGrid3D), intent(inout) :: z_RhoBasic
  type(Field_IcGrid3D), intent(inout) :: z_PressBasic
  type(Field_IcGrid3D), intent(inout) :: xyz_VhDevNl
  type(Field_IcGrid3D), intent(inout) :: xyr_WDevNs
  type(Field_IcGrid3D), intent(inout) :: xyz_RDevNs
  type(Field_IcGrid3D), intent(inout) :: xyz_EDevNs


end subroutine ShortTimeLevel_updated

subroutine experiment_impl_Final()

end subroutine experiment_impl_Final


end module experiment_impl_template
