btree_new_i8_cp2d Subroutine

private subroutine btree_new_i8_cp2d(tree, order)

Arguments

Type IntentOptional Attributes Name
type(btree_i8_cp2d), intent(out) :: tree
integer, intent(in), optional :: order

Source Code

      SUBROUTINE btree_new_i8_cp2d (tree, order)
         TYPE(btree_i8_cp2d), INTENT(OUT) :: tree
         INTEGER, INTENT(IN), OPTIONAL :: order
         INTEGER :: maxs, mins
         !
         IF (PRESENT(order)) THEN
            maxs = order - 1
         ELSE
            maxs = 15
         END IF
         mins = ISHFT(maxs, -1)
         IF (mins*2 .GT. maxs) maxs = 2*maxs
         IF (mins .LT. 1) mins = 1
         IF (maxs .LT. 3) maxs = 3
         tree%b%min_fill = mins
         tree%b%max_fill = maxs
         tree%b%refcount = 1
         tree%b%n = 0
         NULLIFY (tree%b%root)
         tree%b%lastid = 0
      END SUBROUTINE btree_new_i8_cp2d