      subroutine t3dbc_tile(Istr,Iend,Jstr,Jend,indx,itrc,grad)
      use Agrif_Types, only : Agrif_tabvars

      use Agrif_Util

#include "Param_BeforeCall_t3dbc_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      integer(4) :: indx
      integer(4) :: itrc
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad

                     
                                              
                                             
      if (Agrif_Root()) then
        call t3dbc_parent_tile(Istr,Iend,Jstr,Jend,indx,itrc,grad)
      else
        call t3dbc_child_tile(Istr,Iend,Jstr,Jend,indx,itrc,grad)
      endif
      return
      end
      subroutine t3dbc_parent_tile(Istr,Iend,Jstr,Jend,indx,itrc,grad)      


      use Agrif_Util
#include "Param_BeforeCall_t3dbc_parent_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      integer(4) :: indx
      integer(4) :: itrc
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad
      

        call Sub_Loop_t3dbc_parent_tile(Istr,Iend,Jstr,Jend,indx,itrc,gr
     &ad, Agrif_tabvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif
     &_tabvars_i(13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(
     &163)%array3, Agrif_tabvars(175)%array3, Agrif_tabvars(79)%array2, 
     &Agrif_tabvars(187)%array3, Agrif_tabvars(81)%array2, Agrif_tabvars
     &(199)%array3, Agrif_tabvars(78)%array2, Agrif_tabvars_i(153)%iarra
     &y0, Agrif_tabvars(148)%array5, Agrif_tabvars_r(32)%array0, Agrif_t
     &abvars_r(31)%array0, Agrif_tabvars_r(3)%array0, Agrif_tabvars_l(13
     &)%larray0, Agrif_tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray
     &0, Agrif_tabvars_l(12)%larray0)

      end


#include "Sub_Loop_t3dbc_parent_tile.h"
      subroutine t3dbc_child_tile(Istr,Iend,Jstr,Jend,indx,itrc,grad)      


      use Agrif_Util
#include "Param_BeforeCall_t3dbc_child_tile.h"
      integer(4) :: Istr
      integer(4) :: Iend
      integer(4) :: Jstr
      integer(4) :: Jend
      integer(4) :: indx
      integer(4) :: itrc
      real, dimension(Istr-2:Iend+2,Jstr-2:Jend+2) :: grad
      

        call Sub_Loop_t3dbc_child_tile(Istr,Iend,Jstr,Jend,indx,itrc,gra
     &d, Agrif_tabvars_i(14)%iarray0, Agrif_tabvars_i(4)%iarray0, Agrif_
     &tabvars_i(13)%iarray0, Agrif_tabvars_i(2)%iarray0, Agrif_tabvars(1
     &63)%array3, Agrif_tabvars(175)%array3, Agrif_tabvars(187)%array3, 
     &Agrif_tabvars(81)%array2, Agrif_tabvars(199)%array3, Agrif_tabvars
     &(148)%array5, Agrif_tabvars_r(32)%array0, Agrif_tabvars_r(31)%arra
     &y0, Agrif_tabvars_r(3)%array0, Agrif_tabvars_l(13)%larray0, Agrif_
     &tabvars_l(14)%larray0, Agrif_tabvars_l(11)%larray0, Agrif_tabvars_
     &l(12)%larray0)

      end


#include "Sub_Loop_t3dbc_child_tile.h"
