Check for non-matching periodic boundary conditions

This commit is contained in:
Paul Romano 2016-05-11 21:39:56 -05:00
parent 42ef7ccfac
commit 5e910498b3
2 changed files with 10 additions and 2 deletions

View file

@ -432,7 +432,7 @@ contains
! Score surface currents since reflection causes the direction of the
! particle to change -- artificially move the particle slightly back in
! case the surface crossing in coincident with a mesh boundary
! case the surface crossing is coincident with a mesh boundary
if (active_current_tallies % size() > 0) then
p % coord(1) % xyz = p % coord(1) % xyz - TINY_BIT * p % coord(1) % uvw
@ -488,7 +488,7 @@ contains
! Score surface currents since reflection causes the direction of the
! particle to change -- artificially move the particle slightly back in
! case the surface crossing in coincident with a mesh boundary
! case the surface crossing is coincident with a mesh boundary
if (active_current_tallies % size() > 0) then
p % coord(1) % xyz = p % coord(1) % xyz - TINY_BIT * p % coord(1) % uvw

View file

@ -1630,6 +1630,14 @@ contains
call fatal_error("Periodic boundary condition applied to &
&non-planar surface.")
end select
! Make sure opposite surface is also periodic
associate (surf => surfaces(i) % obj)
if (surfaces(surf % opposite) % obj % bc /= BC_PERIODIC) then
call fatal_error("Could not find matching surface for periodic &
&boundary on surface " // trim(to_str(surf % id)) // ".")
end if
end associate
end if
end do