Convert the extended domain index to it
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(supercell_type), | intent(in) | :: | self | |||
integer, | intent(in) | :: | iex | |||
integer, | intent(out) | :: | it |
subroutine sc_iex_to_it(self,iex,it)
use theta_grid, only: ntgrid
implicit none
class(supercell_type), intent(in) :: self
integer, intent(in) :: iex
integer, intent(out) :: it
integer :: ifl, iex_tmp, ic
!First work out how many fields there are
call self%iex_to_ifl(iex,ifl)
!Ensure we're looking between 1 and self%nextend
iex_tmp=iex-(ifl-1)*self%nextend
ic=MIN(int((iex_tmp-1)/(2*ntgrid))+1,self%ncell)
it=self%cells(ic)%it_ind
end subroutine sc_iex_to_it