<p><b>mpetersen@lanl.gov</b> 2012-10-03 15:38:57 -0600 (Wed, 03 Oct 2012)</p><p>Correcting errors in periodic_hex: angleEdge and nEdgesonEdge were incorrect.<br>
</p><hr noshade><pre><font color="gray">Modified: trunk/grid_gen/periodic_quad/periodic_grid.F
===================================================================
--- trunk/grid_gen/periodic_quad/periodic_grid.F        2012-10-03 21:28:46 UTC (rev 2178)
+++ trunk/grid_gen/periodic_quad/periodic_grid.F        2012-10-03 21:38:57 UTC (rev 2179)
@@ -97,6 +97,9 @@
    allocate(ke(nVertLevels,nCells,1))
    allocate(tracers(nTracers,nVertLevels,nCells,1))
 
+   edgesOnEdge = 0
+   weightsOnEdge = 0.0
+
    do iRow = 1, ny
    do iCol = 1, nx
       iCell = cellIdx(iCol,iRow)
@@ -194,15 +197,21 @@
       yVertex(verticesOnCell(1,iCell)) = yCell(iCell) + 0.5*dc
       zVertex(verticesOnCell(1,iCell)) = 0.0
 
-      angleEdge(edgesOnCell(1,iCell)) = pi / TWO
-      angleEdge(edgesOnCell(2,iCell)) = 0.0
+      ! With these lines, angleEdge=0 means a normal vector to the edge points North
+      !angleEdge(edgesOnCell(1,iCell)) = pi / TWO
+      !angleEdge(edgesOnCell(2,iCell)) = 0.0
 
+      ! With these lines, angleEdge=0 means a normal vector to the edge points East
+      ! This matches the convention in periodic_hex
+      angleEdge(edgesOnCell(1,iCell)) = 0.0
+      angleEdge(edgesOnCell(2,iCell)) = pi / TWO
+
    end do
    end do
 
    do i=1,nEdges
       indexToEdgeID(i) = i
-      nEdgesOnEdge(i) = nVertexDegree
+      nEdgesOnEdge(i) = 6; 
       dcEdge(i) = dc
       dvEdge(i) = dc
    end do

</font>
</pre>