From 91f51729c30ade11799fa639be5d045a3f68516b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 1 Nov 2011 09:19:06 -0400 Subject: [PATCH] Fixed reflective boundary conditions on cylinders. Closes gh-48. --- src/geometry.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/geometry.f90 b/src/geometry.f90 index cf83b08e09..ff7dd1ed09 100644 --- a/src/geometry.f90 +++ b/src/geometry.f90 @@ -244,9 +244,9 @@ contains p % uvw = (/ u, v, w /) case (SURF_CYL_X) ! Find y-y0, z-z0 and dot product of direction and surface normal - y = p % xyz(2) - surf % coeffs(2) - z = p % xyz(3) - surf % coeffs(3) - R = surf % coeffs(4) + y = p % xyz(2) - surf % coeffs(1) + z = p % xyz(3) - surf % coeffs(2) + R = surf % coeffs(3) dot_prod = v*y + w*z ! Reflect direction according to normal @@ -258,8 +258,8 @@ contains case (SURF_CYL_Y) ! Find x-x0, z-z0 and dot product of direction and surface normal x = p % xyz(1) - surf % coeffs(1) - z = p % xyz(3) - surf % coeffs(3) - R = surf % coeffs(4) + z = p % xyz(3) - surf % coeffs(2) + R = surf % coeffs(3) dot_prod = u*x + w*z ! Reflect direction according to normal @@ -272,7 +272,7 @@ contains ! Find x-x0, y-y0 and dot product of direction and surface normal x = p % xyz(1) - surf % coeffs(1) y = p % xyz(2) - surf % coeffs(2) - R = surf % coeffs(4) + R = surf % coeffs(3) dot_prod = u*x + v*y ! Reflect direction according to normal