cube_t__cube_assign Subroutine

private pure subroutine cube_t__cube_assign(a, b)

Arguments

Type IntentOptional Attributes Name
type(cube_t), intent(inout) :: a
type(cube_t), intent(in) :: b

Source Code

   pure subroutine cube_t__cube_assign(a, b)
      implicit none
      type(cube_t), intent(inout) :: a
      type(cube_t), intent(in) :: b

      integer :: num

      a%is_switched_to_bmp = b%is_switched_to_bmp
      a%epsilon_flag = b%epsilon_flag
      if (b%is_switched_to_bmp) then
         call a%switch_bmp()
         a%bmp%b(:) = b%bmp%b(:)
      else
         a%ascii%a(:) = b%ascii%a(:)
      end if

      if (.not. allocated(b%sps)) return
      num = ubound(b%sps, dim=1)
      a%sps = b%sps ! implicit reallocation

      a%single_flag = a%num() == 1

   end subroutine cube_t__cube_assign