Abstract
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 rasterized image of a 2D slice of three CSG models of varying complexity 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× reduction in execution time relative to postfix for a model of a tokamak fusion device. We then measured the execution time of neutron transport simulations of the same three models using each of the algorithms. The results and performance improvements reveal the same trends as for the rasterization test, with a 5.52× overall speedup using the infix notation relative to the original postfix notation in OpenMC for the tokamak model.
Original language | English |
---|---|
Article number | 103803 |
Journal | CAD Computer Aided Design |
Volume | 178 |
DOIs | |
State | Published - Jan 2025 |
Funding
This work is supported by the U.S. Department of Energy Office of Fusion Energy Sciences under award number DE-SC0022033. We gratefully acknowledge the computing resources provided on Improv, a high-performance computing cluster operated by the Laboratory Computing Resource Center at Argonne National Laboratory. This work was carried out using an adaption of the E-lite model which was developed as a collaborative effort between: AMEC Co (International), CCFE (UK), ENEA Frascati (Italy), FDS Team of INEST (PRC), ITER Organization (France), QST (Japan), KIT (Germany), UNED (Spain), University of Wisconsin-Madison (USA), F4E (Europe). The views and opinions expressed herein do not necessarily relect those of the ITER Organization.
Funders | Funder number |
---|---|
FDS Team of INEST | |
University of Wisconsin-Madison | |
Agenzia nazionale per le nuove tecnologie, l'energia e lo sviluppo economico sostenibile | |
Instituto Tecnológico y de Energías Renovables | |
Karlsruhe Institute of Technology | |
Argonne National Laboratory | |
National Institutes for Quantum and Radiological Science and Technology | |
Culham Centre for Fusion Energy | |
AMEC Co | |
Universidad Nacional de Educación a Distancia | |
Laboratory Computing Resource Center | |
Fusion Energy Sciences | DE-SC0022033 |
Fusion Energy Sciences |
Keywords
- Constructive solid geometry
- Monte Carlo
- Particle transport
- Point containment