Skip to content

Commit 4d93864

Browse files
author
Himpu Marbona
committed
Minor reorder nullify
1 parent e92a585 commit 4d93864

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

Solver/src/libs/mesh/METISPartitioning.f90

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,10 @@ subroutine GetMETISElementsPartition(mesh, no_of_domains, elementsDomain, nodesD
162162
! -----------
163163
!
164164
deallocate (eptr, eind, opts)
165+
if (associated(vwgt)) nullify(vwgt) ! vwgt is a pointer to a target. nullify is enough
165166
if (allocated(weights)) deallocate(weights)
166167
if (allocated(tpwgt)) deallocate(tpwgt)
167168
if (allocated(vsize)) deallocate(vsize)
168-
if (associated(vwgt)) nullify(vwgt) ! vwgt is a pointer to a target. nullify is enough
169-
170169
end if
171170
!
172171
! Perform METIS partitioning based on the element's level - if not MLRK then nLevel=1
@@ -275,14 +274,13 @@ subroutine GetMETISElementsPartition(mesh, no_of_domains, elementsDomain, nodesD
275274
! -----------
276275
!
277276
deallocate (nodesDomainLevel, elementsDomainLevel, mapToOld, eptr, eind, opts)
277+
if (associated(vwgt)) nullify(vwgt) ! vwgt is a pointer to a target. nullify is enough
278278
if (allocated(weights)) deallocate(weights)
279279
if (allocated(tpwgt)) deallocate(tpwgt)
280280
if (allocated(vsize)) deallocate(vsize)
281-
if (associated(vwgt)) nullify(vwgt) ! vwgt is a pointer to a target. nullify is enough
282281
end do
283282

284283
nodesDomain = 0 ! Not used
285-
!elementsDomain = inputMLRKDomain(:,1)
286284
do i=1, mesh % no_of_elements
287285
elementsDomain(i) = sum(inputMLRKDomain(i,:))
288286
end do

Solver/src/libs/mesh/OrientedBoundingBox.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,10 @@ subroutine ConvexHull( Hull, OBB )
846846
Hull% Points(i) = p
847847
p => p% next
848848
end do
849-
850-
call convPoints% destruct()
851849

852850
nullify(p, p1)
851+
852+
call convPoints% destruct()
853853

854854
end subroutine ConvexHull
855855
!

0 commit comments

Comments
 (0)