Destroy block.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(block_object), | intent(inout) | :: | self | Block. |
elemental subroutine destroy(self)
!< Destroy block.
class(block_object), intent(inout) :: self !< Block.
type(block_object) :: fresh !< Fresh instance of block object.
self = fresh
if (allocated(self%cell)) then
call self%cell%destroy
deallocate(self%cell)
endif
if (allocated(self%face_i)) then
call self%face_i%destroy
deallocate(self%face_i)
endif
if (allocated(self%face_j)) then
call self%face_j%destroy
deallocate(self%face_j)
endif
if (allocated(self%face_k)) then
call self%face_k%destroy
deallocate(self%face_k)
endif
if (allocated(self%node)) then
call self%node%destroy
deallocate(self%node)
endif
endsubroutine destroy