rb_init Subroutine

private subroutine rb_init(self, ifq, ic, it, is, ik, ncol, nextend)

Uses

Initialise the members of the rowblock instance

Type Bound

rowblock_type

Arguments

Type IntentOptional Attributes Name
class(rowblock_type), intent(inout) :: self
integer, intent(in) :: ifq
integer, intent(in) :: ic
integer, intent(in) :: it
integer, intent(in) :: is
integer, intent(in) :: ik
integer, intent(in) :: ncol
integer, intent(in) :: nextend

The length of the parent supercell's real space domain. Represents the spacing between the start of different field/field equations as we store data as the full real space domain for each field, e.g. [fieldeq(:), fieldeqa(:), fieldeqp(:)], rather than say interleaved, e.g. [[fieldeq(1), fieldeqa(1), fieldeqp(1)], [fieldeq(2), fieldeqa(2), fieldeqp(2)],...]


Contents

Source Code


Source Code

  subroutine rb_init(self, ifq, ic, it, is, ik, ncol, nextend)
    use theta_grid, only: ntgrid
    implicit none
    class(rowblock_type), intent(in out) :: self
    integer, intent(in) :: ifq, ic, it, is, ik, ncol
    !> The length of the parent supercell's real space
    !> domain. Represents the spacing between the start of different
    !> field/field equations as we store data as the full real space
    !> domain for each field, e.g. [fieldeq(:), fieldeqa(:),
    !> fieldeqp(:)], rather than say interleaved, e.g. [[fieldeq(1),
    !> fieldeqa(1), fieldeqp(1)], [fieldeq(2), fieldeqa(2),
    !> fieldeqp(2)],...]
    integer, intent(in) :: nextend
    ! Store rowblock index, essentially which fieldeq we represent
    self%ir_ind = ifq
    ! Store indices of parent types
    self%ic_ind = ic
    self%it_ind = it
    self%is_ind = is
    self%ik_ind = ik
    ! Store data limits
    self%ncol = ncol
    self%col_llim = 1 + (ic - 1) * (2 * ntgrid) + (ifq - 1) * nextend
    self%col_ulim = self%col_llim + ncol - 1
  end subroutine rb_init