mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Update constants for surface half-space operators
This commit is contained in:
parent
6e58fe8a0d
commit
da0d13e18c
3 changed files with 7 additions and 6 deletions
|
|
@ -87,10 +87,11 @@ module constants
|
|||
|
||||
! Logical operators for cell definitions
|
||||
integer, parameter :: &
|
||||
OP_LEFT_PAREN = huge(0), & ! Left parentheses
|
||||
OP_RIGHT_PAREN = huge(0) - 1, & ! Right parentheses
|
||||
OP_UNION = huge(0) - 2, & ! Union operator
|
||||
OP_DIFFERENCE = huge(0) - 3 ! Difference operator
|
||||
OP_LEFT_PAREN = huge(0), & ! Left parentheses
|
||||
OP_RIGHT_PAREN = huge(0) - 1, & ! Right parentheses
|
||||
OP_COMPLEMENT = huge(0) - 2, & ! Complement operator (~)
|
||||
OP_INTERSECTION = huge(0) - 3, & ! Intersection operator
|
||||
OP_UNION = huge(0) - 4 ! Union operator (^)
|
||||
|
||||
! Cell types
|
||||
integer, parameter :: &
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ contains
|
|||
|
||||
! check for operators
|
||||
index_surf = abs(index_surf)
|
||||
if (index_surf >= OP_DIFFERENCE) cycle
|
||||
if (index_surf >= OP_UNION) cycle
|
||||
|
||||
! Calculate distance to surface
|
||||
surf => surfaces(index_surf)%obj
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ contains
|
|||
c => cells(i)
|
||||
do j = 1, c%n_surfaces
|
||||
id = c%surfaces(j)
|
||||
if (id < OP_DIFFERENCE) then
|
||||
if (id < OP_UNION) then
|
||||
if (surface_dict%has_key(abs(id))) then
|
||||
i_array = surface_dict%get_key(abs(id))
|
||||
c%surfaces(j) = sign(i_array, id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue