@@ -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
0 commit comments