Saved in:
Bibliographic Details
Main Authors: Romano, Paul K., Myers, Patrick A., Johnson, Seth R., Kolšek, Aljaž, Shriwise, Patrick C.
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2406.13030
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911138583674880
author Romano, Paul K.
Myers, Patrick A.
Johnson, Seth R.
Kolšek, Aljaž
Shriwise, Patrick C.
author_facet Romano, Paul K.
Myers, Patrick A.
Johnson, Seth R.
Kolšek, Aljaž
Shriwise, Patrick C.
contents We present several algorithms for evaluating point containment in constructive solid geometry (CSG) trees with unbounded primitives. Three algorithms are presented based on postfix, prefix, and infix notations of the CSG binary expression tree. We show that prefix and infix notations enable short-circuiting logic, which reduces the number of primitives that must be checked during point containment. To evaluate the performance of the algorithms, each algorithm was implemented in the OpenMC Monte Carlo particle transport code, which relies on CSG to represent solid bodies through which subatomic particles travel. Two sets of tests were carried out. First, the execution time to generate a high-resolution rasterized image of a 2D slice of a detailed CSG model of the ITER tokamak was measured. Use of both prefix and infix notations offered significant speedup over the postfix notation that has traditionally been used in particle transport codes, with infix resulting in a 6$\times$ reduction in execution time relative to postfix. We then measured the execution time of neutron transport simulations of the same ITER model using each of the algorithms. The results and performance improvements reveal the same trends as for the rasterization test, with a 4.59$\times$ overall speedup using the infix notation relative to the original postfix notation in OpenMC.
format Preprint
id arxiv_https___arxiv_org_abs_2406_13030
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Point containment algorithms for constructive solid geometry with unbounded primitives
Romano, Paul K.
Myers, Patrick A.
Johnson, Seth R.
Kolšek, Aljaž
Shriwise, Patrick C.
Computational Physics
Computational Geometry
We present several algorithms for evaluating point containment in constructive solid geometry (CSG) trees with unbounded primitives. Three algorithms are presented based on postfix, prefix, and infix notations of the CSG binary expression tree. We show that prefix and infix notations enable short-circuiting logic, which reduces the number of primitives that must be checked during point containment. To evaluate the performance of the algorithms, each algorithm was implemented in the OpenMC Monte Carlo particle transport code, which relies on CSG to represent solid bodies through which subatomic particles travel. Two sets of tests were carried out. First, the execution time to generate a high-resolution rasterized image of a 2D slice of a detailed CSG model of the ITER tokamak was measured. Use of both prefix and infix notations offered significant speedup over the postfix notation that has traditionally been used in particle transport codes, with infix resulting in a 6$\times$ reduction in execution time relative to postfix. We then measured the execution time of neutron transport simulations of the same ITER model using each of the algorithms. The results and performance improvements reveal the same trends as for the rasterization test, with a 4.59$\times$ overall speedup using the infix notation relative to the original postfix notation in OpenMC.
title Point containment algorithms for constructive solid geometry with unbounded primitives
topic Computational Physics
Computational Geometry
url https://arxiv.org/abs/2406.13030