<p><b>mmwolf@sandia.gov</b> 2010-01-05 20:33:00 -0700 (Tue, 05 Jan 2010)</p><p>Finished Zoltan HSFC ordering of cells. Need to verify that answers do not change<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/swmodel/src/module_zoltan_interface.F
===================================================================
--- trunk/swmodel/src/module_zoltan_interface.F        2010-01-06 00:17:15 UTC (rev 105)
+++ trunk/swmodel/src/module_zoltan_interface.F        2010-01-06 03:33:00 UTC (rev 106)
@@ -19,7 +19,6 @@
integer(Zoltan_INT) :: error
real(Zoltan_FLOAT) :: version
-
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Body of subroutine
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -50,8 +49,11 @@
integer :: numGidEntries, i
integer(ZOLTAN_INT), allocatable :: global_ids(:)
+ integer(ZOLTAN_INT), allocatable :: permIndices(:)
integer(ZOLTAN_INT), allocatable :: permGIDs(:)
- integer(ZOLTAN_INT), allocatable :: permIndices(:)
+ real(kind=RKIND), allocatable :: permXs(:)
+ real(kind=RKIND), allocatable :: permYs(:)
+ real(kind=RKIND), allocatable :: permZs(:)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -83,9 +85,13 @@
numGidEntries=1
allocate(global_ids(numCells))
+ allocate(permIndices(numCells))
allocate(permGIDs(numCells))
- allocate(permIndices(numCells))
+ allocate(permXs(numCells))
+ allocate(permYs(numCells))
+ allocate(permZs(numCells))
+ !! MMW: There might be a way to use cellIDs directly
do i=1,numCells
global_ids(i) = cellIDs(i)
end do
@@ -97,15 +103,32 @@
!!!!!!!!!!!!!!!!!!!!!!!!!!
do i=1,numCells
permGIDs(i) = global_ids(permIndices(i)+1)
+ permXs(i) = cellCoordX(permIndices(i)+1)
+ permYs(i) = cellCoordY(permIndices(i)+1)
+ permZs(i) = cellCoordZ(permIndices(i)+1)
end do
!!do i=1,numCells
!! write(*,*) global_ids(i), permGIDs(i)
!!end do
+ !!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! Actually change the ordering of the cells
+ !!!!!!!!!!!!!!!!!!!!!!!!!!
+ do i=1,numCells
+ cellIDs(i) = permGIDs(i)
+ cellCoordX(i) = permXs(i)
+ cellCoordY(i) = permYs(i)
+ cellCoordZ(i) = permZs(i)
+ end do
+ !!!!!!!!!!!!!!!!!!!!!!!!!!
+
deallocate(global_ids)
+ deallocate(permIndices)
deallocate(permGIDs)
- deallocate(permIndices)
+ deallocate(permXs)
+ deallocate(permYs)
+ deallocate(permZs)
call Zoltan_Destroy(zz_obj)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
</font>
</pre>