From c3d4d243a9f9c4c4876e872682c491c454a36e86 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Fri, 5 Sep 2014 14:04:17 -0400 Subject: [PATCH] 3d hex_lattice bugfixes --- src/geometry.F90 | 2 +- src/input_xml.F90 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/geometry.F90 b/src/geometry.F90 index 0d03601a0d..c9865cb114 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -1569,7 +1569,7 @@ contains ! Top and bottom sides. if (lat % is_3d) then - z0 = sign(lat % pitch(3) * 0.5_8, w) + z0 = sign(lat % pitch(2) * 0.5_8, w) if (abs(z - z0) < FP_PRECISION) then d = INFINITY diff --git a/src/input_xml.F90 b/src/input_xml.F90 index b85ed8c242..0a5b4e23ee 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1301,8 +1301,8 @@ contains end do RECT_LATTICES HEX_LATTICES: do i = 1, n_hlats - allocate(HexLattice::lattices(i) % obj) - lat => lattices(i) % obj + allocate(HexLattice::lattices(n_rlats + i) % obj) + lat => lattices(n_rlats + i) % obj select type (lat) type is (HexLattice) @@ -1477,7 +1477,7 @@ contains end if ! Add lattice to dictionary - call lattice_dict % add_key(lat % id, i) + call lattice_dict % add_key(lat % id, n_rlats + i) end select end do HEX_LATTICES