dbcsr_heap_reset_first Subroutine

public subroutine dbcsr_heap_reset_first(heap, value)

Changes the value of the minimum heap element and rebalances the heap.

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_heap_type), intent(inout) :: heap
integer(kind=valt), intent(in) :: value

Contents


Source Code

   SUBROUTINE dbcsr_heap_reset_first(heap, value)
      !! Changes the value of the minimum heap element and rebalances the heap.
      TYPE(dbcsr_heap_type), INTENT(INOUT)               :: heap
      INTEGER(KIND=valt), INTENT(IN)                     :: value

      DBCSR_ASSERT(heap%n > 0)
      heap%nodes(1)%node%value = value
      CALL bubble_down(heap, 1)
   END SUBROUTINE dbcsr_heap_reset_first